grpc 1.73.0 → 1.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +38 -17
- data/include/grpc/create_channel_from_endpoint.h +54 -0
- data/include/grpc/credentials.h +11 -5
- data/include/grpc/event_engine/event_engine.h +74 -17
- data/include/grpc/grpc_posix.h +20 -1
- data/include/grpc/impl/channel_arg_names.h +2 -4
- data/include/grpc/module.modulemap +1 -0
- data/include/grpc/support/json.h +24 -0
- data/src/core/call/interception_chain.h +7 -11
- data/src/core/channelz/channel_trace.cc +213 -115
- data/src/core/channelz/channel_trace.h +380 -86
- data/src/core/channelz/channelz.cc +270 -181
- data/src/core/channelz/channelz.h +168 -55
- data/src/core/channelz/channelz_registry.cc +2 -1
- data/src/core/channelz/channelz_registry.h +24 -0
- data/src/core/channelz/property_list.cc +357 -0
- data/src/core/channelz/property_list.h +202 -0
- data/src/core/channelz/ztrace_collector.h +3 -2
- data/src/core/client_channel/backup_poller.cc +17 -2
- data/src/core/client_channel/client_channel.cc +17 -28
- data/src/core/client_channel/client_channel_filter.cc +19 -29
- data/src/core/client_channel/config_selector.h +8 -2
- data/src/core/client_channel/dynamic_filters.cc +5 -6
- data/src/core/client_channel/dynamic_filters.h +1 -1
- data/src/core/client_channel/global_subchannel_pool.cc +4 -1
- data/src/core/client_channel/retry_filter.cc +21 -27
- data/src/core/client_channel/retry_filter.h +10 -7
- data/src/core/client_channel/retry_filter_legacy_call_data.cc +5 -5
- data/src/core/client_channel/retry_filter_legacy_call_data.h +1 -1
- data/src/core/client_channel/retry_interceptor.cc +30 -44
- data/src/core/client_channel/retry_interceptor.h +18 -17
- data/src/core/client_channel/retry_throttle.cc +46 -61
- data/src/core/client_channel/retry_throttle.h +17 -39
- data/src/core/client_channel/subchannel.cc +43 -19
- data/src/core/client_channel/subchannel.h +8 -0
- data/src/core/config/config_vars.cc +2 -0
- data/src/core/config/core_configuration.cc +1 -0
- data/src/core/config/core_configuration.h +11 -0
- data/src/core/credentials/call/call_creds_registry.h +125 -0
- data/src/core/credentials/call/call_creds_registry_init.cc +91 -0
- data/src/core/credentials/call/gcp_service_account_identity/gcp_service_account_identity_credentials.cc +6 -48
- data/src/core/credentials/call/jwt_token_file/jwt_token_file_call_credentials.cc +86 -0
- data/src/core/credentials/call/jwt_token_file/jwt_token_file_call_credentials.h +74 -0
- data/src/core/credentials/call/jwt_util.cc +70 -0
- data/src/core/credentials/call/jwt_util.h +32 -0
- data/src/core/credentials/transport/channel_creds_registry_init.cc +1 -1
- data/src/core/credentials/transport/google_default/google_default_credentials.cc +72 -4
- data/src/core/credentials/transport/ssl/ssl_credentials.cc +0 -1
- data/src/core/credentials/transport/tls/load_system_roots_supported.cc +1 -0
- data/src/core/credentials/transport/xds/xds_credentials.cc +0 -3
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +8 -8
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +16 -16
- data/src/core/ext/filters/http/client_authority_filter.cc +2 -4
- data/src/core/ext/filters/http/message_compress/compression_filter.h +25 -22
- data/src/core/ext/filters/http/server/http_server_filter.h +12 -11
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +120 -35
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +6 -5
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +162 -115
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +0 -3
- data/src/core/ext/transport/chttp2/transport/decode_huff.cc +1239 -3514
- data/src/core/ext/transport/chttp2/transport/decode_huff.h +1008 -1486
- data/src/core/ext/transport/chttp2/transport/flow_control.h +22 -17
- data/src/core/ext/transport/chttp2/transport/frame.cc +10 -0
- data/src/core/ext/transport/chttp2/transport/frame.h +2 -2
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +7 -8
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +4 -5
- data/src/core/ext/transport/chttp2/transport/header_assembler.h +299 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +11 -5
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +12 -1
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +1017 -0
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +593 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +19 -22
- data/{third_party/abseil-cpp/absl/strings/cord_buffer.cc → src/core/ext/transport/chttp2/transport/http2_stats_collector.cc} +14 -14
- data/src/core/ext/transport/chttp2/transport/http2_stats_collector.h +33 -0
- data/src/core/ext/transport/chttp2/transport/http2_status.h +6 -1
- data/src/core/ext/transport/chttp2/transport/http2_transport.cc +43 -0
- data/src/core/ext/transport/chttp2/transport/http2_transport.h +65 -0
- data/src/core/ext/transport/chttp2/transport/http2_ztrace_collector.h +0 -29
- data/src/core/ext/transport/chttp2/transport/internal.h +18 -8
- data/src/core/ext/transport/chttp2/transport/keepalive.cc +105 -0
- data/src/core/ext/transport/chttp2/transport/keepalive.h +138 -0
- data/src/core/ext/transport/chttp2/transport/message_assembler.h +185 -0
- data/src/core/ext/transport/chttp2/transport/parsing.cc +2 -4
- data/src/core/ext/transport/chttp2/transport/ping_callbacks.h +19 -0
- data/src/core/ext/transport/chttp2/transport/ping_promise.cc +151 -0
- data/src/core/ext/transport/chttp2/transport/ping_promise.h +180 -0
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +5 -9
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.h +11 -0
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +39 -1
- data/src/core/ext/transport/chttp2/transport/transport_common.cc +19 -0
- data/src/core/ext/transport/chttp2/transport/transport_common.h +27 -0
- data/src/core/ext/transport/chttp2/transport/writing.cc +37 -11
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb.h +571 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.c +120 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.h +36 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb.h +1272 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.c +312 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.h +50 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb.h +984 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb_minitable.c +226 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb_minitable.h +44 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/promise.upbdefs.c +175 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/promise.upbdefs.h +82 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/property_list.upbdefs.c +135 -0
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/v2/property_list.upbdefs.h +67 -0
- data/src/core/filter/auth/auth_filters.h +0 -25
- data/src/core/filter/auth/client_auth_filter.cc +0 -118
- data/src/core/filter/filter_args.h +9 -23
- data/src/core/handshaker/handshaker.cc +23 -14
- data/src/core/handshaker/handshaker.h +3 -0
- data/src/core/handshaker/http_connect/http_connect_handshaker.cc +3 -1
- data/src/core/handshaker/security/legacy_secure_endpoint.cc +6 -5
- data/src/core/handshaker/security/secure_endpoint.cc +70 -25
- data/src/core/handshaker/security/security_handshaker.cc +4 -1
- data/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc +7 -1
- data/src/core/lib/channel/channel_args.cc +15 -0
- data/src/core/lib/channel/channel_args.h +3 -0
- data/src/core/lib/channel/channel_stack.cc +22 -23
- data/src/core/lib/channel/channel_stack.h +9 -7
- data/src/core/lib/channel/channel_stack_builder_impl.cc +1 -1
- data/src/core/lib/channel/channel_stack_builder_impl.h +2 -7
- data/src/core/lib/channel/promise_based_filter.h +5 -5
- data/src/core/lib/debug/trace_impl.h +0 -1
- data/src/core/lib/event_engine/ares_resolver.cc +165 -46
- data/src/core/lib/event_engine/ares_resolver.h +48 -2
- data/src/core/lib/event_engine/cf_engine/cf_engine.cc +3 -1
- data/src/core/lib/event_engine/cf_engine/cf_engine.h +1 -4
- data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h +2 -6
- data/src/core/lib/event_engine/endpoint_channel_arg_wrapper.cc +40 -0
- data/src/core/lib/event_engine/endpoint_channel_arg_wrapper.h +60 -0
- data/src/core/lib/event_engine/event_engine.cc +7 -0
- data/src/core/lib/event_engine/extensions/channelz.h +10 -6
- data/src/core/lib/event_engine/grpc_polled_fd.h +5 -0
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +130 -162
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h +11 -15
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +75 -117
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.h +7 -9
- data/src/core/lib/event_engine/posix_engine/event_poller.h +18 -15
- data/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc +0 -18
- data/src/core/lib/event_engine/posix_engine/file_descriptor_collection.cc +124 -0
- data/src/core/lib/event_engine/posix_engine/file_descriptor_collection.h +243 -0
- data/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h +29 -19
- data/src/core/lib/event_engine/posix_engine/internal_errqueue.cc +6 -2
- data/src/core/lib/event_engine/posix_engine/internal_errqueue.h +6 -1
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +145 -92
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +9 -19
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +333 -116
- data/src/core/lib/event_engine/posix_engine/posix_engine.h +61 -18
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +45 -37
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.h +6 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +32 -142
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h +6 -5
- data/src/core/lib/event_engine/posix_engine/posix_interface.h +211 -0
- data/src/core/lib/event_engine/posix_engine/posix_interface_posix.cc +1083 -0
- data/src/core/lib/event_engine/posix_engine/posix_interface_windows.cc +281 -0
- data/src/core/lib/event_engine/posix_engine/posix_write_event_sink.cc +154 -0
- data/src/core/lib/event_engine/posix_engine/posix_write_event_sink.h +174 -0
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +3 -719
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +10 -170
- data/src/core/lib/event_engine/posix_engine/timer_manager.cc +33 -22
- data/src/core/lib/event_engine/posix_engine/timer_manager.h +13 -11
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc +117 -151
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.h +26 -94
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc +26 -25
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h +6 -2
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc +36 -62
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h +6 -2
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h +7 -6
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc +12 -6
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h +3 -1
- data/src/core/lib/event_engine/shim.cc +9 -0
- data/src/core/lib/event_engine/shim.h +3 -0
- data/src/core/lib/event_engine/thread_pool/thread_pool.h +7 -3
- data/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc +0 -17
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +4 -2
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h +3 -2
- data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc +4 -0
- data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h +4 -0
- data/src/core/lib/event_engine/windows/windows_endpoint.h +2 -6
- data/src/core/lib/event_engine/windows/windows_engine.cc +0 -1
- data/src/core/lib/event_engine/windows/windows_engine.h +1 -3
- data/src/core/lib/event_engine/windows/windows_listener.cc +14 -2
- data/src/core/lib/experiments/experiments.cc +45 -93
- data/src/core/lib/experiments/experiments.h +21 -51
- data/src/core/lib/iomgr/endpoint.cc +4 -3
- data/src/core/lib/iomgr/endpoint.h +7 -4
- data/src/core/lib/iomgr/endpoint_cfstream.cc +3 -2
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +7 -2
- data/src/core/lib/iomgr/ev_poll_posix.cc +7 -2
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +4 -6
- data/src/core/lib/iomgr/tcp_posix.cc +12 -6
- data/src/core/lib/iomgr/tcp_windows.cc +3 -2
- data/src/core/lib/promise/activity.h +1 -0
- data/src/core/lib/promise/arena_promise.h +23 -7
- data/src/core/lib/promise/detail/promise_factory.h +10 -0
- data/src/core/lib/promise/detail/promise_like.h +118 -11
- data/src/core/lib/promise/detail/promise_variant.h +50 -0
- data/src/core/lib/promise/detail/seq_state.h +687 -548
- data/src/core/lib/promise/if.h +20 -0
- data/src/core/lib/promise/inter_activity_latch.h +147 -0
- data/src/core/lib/promise/inter_activity_mutex.h +547 -0
- data/src/core/lib/promise/loop.h +65 -3
- data/src/core/lib/promise/map.h +24 -0
- data/src/core/lib/promise/match_promise.h +103 -0
- data/src/core/lib/promise/mpsc.cc +425 -0
- data/src/core/lib/promise/mpsc.h +490 -0
- data/src/core/lib/promise/party.cc +50 -1
- data/src/core/lib/promise/party.h +66 -1
- data/src/core/lib/promise/race.h +31 -0
- data/src/core/lib/promise/seq.h +4 -1
- data/src/core/lib/promise/status_flag.h +7 -0
- data/src/core/lib/promise/try_seq.h +4 -1
- data/src/core/lib/promise/wait_set.cc +28 -0
- data/src/core/lib/promise/wait_set.h +86 -0
- data/src/core/lib/resource_quota/arena.h +19 -0
- data/src/core/lib/slice/slice.h +5 -0
- data/src/core/lib/surface/channel_create.cc +88 -13
- data/src/core/lib/surface/channel_create.h +4 -0
- data/src/core/lib/surface/channel_init.cc +164 -47
- data/src/core/lib/surface/channel_init.h +64 -1
- data/src/core/lib/surface/filter_stack_call.cc +18 -9
- data/src/core/lib/surface/init.cc +6 -15
- data/src/core/lib/surface/legacy_channel.cc +3 -5
- data/src/core/lib/surface/legacy_channel.h +3 -1
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/promise_endpoint.cc +110 -0
- data/src/core/lib/transport/promise_endpoint.h +307 -0
- data/src/core/load_balancing/child_policy_handler.cc +2 -4
- data/src/core/load_balancing/delegating_helper.h +2 -3
- data/src/core/load_balancing/health_check_client.cc +1 -5
- data/src/core/load_balancing/lb_policy.h +1 -3
- data/src/core/load_balancing/oob_backend_metric.cc +1 -5
- data/src/core/load_balancing/pick_first/pick_first.cc +3 -0
- data/src/core/load_balancing/xds/cds.cc +10 -1
- data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +2 -0
- data/src/core/resolver/xds/xds_config.cc +6 -3
- data/src/core/resolver/xds/xds_config.h +9 -4
- data/src/core/resolver/xds/xds_dependency_manager.cc +21 -6
- data/src/core/resolver/xds/xds_dependency_manager.h +2 -1
- data/src/core/resolver/xds/xds_resolver.cc +31 -11
- data/src/core/server/server.cc +83 -12
- data/src/core/server/server.h +21 -2
- data/src/core/server/xds_server_config_fetcher.cc +63 -25
- data/src/core/service_config/service_config.h +1 -1
- data/src/core/service_config/service_config_impl.h +1 -1
- data/src/core/telemetry/context_list_entry.cc +38 -0
- data/src/core/telemetry/context_list_entry.h +42 -12
- data/src/core/telemetry/stats_data.cc +233 -207
- data/src/core/telemetry/stats_data.h +250 -153
- data/src/core/telemetry/tcp_tracer.h +1 -1
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +11 -3
- data/src/core/tsi/fake_transport_security.cc +17 -0
- data/src/core/tsi/ssl_transport_security.cc +2 -0
- data/src/core/tsi/transport_security_grpc.cc +8 -0
- data/src/core/tsi/transport_security_grpc.h +15 -0
- data/src/core/util/backoff.cc +1 -5
- data/src/core/util/backoff.h +1 -0
- data/src/core/util/down_cast.h +1 -1
- data/src/core/util/function_signature.h +15 -1
- data/src/core/util/http_client/httpcli.cc +12 -5
- data/src/core/util/http_client/httpcli.h +4 -1
- data/src/core/util/latent_see.h +8 -5
- data/src/core/util/log.cc +4 -0
- data/src/core/util/memory_usage.h +268 -0
- data/src/core/util/per_cpu.cc +2 -0
- data/src/core/util/per_cpu.h +7 -0
- data/src/core/util/shared_bit_gen.h +20 -0
- data/src/core/util/single_set_ptr.h +2 -2
- data/src/core/util/upb_utils.h +42 -0
- data/src/core/util/uri.cc +3 -2
- data/src/core/util/useful.h +53 -2
- data/src/core/util/wait_for_single_owner.cc +31 -0
- data/src/core/util/wait_for_single_owner.h +24 -0
- data/src/core/xds/grpc/xds_bootstrap_grpc.cc +2 -0
- data/src/core/xds/grpc/xds_bootstrap_grpc.h +5 -0
- data/src/core/xds/grpc/xds_client_grpc.cc +6 -2
- data/src/core/xds/grpc/xds_common_types_parser.cc +138 -50
- data/src/core/xds/grpc/xds_common_types_parser.h +12 -0
- data/src/core/xds/grpc/xds_http_filter.h +7 -0
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +22 -0
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +3 -0
- data/src/core/xds/grpc/xds_route_config_parser.cc +15 -38
- data/src/core/xds/grpc/xds_server_grpc.cc +63 -13
- data/src/core/xds/grpc/xds_server_grpc.h +10 -2
- data/src/core/xds/grpc/xds_server_grpc_interface.h +4 -0
- data/src/core/xds/grpc/xds_transport_grpc.cc +18 -0
- data/src/core/xds/xds_client/xds_bootstrap.h +2 -0
- data/src/core/xds/xds_client/xds_client.cc +26 -5
- data/src/ruby/ext/grpc/extconf.rb +2 -0
- data/src/ruby/ext/grpc/rb_call.c +1 -8
- data/src/ruby/ext/grpc/rb_channel.c +72 -568
- data/src/ruby/ext/grpc/rb_channel.h +0 -3
- data/src/ruby/ext/grpc/rb_completion_queue.c +26 -14
- data/src/ruby/ext/grpc/rb_completion_queue.h +1 -7
- data/src/ruby/ext/grpc/rb_grpc.c +9 -5
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +1 -1
- data/src/ruby/ext/grpc/rb_loader.c +0 -4
- data/src/ruby/ext/grpc/rb_server.c +31 -50
- data/src/ruby/lib/grpc/generic/client_stub.rb +4 -4
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/core_spec.rb +22 -0
- data/src/ruby/spec/generic/active_call_spec.rb +1 -1
- data/third_party/abseil-cpp/absl/algorithm/container.h +2 -19
- data/third_party/abseil-cpp/absl/base/attributes.h +76 -7
- data/third_party/abseil-cpp/absl/base/call_once.h +11 -12
- data/third_party/abseil-cpp/absl/base/config.h +20 -129
- data/third_party/abseil-cpp/absl/base/{internal/fast_type_id.h → fast_type_id.h} +11 -16
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.cc +0 -5
- data/third_party/abseil-cpp/absl/base/internal/cycleclock_config.h +7 -7
- data/third_party/abseil-cpp/absl/base/internal/endian.h +34 -38
- data/third_party/abseil-cpp/absl/base/internal/iterator_traits.h +71 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +6 -5
- data/third_party/abseil-cpp/absl/base/internal/{nullability_impl.h → nullability_deprecated.h} +45 -8
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +0 -9
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +3 -13
- data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +6 -6
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +8 -3
- data/third_party/abseil-cpp/absl/base/no_destructor.h +11 -32
- data/third_party/abseil-cpp/absl/base/nullability.h +84 -72
- data/third_party/abseil-cpp/absl/base/options.h +3 -80
- data/third_party/abseil-cpp/absl/base/policy_checks.h +7 -7
- data/third_party/abseil-cpp/absl/cleanup/cleanup.h +1 -3
- data/third_party/abseil-cpp/absl/cleanup/internal/cleanup.h +3 -4
- data/third_party/abseil-cpp/absl/container/btree_map.h +4 -2
- data/third_party/abseil-cpp/absl/container/btree_set.h +4 -2
- data/third_party/abseil-cpp/absl/container/fixed_array.h +7 -14
- data/third_party/abseil-cpp/absl/container/flat_hash_map.h +5 -0
- data/third_party/abseil-cpp/absl/container/flat_hash_set.h +6 -1
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +8 -5
- data/third_party/abseil-cpp/absl/container/internal/btree.h +132 -29
- data/third_party/abseil-cpp/absl/container/internal/btree_container.h +175 -71
- data/third_party/abseil-cpp/absl/container/internal/common.h +43 -0
- data/third_party/abseil-cpp/absl/container/internal/common_policy_traits.h +1 -2
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +9 -10
- data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +1 -8
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +0 -4
- data/third_party/abseil-cpp/absl/container/internal/hashtable_control_bytes.h +527 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +20 -4
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +31 -12
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +2 -7
- data/third_party/abseil-cpp/absl/container/internal/layout.h +26 -42
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +199 -68
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +1354 -183
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +881 -1424
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set_resize_impl.h +80 -0
- data/third_party/abseil-cpp/absl/crc/crc32c.cc +0 -4
- data/third_party/abseil-cpp/absl/crc/crc32c.h +7 -5
- data/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h +0 -22
- data/third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc +45 -74
- data/third_party/abseil-cpp/absl/debugging/internal/addresses.h +57 -0
- data/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc +1 -1
- data/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.h +5 -5
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +8 -35
- data/third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc +16 -16
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +40 -37
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +16 -7
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_emscripten-inl.inc +14 -5
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +10 -4
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +27 -16
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +13 -4
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +4 -3
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +15 -28
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +19 -9
- data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +144 -27
- data/third_party/abseil-cpp/absl/debugging/stacktrace.h +73 -5
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +19 -9
- data/third_party/abseil-cpp/absl/debugging/symbolize_emscripten.inc +3 -2
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +25 -6
- data/third_party/abseil-cpp/absl/flags/commandlineflag.h +2 -2
- data/third_party/abseil-cpp/absl/flags/flag.h +4 -3
- data/third_party/abseil-cpp/absl/flags/internal/commandlineflag.h +2 -2
- data/third_party/abseil-cpp/absl/flags/internal/flag.cc +2 -1
- data/third_party/abseil-cpp/absl/flags/internal/flag.h +7 -6
- data/third_party/abseil-cpp/absl/flags/internal/registry.h +4 -3
- data/third_party/abseil-cpp/absl/flags/reflection.cc +2 -3
- data/third_party/abseil-cpp/absl/functional/any_invocable.h +8 -10
- data/third_party/abseil-cpp/absl/functional/function_ref.h +2 -9
- data/third_party/abseil-cpp/absl/functional/internal/any_invocable.h +110 -226
- data/third_party/abseil-cpp/absl/functional/internal/front_binder.h +10 -12
- data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +2 -5
- data/third_party/abseil-cpp/absl/hash/hash.h +18 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +1 -5
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +86 -61
- data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.cc +25 -68
- data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.h +2 -6
- data/third_party/abseil-cpp/absl/hash/internal/weakly_mixed_integer.h +38 -0
- data/third_party/abseil-cpp/absl/log/check.h +2 -1
- data/third_party/abseil-cpp/absl/log/globals.h +4 -5
- data/third_party/abseil-cpp/absl/log/internal/append_truncated.h +28 -0
- data/third_party/abseil-cpp/absl/log/internal/check_op.cc +22 -22
- data/third_party/abseil-cpp/absl/log/internal/check_op.h +65 -62
- data/third_party/abseil-cpp/absl/log/internal/conditions.cc +5 -3
- data/third_party/abseil-cpp/absl/log/internal/conditions.h +7 -2
- data/third_party/abseil-cpp/absl/log/internal/log_message.cc +85 -43
- data/third_party/abseil-cpp/absl/log/internal/log_message.h +84 -59
- data/third_party/abseil-cpp/absl/log/internal/nullstream.h +1 -0
- data/third_party/abseil-cpp/absl/log/internal/proto.cc +3 -2
- data/third_party/abseil-cpp/absl/log/internal/proto.h +3 -3
- data/third_party/abseil-cpp/absl/log/internal/strip.h +4 -12
- data/third_party/abseil-cpp/absl/log/internal/vlog_config.h +8 -6
- data/third_party/abseil-cpp/absl/log/internal/voidify.h +10 -4
- data/third_party/abseil-cpp/absl/log/log.h +48 -35
- data/third_party/abseil-cpp/absl/log/log_sink_registry.h +2 -2
- data/third_party/abseil-cpp/absl/meta/type_traits.h +46 -175
- data/third_party/abseil-cpp/absl/numeric/bits.h +68 -2
- data/third_party/abseil-cpp/absl/numeric/int128.cc +0 -52
- data/third_party/abseil-cpp/absl/numeric/internal/bits.h +7 -3
- data/third_party/abseil-cpp/absl/profiling/internal/exponential_biased.cc +1 -1
- data/third_party/abseil-cpp/absl/random/bit_gen_ref.h +10 -11
- data/third_party/abseil-cpp/absl/random/distributions.h +6 -8
- data/third_party/abseil-cpp/absl/random/gaussian_distribution.h +1 -1
- data/third_party/abseil-cpp/absl/random/internal/distribution_caller.h +5 -6
- data/third_party/abseil-cpp/absl/random/internal/{pool_urbg.cc → entropy_pool.cc} +22 -90
- data/third_party/abseil-cpp/absl/random/internal/entropy_pool.h +35 -0
- data/third_party/abseil-cpp/absl/random/internal/nonsecure_base.h +5 -6
- data/third_party/abseil-cpp/absl/random/internal/randen_detect.cc +1 -1
- data/third_party/abseil-cpp/absl/random/internal/seed_material.cc +20 -12
- data/third_party/abseil-cpp/absl/random/internal/seed_material.h +5 -5
- data/third_party/abseil-cpp/absl/random/random.h +88 -53
- data/third_party/abseil-cpp/absl/random/seed_sequences.cc +6 -2
- data/third_party/abseil-cpp/absl/status/internal/status_internal.cc +3 -4
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +3 -4
- data/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +4 -3
- data/third_party/abseil-cpp/absl/status/status.cc +4 -8
- data/third_party/abseil-cpp/absl/status/status.h +8 -8
- data/third_party/abseil-cpp/absl/status/status_payload_printer.h +2 -2
- data/third_party/abseil-cpp/absl/status/statusor.cc +2 -2
- data/third_party/abseil-cpp/absl/status/statusor.h +6 -6
- data/third_party/abseil-cpp/absl/strings/ascii.cc +9 -9
- data/third_party/abseil-cpp/absl/strings/ascii.h +18 -18
- data/third_party/abseil-cpp/absl/strings/charconv.cc +21 -22
- data/third_party/abseil-cpp/absl/strings/charconv.h +5 -5
- data/third_party/abseil-cpp/absl/strings/cord.cc +54 -58
- data/third_party/abseil-cpp/absl/strings/cord.h +94 -83
- data/third_party/abseil-cpp/absl/strings/cord_analysis.cc +11 -11
- data/third_party/abseil-cpp/absl/strings/cord_analysis.h +3 -3
- data/third_party/abseil-cpp/absl/strings/escaping.cc +130 -149
- data/third_party/abseil-cpp/absl/strings/escaping.h +9 -10
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +6 -8
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.cc +0 -4
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.cc +0 -4
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +7 -63
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +1 -11
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +0 -22
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.cc +5 -3
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +4 -2
- data/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +3 -3
- data/third_party/abseil-cpp/absl/strings/internal/string_constant.h +0 -5
- data/third_party/abseil-cpp/absl/strings/internal/utf8.cc +96 -1
- data/third_party/abseil-cpp/absl/strings/internal/utf8.h +15 -1
- data/third_party/abseil-cpp/absl/strings/numbers.cc +53 -32
- data/third_party/abseil-cpp/absl/strings/numbers.h +87 -58
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +6 -7
- data/third_party/abseil-cpp/absl/strings/str_cat.h +32 -32
- data/third_party/abseil-cpp/absl/strings/str_format.h +18 -18
- data/third_party/abseil-cpp/absl/strings/str_replace.cc +3 -3
- data/third_party/abseil-cpp/absl/strings/str_replace.h +6 -6
- data/third_party/abseil-cpp/absl/strings/string_view.cc +4 -9
- data/third_party/abseil-cpp/absl/strings/string_view.h +27 -32
- data/third_party/abseil-cpp/absl/strings/strip.h +4 -4
- data/third_party/abseil-cpp/absl/strings/substitute.cc +5 -4
- data/third_party/abseil-cpp/absl/strings/substitute.h +66 -64
- data/third_party/abseil-cpp/absl/synchronization/internal/futex_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.cc +0 -5
- data/third_party/abseil-cpp/absl/synchronization/internal/pthread_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/sem_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/stdcpp_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter_base.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/internal/win32_waiter.cc +0 -4
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +1 -1
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +97 -69
- data/third_party/abseil-cpp/absl/synchronization/notification.h +1 -1
- data/third_party/abseil-cpp/absl/time/civil_time.cc +1 -0
- data/third_party/abseil-cpp/absl/time/duration.cc +12 -7
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +1 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +90 -111
- data/third_party/abseil-cpp/absl/time/time.h +20 -15
- data/third_party/abseil-cpp/absl/types/optional.h +7 -747
- data/third_party/abseil-cpp/absl/types/span.h +13 -11
- data/third_party/abseil-cpp/absl/types/variant.h +5 -784
- data/third_party/abseil-cpp/absl/utility/utility.h +10 -185
- metadata +72 -20
- data/src/core/lib/event_engine/forkable.cc +0 -105
- data/src/core/lib/event_engine/forkable.h +0 -67
- data/src/core/lib/iomgr/python_util.h +0 -46
- data/third_party/abseil-cpp/absl/base/internal/inline_variable.h +0 -108
- data/third_party/abseil-cpp/absl/base/internal/invoke.h +0 -241
- data/third_party/abseil-cpp/absl/log/log_entry.cc +0 -41
- data/third_party/abseil-cpp/absl/random/internal/pool_urbg.h +0 -131
- data/third_party/abseil-cpp/absl/types/bad_optional_access.cc +0 -66
- data/third_party/abseil-cpp/absl/types/bad_optional_access.h +0 -78
- data/third_party/abseil-cpp/absl/types/bad_variant_access.cc +0 -82
- data/third_party/abseil-cpp/absl/types/bad_variant_access.h +0 -82
- data/third_party/abseil-cpp/absl/types/internal/optional.h +0 -352
- data/third_party/abseil-cpp/absl/types/internal/variant.h +0 -1622
@@ -14,29 +14,44 @@
|
|
14
14
|
|
15
15
|
#include "absl/hash/internal/low_level_hash.h"
|
16
16
|
|
17
|
+
#include <cassert>
|
17
18
|
#include <cstddef>
|
18
19
|
#include <cstdint>
|
19
20
|
|
21
|
+
#include "absl/base/config.h"
|
20
22
|
#include "absl/base/internal/unaligned_access.h"
|
23
|
+
#include "absl/base/optimization.h"
|
21
24
|
#include "absl/base/prefetch.h"
|
22
25
|
#include "absl/numeric/int128.h"
|
23
26
|
|
24
27
|
namespace absl {
|
25
28
|
ABSL_NAMESPACE_BEGIN
|
26
29
|
namespace hash_internal {
|
27
|
-
|
28
|
-
|
30
|
+
namespace {
|
31
|
+
uint64_t Mix(uint64_t v0, uint64_t v1) {
|
29
32
|
absl::uint128 p = v0;
|
30
33
|
p *= v1;
|
31
34
|
return absl::Uint128Low64(p) ^ absl::Uint128High64(p);
|
32
35
|
}
|
36
|
+
uint64_t Mix32Bytes(const uint8_t* ptr, uint64_t current_state,
|
37
|
+
const uint64_t salt[5]) {
|
38
|
+
uint64_t a = absl::base_internal::UnalignedLoad64(ptr);
|
39
|
+
uint64_t b = absl::base_internal::UnalignedLoad64(ptr + 8);
|
40
|
+
uint64_t c = absl::base_internal::UnalignedLoad64(ptr + 16);
|
41
|
+
uint64_t d = absl::base_internal::UnalignedLoad64(ptr + 24);
|
42
|
+
|
43
|
+
uint64_t cs0 = Mix(a ^ salt[1], b ^ current_state);
|
44
|
+
uint64_t cs1 = Mix(c ^ salt[2], d ^ current_state);
|
45
|
+
return cs0 ^ cs1;
|
46
|
+
}
|
47
|
+
} // namespace
|
33
48
|
|
34
|
-
uint64_t
|
49
|
+
uint64_t LowLevelHashLenGt32(const void* data, size_t len, uint64_t seed,
|
35
50
|
const uint64_t salt[5]) {
|
51
|
+
assert(len > 32);
|
36
52
|
const uint8_t* ptr = static_cast<const uint8_t*>(data);
|
37
|
-
uint64_t
|
38
|
-
const uint8_t*
|
39
|
-
uint64_t current_state = seed ^ salt[0];
|
53
|
+
uint64_t current_state = seed ^ salt[0] ^ len;
|
54
|
+
const uint8_t* last_32_ptr = ptr + len - 32;
|
40
55
|
|
41
56
|
if (len > 64) {
|
42
57
|
// If we have more than 64 bytes, we're going to handle chunks of 64
|
@@ -76,71 +91,13 @@ uint64_t LowLevelHashLenGt16(const void* data, size_t len, uint64_t seed,
|
|
76
91
|
// We now have a data `ptr` with at most 64 bytes and the current state
|
77
92
|
// of the hashing state machine stored in current_state.
|
78
93
|
if (len > 32) {
|
79
|
-
|
80
|
-
uint64_t b = absl::base_internal::UnalignedLoad64(ptr + 8);
|
81
|
-
uint64_t c = absl::base_internal::UnalignedLoad64(ptr + 16);
|
82
|
-
uint64_t d = absl::base_internal::UnalignedLoad64(ptr + 24);
|
83
|
-
|
84
|
-
uint64_t cs0 = Mix(a ^ salt[1], b ^ current_state);
|
85
|
-
uint64_t cs1 = Mix(c ^ salt[2], d ^ current_state);
|
86
|
-
current_state = cs0 ^ cs1;
|
87
|
-
|
88
|
-
ptr += 32;
|
89
|
-
len -= 32;
|
94
|
+
current_state = Mix32Bytes(ptr, current_state, salt);
|
90
95
|
}
|
91
96
|
|
92
97
|
// We now have a data `ptr` with at most 32 bytes and the current state
|
93
|
-
// of the hashing state machine stored in current_state.
|
94
|
-
|
95
|
-
|
96
|
-
uint64_t b = absl::base_internal::UnalignedLoad64(ptr + 8);
|
97
|
-
|
98
|
-
current_state = Mix(a ^ salt[1], b ^ current_state);
|
99
|
-
}
|
100
|
-
|
101
|
-
// We now have a data `ptr` with at least 1 and at most 16 bytes. But we can
|
102
|
-
// safely read from `ptr + len - 16`.
|
103
|
-
uint64_t a = absl::base_internal::UnalignedLoad64(last_16_ptr);
|
104
|
-
uint64_t b = absl::base_internal::UnalignedLoad64(last_16_ptr + 8);
|
105
|
-
|
106
|
-
return Mix(a ^ salt[1] ^ starting_length, b ^ current_state);
|
107
|
-
}
|
108
|
-
|
109
|
-
uint64_t LowLevelHash(const void* data, size_t len, uint64_t seed,
|
110
|
-
const uint64_t salt[5]) {
|
111
|
-
if (len > 16) return LowLevelHashLenGt16(data, len, seed, salt);
|
112
|
-
|
113
|
-
// Prefetch the cacheline that data resides in.
|
114
|
-
PrefetchToLocalCache(data);
|
115
|
-
const uint8_t* ptr = static_cast<const uint8_t*>(data);
|
116
|
-
uint64_t starting_length = static_cast<uint64_t>(len);
|
117
|
-
uint64_t current_state = seed ^ salt[0];
|
118
|
-
if (len == 0) return current_state;
|
119
|
-
|
120
|
-
uint64_t a = 0;
|
121
|
-
uint64_t b = 0;
|
122
|
-
|
123
|
-
// We now have a data `ptr` with at least 1 and at most 16 bytes.
|
124
|
-
if (len > 8) {
|
125
|
-
// When we have at least 9 and at most 16 bytes, set A to the first 64
|
126
|
-
// bits of the input and B to the last 64 bits of the input. Yes, they
|
127
|
-
// will overlap in the middle if we are working with less than the full 16
|
128
|
-
// bytes.
|
129
|
-
a = absl::base_internal::UnalignedLoad64(ptr);
|
130
|
-
b = absl::base_internal::UnalignedLoad64(ptr + len - 8);
|
131
|
-
} else if (len > 3) {
|
132
|
-
// If we have at least 4 and at most 8 bytes, set A to the first 32
|
133
|
-
// bits and B to the last 32 bits.
|
134
|
-
a = absl::base_internal::UnalignedLoad32(ptr);
|
135
|
-
b = absl::base_internal::UnalignedLoad32(ptr + len - 4);
|
136
|
-
} else {
|
137
|
-
// If we have at least 1 and at most 3 bytes, read 2 bytes into A and the
|
138
|
-
// other byte into B, with some adjustments.
|
139
|
-
a = static_cast<uint64_t>((ptr[0] << 8) | ptr[len - 1]);
|
140
|
-
b = static_cast<uint64_t>(ptr[len >> 1]);
|
141
|
-
}
|
142
|
-
|
143
|
-
return Mix(a ^ salt[1] ^ starting_length, b ^ current_state);
|
98
|
+
// of the hashing state machine stored in current_state. But we can
|
99
|
+
// safely read from `ptr + len - 32`.
|
100
|
+
return Mix32Bytes(last_32_ptr, current_state, salt);
|
144
101
|
}
|
145
102
|
|
146
103
|
} // namespace hash_internal
|
@@ -35,16 +35,12 @@ ABSL_NAMESPACE_BEGIN
|
|
35
35
|
namespace hash_internal {
|
36
36
|
|
37
37
|
// Hash function for a byte array. A 64-bit seed and a set of five 64-bit
|
38
|
-
// integers are hashed into the result.
|
38
|
+
// integers are hashed into the result. The length must be greater than 32.
|
39
39
|
//
|
40
40
|
// To allow all hashable types (including string_view and Span) to depend on
|
41
41
|
// this algorithm, we keep the API low-level, with as few dependencies as
|
42
42
|
// possible.
|
43
|
-
uint64_t
|
44
|
-
const uint64_t salt[5]);
|
45
|
-
|
46
|
-
// Same as above except the length must be greater than 16.
|
47
|
-
uint64_t LowLevelHashLenGt16(const void* data, size_t len, uint64_t seed,
|
43
|
+
uint64_t LowLevelHashLenGt32(const void* data, size_t len, uint64_t seed,
|
48
44
|
const uint64_t salt[5]);
|
49
45
|
|
50
46
|
} // namespace hash_internal
|
@@ -0,0 +1,38 @@
|
|
1
|
+
// Copyright 2025 The Abseil Authors
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
#ifndef ABSL_HASH_INTERNAL_WEAKLY_MIXED_INTEGER_H_
|
16
|
+
#define ABSL_HASH_INTERNAL_WEAKLY_MIXED_INTEGER_H_
|
17
|
+
|
18
|
+
#include <cstddef>
|
19
|
+
|
20
|
+
#include "absl/base/config.h"
|
21
|
+
|
22
|
+
namespace absl {
|
23
|
+
ABSL_NAMESPACE_BEGIN
|
24
|
+
namespace hash_internal {
|
25
|
+
|
26
|
+
// Contains an integer that will be mixed into a hash state more weakly than
|
27
|
+
// regular integers. It is useful for cases in which an integer is a part of a
|
28
|
+
// larger object and needs to be mixed as a supplement. E.g., absl::string_view
|
29
|
+
// and absl::Span are mixing their size wrapped with WeaklyMixedInteger.
|
30
|
+
struct WeaklyMixedInteger {
|
31
|
+
size_t value;
|
32
|
+
};
|
33
|
+
|
34
|
+
} // namespace hash_internal
|
35
|
+
ABSL_NAMESPACE_END
|
36
|
+
} // namespace absl
|
37
|
+
|
38
|
+
#endif // ABSL_HASH_INTERNAL_WEAKLY_MIXED_INTEGER_H_
|
@@ -42,7 +42,8 @@
|
|
42
42
|
|
43
43
|
// CHECK()
|
44
44
|
//
|
45
|
-
// `CHECK`
|
45
|
+
// `CHECK` enforces that the `condition` is true. If the condition is false,
|
46
|
+
// the program is terminated with a fatal error.
|
46
47
|
//
|
47
48
|
// The message may include additional information such as stack traces, when
|
48
49
|
// available.
|
@@ -43,7 +43,7 @@ ABSL_NAMESPACE_BEGIN
|
|
43
43
|
//
|
44
44
|
// Returns the value of the Minimum Log Level parameter.
|
45
45
|
// This function is async-signal-safe.
|
46
|
-
|
46
|
+
[[nodiscard]] absl::LogSeverityAtLeast MinLogLevel();
|
47
47
|
|
48
48
|
// SetMinLogLevel()
|
49
49
|
//
|
@@ -82,7 +82,7 @@ class ScopedMinLogLevel final {
|
|
82
82
|
//
|
83
83
|
// Returns the value of the Stderr Threshold parameter.
|
84
84
|
// This function is async-signal-safe.
|
85
|
-
|
85
|
+
[[nodiscard]] absl::LogSeverityAtLeast StderrThreshold();
|
86
86
|
|
87
87
|
// SetStderrThreshold()
|
88
88
|
//
|
@@ -118,8 +118,7 @@ class ScopedStderrThreshold final {
|
|
118
118
|
//
|
119
119
|
// Returns true if we should log a backtrace at the specified location.
|
120
120
|
namespace log_internal {
|
121
|
-
|
122
|
-
int line);
|
121
|
+
[[nodiscard]] bool ShouldLogBacktraceAt(absl::string_view file, int line);
|
123
122
|
} // namespace log_internal
|
124
123
|
|
125
124
|
// SetLogBacktraceLocation()
|
@@ -145,7 +144,7 @@ void ClearLogBacktraceLocation();
|
|
145
144
|
//
|
146
145
|
// Returns the value of the Prepend Log Prefix option.
|
147
146
|
// This function is async-signal-safe.
|
148
|
-
|
147
|
+
[[nodiscard]] bool ShouldPrependLogPrefix();
|
149
148
|
|
150
149
|
// EnableLogPrefix()
|
151
150
|
//
|
@@ -17,8 +17,10 @@
|
|
17
17
|
|
18
18
|
#include <cstddef>
|
19
19
|
#include <cstring>
|
20
|
+
#include <string_view>
|
20
21
|
|
21
22
|
#include "absl/base/config.h"
|
23
|
+
#include "absl/strings/internal/utf8.h"
|
22
24
|
#include "absl/strings/string_view.h"
|
23
25
|
#include "absl/types/span.h"
|
24
26
|
|
@@ -33,6 +35,32 @@ inline size_t AppendTruncated(absl::string_view src, absl::Span<char> &dst) {
|
|
33
35
|
dst.remove_prefix(src.size());
|
34
36
|
return src.size();
|
35
37
|
}
|
38
|
+
// Likewise, but it also takes a wide character string and transforms it into a
|
39
|
+
// UTF-8 encoded byte string regardless of the current locale.
|
40
|
+
// - On platforms where `wchar_t` is 2 bytes (e.g., Windows), the input is
|
41
|
+
// treated as UTF-16.
|
42
|
+
// - On platforms where `wchar_t` is 4 bytes (e.g., Linux, macOS), the input
|
43
|
+
// is treated as UTF-32.
|
44
|
+
inline size_t AppendTruncated(std::wstring_view src, absl::Span<char> &dst) {
|
45
|
+
absl::strings_internal::ShiftState state;
|
46
|
+
size_t total_bytes_written = 0;
|
47
|
+
for (const wchar_t wc : src) {
|
48
|
+
// If the destination buffer might not be large enough to write the next
|
49
|
+
// character, stop.
|
50
|
+
if (dst.size() < absl::strings_internal::kMaxEncodedUTF8Size) break;
|
51
|
+
size_t bytes_written =
|
52
|
+
absl::strings_internal::WideToUtf8(wc, dst.data(), state);
|
53
|
+
if (bytes_written == static_cast<size_t>(-1)) {
|
54
|
+
// Invalid character. Encode REPLACEMENT CHARACTER (U+FFFD) instead.
|
55
|
+
constexpr wchar_t kReplacementCharacter = L'\uFFFD';
|
56
|
+
bytes_written = absl::strings_internal::WideToUtf8(kReplacementCharacter,
|
57
|
+
dst.data(), state);
|
58
|
+
}
|
59
|
+
dst.remove_prefix(bytes_written);
|
60
|
+
total_bytes_written += bytes_written;
|
61
|
+
}
|
62
|
+
return total_bytes_written;
|
63
|
+
}
|
36
64
|
// Likewise, but `n` copies of `c`.
|
37
65
|
inline size_t AppendTruncated(char c, size_t n, absl::Span<char> &dst) {
|
38
66
|
if (n > dst.size()) n = dst.size();
|
@@ -35,26 +35,26 @@ namespace absl {
|
|
35
35
|
ABSL_NAMESPACE_BEGIN
|
36
36
|
namespace log_internal {
|
37
37
|
|
38
|
-
#define
|
39
|
-
template
|
40
|
-
x, x,
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
#undef
|
38
|
+
#define ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(x) \
|
39
|
+
template const char* absl_nonnull MakeCheckOpString( \
|
40
|
+
x, x, const char* absl_nonnull)
|
41
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(bool);
|
42
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(int64_t);
|
43
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(uint64_t);
|
44
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(float);
|
45
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(double);
|
46
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(char);
|
47
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(unsigned char);
|
48
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(const std::string&);
|
49
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(const absl::string_view&);
|
50
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(const char*);
|
51
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(const signed char*);
|
52
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(const unsigned char*);
|
53
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING(const void*);
|
54
|
+
#undef ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING
|
55
55
|
|
56
56
|
CheckOpMessageBuilder::CheckOpMessageBuilder(
|
57
|
-
|
57
|
+
const char* absl_nonnull exprtext) {
|
58
58
|
stream_ << exprtext << " (";
|
59
59
|
}
|
60
60
|
|
@@ -63,7 +63,7 @@ std::ostream& CheckOpMessageBuilder::ForVar2() {
|
|
63
63
|
return stream_;
|
64
64
|
}
|
65
65
|
|
66
|
-
|
66
|
+
const char* absl_nonnull CheckOpMessageBuilder::NewString() {
|
67
67
|
stream_ << ")";
|
68
68
|
// There's no need to free this string since the process is crashing.
|
69
69
|
return absl::IgnoreLeak(new std::string(std::move(stream_).str()))->c_str();
|
@@ -103,9 +103,9 @@ void MakeCheckOpValueString(std::ostream& os, const void* p) {
|
|
103
103
|
|
104
104
|
// Helper functions for string comparisons.
|
105
105
|
#define DEFINE_CHECK_STROP_IMPL(name, func, expected) \
|
106
|
-
|
107
|
-
|
108
|
-
|
106
|
+
const char* absl_nullable Check##func##expected##Impl( \
|
107
|
+
const char* absl_nullable s1, const char* absl_nullable s2, \
|
108
|
+
const char* absl_nonnull exprtext) { \
|
109
109
|
bool equal = s1 == s2 || (s1 && s2 && !func(s1, s2)); \
|
110
110
|
if (equal == expected) { \
|
111
111
|
return nullptr; \
|
@@ -64,49 +64,48 @@
|
|
64
64
|
#endif
|
65
65
|
|
66
66
|
#define ABSL_LOG_INTERNAL_CHECK_OP(name, op, val1, val1_text, val2, val2_text) \
|
67
|
-
while (
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
val1_text " " #op " " val2_text))) \
|
67
|
+
while (const char* absl_nullable absl_log_internal_check_op_result \
|
68
|
+
[[maybe_unused]] = ::absl::log_internal::name##Impl( \
|
69
|
+
::absl::log_internal::GetReferenceableValue(val1), \
|
70
|
+
::absl::log_internal::GetReferenceableValue(val2), \
|
71
|
+
ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(val1_text " " #op \
|
72
|
+
" " val2_text))) \
|
74
73
|
ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true) \
|
75
|
-
ABSL_LOG_INTERNAL_CHECK(absl::implicit_cast<
|
74
|
+
ABSL_LOG_INTERNAL_CHECK(::absl::implicit_cast<const char* absl_nonnull>( \
|
76
75
|
absl_log_internal_check_op_result)) \
|
77
76
|
.InternalStream()
|
78
77
|
#define ABSL_LOG_INTERNAL_QCHECK_OP(name, op, val1, val1_text, val2, \
|
79
78
|
val2_text) \
|
80
|
-
while (
|
79
|
+
while (const char* absl_nullable absl_log_internal_qcheck_op_result = \
|
81
80
|
::absl::log_internal::name##Impl( \
|
82
81
|
::absl::log_internal::GetReferenceableValue(val1), \
|
83
82
|
::absl::log_internal::GetReferenceableValue(val2), \
|
84
83
|
ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL( \
|
85
84
|
val1_text " " #op " " val2_text))) \
|
86
85
|
ABSL_LOG_INTERNAL_CONDITION_QFATAL(STATELESS, true) \
|
87
|
-
ABSL_LOG_INTERNAL_QCHECK(absl::implicit_cast<
|
86
|
+
ABSL_LOG_INTERNAL_QCHECK(::absl::implicit_cast<const char* absl_nonnull>( \
|
88
87
|
absl_log_internal_qcheck_op_result)) \
|
89
88
|
.InternalStream()
|
90
89
|
#define ABSL_LOG_INTERNAL_CHECK_STROP(func, op, expected, s1, s1_text, s2, \
|
91
90
|
s2_text) \
|
92
|
-
while (
|
91
|
+
while (const char* absl_nullable absl_log_internal_check_strop_result = \
|
93
92
|
::absl::log_internal::Check##func##expected##Impl( \
|
94
93
|
(s1), (s2), \
|
95
94
|
ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(s1_text " " #op \
|
96
95
|
" " s2_text))) \
|
97
96
|
ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true) \
|
98
|
-
ABSL_LOG_INTERNAL_CHECK(absl::implicit_cast<
|
97
|
+
ABSL_LOG_INTERNAL_CHECK(::absl::implicit_cast<const char* absl_nonnull>( \
|
99
98
|
absl_log_internal_check_strop_result)) \
|
100
99
|
.InternalStream()
|
101
100
|
#define ABSL_LOG_INTERNAL_QCHECK_STROP(func, op, expected, s1, s1_text, s2, \
|
102
101
|
s2_text) \
|
103
|
-
while (
|
102
|
+
while (const char* absl_nullable absl_log_internal_qcheck_strop_result = \
|
104
103
|
::absl::log_internal::Check##func##expected##Impl( \
|
105
104
|
(s1), (s2), \
|
106
105
|
ABSL_LOG_INTERNAL_STRIP_STRING_LITERAL(s1_text " " #op \
|
107
106
|
" " s2_text))) \
|
108
107
|
ABSL_LOG_INTERNAL_CONDITION_QFATAL(STATELESS, true) \
|
109
|
-
ABSL_LOG_INTERNAL_QCHECK(absl::implicit_cast<
|
108
|
+
ABSL_LOG_INTERNAL_QCHECK(::absl::implicit_cast<const char* absl_nonnull>( \
|
110
109
|
absl_log_internal_qcheck_strop_result)) \
|
111
110
|
.InternalStream()
|
112
111
|
|
@@ -135,8 +134,8 @@
|
|
135
134
|
// strip the call to stringify the non-ok `Status` as long as we don't log it;
|
136
135
|
// dropping the `Status`'s message text is out of scope.
|
137
136
|
#define ABSL_LOG_INTERNAL_CHECK_OK(val, val_text) \
|
138
|
-
for (::std::pair<
|
139
|
-
|
137
|
+
for (::std::pair<const ::absl::Status* absl_nonnull, \
|
138
|
+
const char* absl_nullable> \
|
140
139
|
absl_log_internal_check_ok_goo; \
|
141
140
|
absl_log_internal_check_ok_goo.first = \
|
142
141
|
::absl::log_internal::AsStatus(val), \
|
@@ -149,12 +148,12 @@
|
|
149
148
|
" is OK")), \
|
150
149
|
!ABSL_PREDICT_TRUE(absl_log_internal_check_ok_goo.first->ok());) \
|
151
150
|
ABSL_LOG_INTERNAL_CONDITION_FATAL(STATELESS, true) \
|
152
|
-
ABSL_LOG_INTERNAL_CHECK(absl::implicit_cast<
|
151
|
+
ABSL_LOG_INTERNAL_CHECK(::absl::implicit_cast<const char* absl_nonnull>( \
|
153
152
|
absl_log_internal_check_ok_goo.second)) \
|
154
153
|
.InternalStream()
|
155
154
|
#define ABSL_LOG_INTERNAL_QCHECK_OK(val, val_text) \
|
156
|
-
for (::std::pair<
|
157
|
-
|
155
|
+
for (::std::pair<const ::absl::Status* absl_nonnull, \
|
156
|
+
const char* absl_nullable> \
|
158
157
|
absl_log_internal_qcheck_ok_goo; \
|
159
158
|
absl_log_internal_qcheck_ok_goo.first = \
|
160
159
|
::absl::log_internal::AsStatus(val), \
|
@@ -167,7 +166,7 @@
|
|
167
166
|
" is OK")), \
|
168
167
|
!ABSL_PREDICT_TRUE(absl_log_internal_qcheck_ok_goo.first->ok());) \
|
169
168
|
ABSL_LOG_INTERNAL_CONDITION_QFATAL(STATELESS, true) \
|
170
|
-
ABSL_LOG_INTERNAL_QCHECK(absl::implicit_cast<
|
169
|
+
ABSL_LOG_INTERNAL_QCHECK(::absl::implicit_cast<const char* absl_nonnull>( \
|
171
170
|
absl_log_internal_qcheck_ok_goo.second)) \
|
172
171
|
.InternalStream()
|
173
172
|
|
@@ -179,9 +178,8 @@ template <typename T>
|
|
179
178
|
class StatusOr;
|
180
179
|
|
181
180
|
namespace status_internal {
|
182
|
-
ABSL_ATTRIBUTE_PURE_FUNCTION
|
183
|
-
|
184
|
-
absl::Nonnull<const char*> prefix);
|
181
|
+
ABSL_ATTRIBUTE_PURE_FUNCTION const char* absl_nonnull MakeCheckFailString(
|
182
|
+
const absl::Status* absl_nonnull status, const char* absl_nonnull prefix);
|
185
183
|
} // namespace status_internal
|
186
184
|
|
187
185
|
namespace log_internal {
|
@@ -189,11 +187,11 @@ namespace log_internal {
|
|
189
187
|
// Convert a Status or a StatusOr to its underlying status value.
|
190
188
|
//
|
191
189
|
// (This implementation does not require a dep on absl::Status to work.)
|
192
|
-
inline
|
190
|
+
inline const absl::Status* absl_nonnull AsStatus(const absl::Status& s) {
|
193
191
|
return &s;
|
194
192
|
}
|
195
193
|
template <typename T>
|
196
|
-
|
194
|
+
const absl::Status* absl_nonnull AsStatus(const absl::StatusOr<T>& s) {
|
197
195
|
return &s.status();
|
198
196
|
}
|
199
197
|
|
@@ -202,14 +200,14 @@ absl::Nonnull<const absl::Status*> AsStatus(const absl::StatusOr<T>& s) {
|
|
202
200
|
class CheckOpMessageBuilder final {
|
203
201
|
public:
|
204
202
|
// Inserts `exprtext` and ` (` to the stream.
|
205
|
-
explicit CheckOpMessageBuilder(
|
203
|
+
explicit CheckOpMessageBuilder(const char* absl_nonnull exprtext);
|
206
204
|
~CheckOpMessageBuilder() = default;
|
207
205
|
// For inserting the first variable.
|
208
206
|
std::ostream& ForVar1() { return stream_; }
|
209
207
|
// For inserting the second variable (adds an intermediate ` vs. `).
|
210
208
|
std::ostream& ForVar2();
|
211
209
|
// Get the result (inserts the closing `)`).
|
212
|
-
|
210
|
+
const char* absl_nonnull NewString();
|
213
211
|
|
214
212
|
private:
|
215
213
|
std::ostringstream stream_;
|
@@ -226,7 +224,7 @@ inline void MakeCheckOpValueString(std::ostream& os, const T& v) {
|
|
226
224
|
void MakeCheckOpValueString(std::ostream& os, char v);
|
227
225
|
void MakeCheckOpValueString(std::ostream& os, signed char v);
|
228
226
|
void MakeCheckOpValueString(std::ostream& os, unsigned char v);
|
229
|
-
void MakeCheckOpValueString(std::ostream& os, const void* p);
|
227
|
+
void MakeCheckOpValueString(std::ostream& os, const void* absl_nullable p);
|
230
228
|
|
231
229
|
namespace detect_specialization {
|
232
230
|
|
@@ -268,8 +266,9 @@ float operator<<(std::ostream&, float value);
|
|
268
266
|
double operator<<(std::ostream&, double value);
|
269
267
|
long double operator<<(std::ostream&, long double value);
|
270
268
|
bool operator<<(std::ostream&, bool value);
|
271
|
-
const void* operator<<(std::ostream&,
|
272
|
-
const void*
|
269
|
+
const void* absl_nullable operator<<(std::ostream&,
|
270
|
+
const void* absl_nullable value);
|
271
|
+
const void* absl_nullable operator<<(std::ostream&, std::nullptr_t);
|
273
272
|
|
274
273
|
// These `char` overloads are specified like this in the standard, so we have to
|
275
274
|
// write them exactly the same to ensure the call is ambiguous.
|
@@ -283,13 +282,14 @@ signed char operator<<(std::basic_ostream<char, Traits>&, signed char);
|
|
283
282
|
template <typename Traits>
|
284
283
|
unsigned char operator<<(std::basic_ostream<char, Traits>&, unsigned char);
|
285
284
|
template <typename Traits>
|
286
|
-
const char* operator<<(std::basic_ostream<char, Traits>&,
|
285
|
+
const char* absl_nonnull operator<<(std::basic_ostream<char, Traits>&,
|
286
|
+
const char* absl_nonnull);
|
287
287
|
template <typename Traits>
|
288
|
-
const signed char* operator<<(std::basic_ostream<char, Traits>&,
|
289
|
-
|
288
|
+
const signed char* absl_nonnull operator<<(std::basic_ostream<char, Traits>&,
|
289
|
+
const signed char* absl_nonnull);
|
290
290
|
template <typename Traits>
|
291
|
-
const unsigned char* operator<<(std::basic_ostream<char, Traits>&,
|
292
|
-
|
291
|
+
const unsigned char* absl_nonnull operator<<(std::basic_ostream<char, Traits>&,
|
292
|
+
const unsigned char* absl_nonnull);
|
293
293
|
|
294
294
|
// This overload triggers when the call is not ambiguous.
|
295
295
|
// It means that T is being printed with some overload not on this list.
|
@@ -314,7 +314,8 @@ class StringifySink {
|
|
314
314
|
|
315
315
|
void Append(absl::string_view text);
|
316
316
|
void Append(size_t length, char ch);
|
317
|
-
friend void AbslFormatFlush(StringifySink* sink,
|
317
|
+
friend void AbslFormatFlush(StringifySink* absl_nonnull sink,
|
318
|
+
absl::string_view text);
|
318
319
|
|
319
320
|
private:
|
320
321
|
std::ostream& os_;
|
@@ -352,12 +353,12 @@ using CheckOpStreamType = decltype(detect_specialization::Detect<T>(0));
|
|
352
353
|
|
353
354
|
// Build the error message string. Specify no inlining for code size.
|
354
355
|
template <typename T1, typename T2>
|
355
|
-
ABSL_ATTRIBUTE_RETURNS_NONNULL
|
356
|
-
T1 v1, T2 v2,
|
356
|
+
ABSL_ATTRIBUTE_RETURNS_NONNULL const char* absl_nonnull MakeCheckOpString(
|
357
|
+
T1 v1, T2 v2, const char* absl_nonnull exprtext) ABSL_ATTRIBUTE_NOINLINE;
|
357
358
|
|
358
359
|
template <typename T1, typename T2>
|
359
|
-
|
360
|
-
|
360
|
+
const char* absl_nonnull MakeCheckOpString(T1 v1, T2 v2,
|
361
|
+
const char* absl_nonnull exprtext) {
|
361
362
|
CheckOpMessageBuilder comb(exprtext);
|
362
363
|
MakeCheckOpValueString(comb.ForVar1(), v1);
|
363
364
|
MakeCheckOpValueString(comb.ForVar2(), v2);
|
@@ -367,8 +368,8 @@ absl::Nonnull<const char*> MakeCheckOpString(
|
|
367
368
|
// Add a few commonly used instantiations as extern to reduce size of objects
|
368
369
|
// files.
|
369
370
|
#define ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(x) \
|
370
|
-
extern template
|
371
|
-
x, x,
|
371
|
+
extern template const char* absl_nonnull MakeCheckOpString( \
|
372
|
+
x, x, const char* absl_nonnull)
|
372
373
|
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(bool);
|
373
374
|
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(int64_t);
|
374
375
|
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(uint64_t);
|
@@ -378,10 +379,12 @@ ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(char);
|
|
378
379
|
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(unsigned char);
|
379
380
|
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(const std::string&);
|
380
381
|
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(const absl::string_view&);
|
381
|
-
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(const char*);
|
382
|
-
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(
|
383
|
-
|
384
|
-
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(
|
382
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(const char* absl_nonnull);
|
383
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(
|
384
|
+
const signed char* absl_nonnull);
|
385
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(
|
386
|
+
const unsigned char* absl_nonnull);
|
387
|
+
ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(const void* absl_nonnull);
|
385
388
|
#undef ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN
|
386
389
|
|
387
390
|
// `ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT` skips formatting the Check_OP result
|
@@ -404,8 +407,8 @@ ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(const void*);
|
|
404
407
|
// type.
|
405
408
|
#define ABSL_LOG_INTERNAL_CHECK_OP_IMPL(name, op) \
|
406
409
|
template <typename T1, typename T2> \
|
407
|
-
inline constexpr
|
408
|
-
const T1& v1, const T2& v2,
|
410
|
+
inline constexpr const char* absl_nullable name##Impl( \
|
411
|
+
const T1& v1, const T2& v2, const char* absl_nonnull exprtext) { \
|
409
412
|
using U1 = CheckOpStreamType<T1>; \
|
410
413
|
using U2 = CheckOpStreamType<T2>; \
|
411
414
|
return ABSL_PREDICT_TRUE(v1 op v2) \
|
@@ -413,8 +416,8 @@ ABSL_LOG_INTERNAL_DEFINE_MAKE_CHECK_OP_STRING_EXTERN(const void*);
|
|
413
416
|
: ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT(U1, U2, U1(v1), \
|
414
417
|
U2(v2), exprtext); \
|
415
418
|
} \
|
416
|
-
inline constexpr
|
417
|
-
int v1, int v2,
|
419
|
+
inline constexpr const char* absl_nullable name##Impl( \
|
420
|
+
int v1, int v2, const char* absl_nonnull exprtext) { \
|
418
421
|
return name##Impl<int, int>(v1, v2, exprtext); \
|
419
422
|
}
|
420
423
|
|
@@ -427,18 +430,18 @@ ABSL_LOG_INTERNAL_CHECK_OP_IMPL(Check_GT, >)
|
|
427
430
|
#undef ABSL_LOG_INTERNAL_CHECK_OP_IMPL_RESULT
|
428
431
|
#undef ABSL_LOG_INTERNAL_CHECK_OP_IMPL
|
429
432
|
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
433
|
+
const char* absl_nullable CheckstrcmptrueImpl(
|
434
|
+
const char* absl_nullable s1, const char* absl_nullable s2,
|
435
|
+
const char* absl_nonnull exprtext);
|
436
|
+
const char* absl_nullable CheckstrcmpfalseImpl(
|
437
|
+
const char* absl_nullable s1, const char* absl_nullable s2,
|
438
|
+
const char* absl_nonnull exprtext);
|
439
|
+
const char* absl_nullable CheckstrcasecmptrueImpl(
|
440
|
+
const char* absl_nullable s1, const char* absl_nullable s2,
|
441
|
+
const char* absl_nonnull exprtext);
|
442
|
+
const char* absl_nullable CheckstrcasecmpfalseImpl(
|
443
|
+
const char* absl_nullable s1, const char* absl_nullable s2,
|
444
|
+
const char* absl_nonnull exprtext);
|
442
445
|
|
443
446
|
// `CHECK_EQ` and friends want to pass their arguments by reference, however
|
444
447
|
// this winds up exposing lots of cases where people have defined and
|