grpc 1.52.0 → 1.53.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Makefile +50 -5
- data/include/grpc/event_engine/event_engine.h +24 -2
- data/include/grpc/event_engine/slice_buffer.h +13 -1
- data/include/grpc/impl/grpc_types.h +3 -0
- data/include/grpc/support/time.h +6 -4
- data/src/core/ext/filters/backend_metrics/backend_metric_filter.cc +148 -0
- data/src/core/ext/filters/backend_metrics/backend_metric_filter.h +52 -0
- data/src/core/ext/filters/backend_metrics/backend_metric_provider.h +29 -0
- data/src/core/ext/filters/channel_idle/channel_idle_filter.h +3 -3
- data/src/core/ext/filters/channel_idle/idle_filter_state.h +3 -3
- data/src/core/ext/filters/client_channel/backend_metric.h +3 -3
- data/src/core/ext/filters/client_channel/backup_poller.h +3 -3
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +1 -1
- data/src/core/ext/filters/client_channel/client_channel.cc +29 -33
- data/src/core/ext/filters/client_channel/client_channel.h +3 -3
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +3 -3
- data/src/core/ext/filters/client_channel/client_channel_factory.h +3 -3
- data/src/core/ext/filters/client_channel/client_channel_service_config.h +3 -3
- data/src/core/ext/filters/client_channel/config_selector.h +3 -3
- data/src/core/ext/filters/client_channel/connector.h +8 -4
- data/src/core/ext/filters/client_channel/dynamic_filters.h +3 -3
- data/src/core/ext/filters/client_channel/global_subchannel_pool.h +3 -3
- data/src/core/ext/filters/client_channel/health/health_check_client.h +3 -3
- data/src/core/ext/filters/client_channel/http_proxy.h +3 -3
- data/src/core/ext/filters/client_channel/lb_call_state_internal.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +14 -7
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +1 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc +1 -78
- data/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h +117 -0
- data/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +1 -0
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc +128 -0
- data/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h +71 -0
- data/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc +972 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +3 -6
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_attributes.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +12 -7
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc +275 -107
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h +10 -3
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc +5 -0
- data/src/core/ext/filters/client_channel/local_subchannel_pool.h +3 -3
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +3 -3
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +6 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +1 -2
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +3 -3
- data/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h +3 -3
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +3 -3
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +1 -0
- data/src/core/ext/filters/client_channel/resolver/polling_resolver.h +3 -3
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +3 -7
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h +3 -3
- data/src/core/ext/filters/client_channel/retry_filter.cc +10 -13
- data/src/core/ext/filters/client_channel/retry_filter.h +3 -3
- data/src/core/ext/filters/client_channel/retry_service_config.h +3 -3
- data/src/core/ext/filters/client_channel/retry_throttle.h +3 -3
- data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +4 -4
- data/src/core/ext/filters/client_channel/subchannel.cc +5 -1
- data/src/core/ext/filters/client_channel/subchannel.h +3 -3
- data/src/core/ext/filters/client_channel/subchannel_interface_internal.h +3 -3
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +3 -3
- data/src/core/ext/filters/client_channel/subchannel_stream_client.h +3 -3
- data/src/core/ext/filters/deadline/deadline_filter.cc +40 -48
- data/src/core/ext/filters/deadline/deadline_filter.h +6 -10
- data/src/core/ext/filters/fault_injection/fault_injection_filter.h +3 -3
- data/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h +3 -3
- data/src/core/ext/filters/http/client/http_client_filter.cc +26 -21
- data/src/core/ext/filters/http/client/http_client_filter.h +3 -3
- data/src/core/ext/filters/http/client_authority_filter.h +3 -3
- data/src/core/ext/filters/http/message_compress/compression_filter.cc +109 -117
- data/src/core/ext/filters/http/message_compress/compression_filter.h +17 -10
- data/src/core/ext/filters/http/server/http_server_filter.cc +25 -24
- data/src/core/ext/filters/http/server/http_server_filter.h +3 -3
- data/src/core/ext/filters/message_size/message_size_filter.cc +2 -1
- data/src/core/ext/filters/message_size/message_size_filter.h +3 -3
- data/src/core/ext/filters/rbac/rbac_filter.cc +4 -3
- data/src/core/ext/filters/rbac/rbac_filter.h +3 -3
- data/src/core/ext/filters/rbac/rbac_service_config_parser.h +3 -3
- data/src/core/ext/filters/server_config_selector/server_config_selector.h +3 -3
- data/src/core/ext/filters/server_config_selector/server_config_selector_filter.h +3 -3
- data/src/core/ext/filters/stateful_session/stateful_session_filter.cc +27 -37
- data/src/core/ext/filters/stateful_session/stateful_session_filter.h +5 -5
- data/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h +3 -3
- data/src/core/ext/transport/chttp2/alpn/alpn.h +3 -3
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +2 -7
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +3 -3
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +1 -0
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +3 -3
- data/src/core/ext/transport/chttp2/transport/bin_decoder.h +3 -3
- data/src/core/ext/transport/chttp2/transport/bin_encoder.h +3 -3
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +195 -111
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +3 -3
- data/src/core/ext/transport/chttp2/transport/context_list.h +3 -3
- data/src/core/ext/transport/chttp2/transport/decode_huff.h +3 -3
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +1 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +2 -0
- data/src/core/ext/transport/chttp2/transport/frame_data.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +2 -0
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +1 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +2 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +1 -0
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +2 -0
- data/src/core/ext/transport/chttp2/transport/frame_window_update.h +3 -3
- data/src/core/ext/transport/chttp2/transport/hpack_constants.h +3 -3
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +3 -3
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.h +3 -3
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +18 -407
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +3 -3
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +1 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +3 -3
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +3 -3
- data/src/core/ext/transport/chttp2/transport/http_trace.h +3 -3
- data/src/core/ext/transport/chttp2/transport/huffsyms.h +3 -3
- data/src/core/ext/transport/chttp2/transport/internal.h +28 -23
- data/src/core/ext/transport/chttp2/transport/parsing.cc +111 -31
- data/src/core/ext/transport/chttp2/transport/stream_map.h +3 -3
- data/src/core/ext/transport/chttp2/transport/varint.h +3 -3
- data/src/core/ext/transport/chttp2/transport/writing.cc +9 -8
- data/src/core/ext/transport/inproc/inproc_transport.h +3 -3
- data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.c +3 -2
- data/src/core/ext/upb-generated/envoy/admin/v3/clusters.upb.h +9 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump_shared.upb.c +38 -2
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump_shared.upb.h +185 -0
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c +7 -3
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h +44 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +16 -25
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +48 -74
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +30 -7
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +137 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +15 -12
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +83 -51
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +3 -2
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +15 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c +17 -2
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +61 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +11 -5
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +37 -6
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +5 -3
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +24 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.c +5 -3
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.h +22 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +6 -3
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +24 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +24 -5
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +50 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +57 -16
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +254 -17
- data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.c +3 -2
- data/src/core/ext/upb-generated/envoy/config/trace/v3/datadog.upb.h +9 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opentelemetry.upb.c +3 -2
- data/src/core/ext/upb-generated/envoy/config/trace/v3/opentelemetry.upb.h +9 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.c +7 -6
- data/src/core/ext/upb-generated/envoy/config/trace/v3/zipkin.upb.h +21 -12
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c +6 -3
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h +23 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +10 -7
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +42 -12
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.c +54 -0
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.h +188 -0
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/common/v3/common.upb.c +111 -0
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/common/v3/common.upb.h +444 -0
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.c +7 -3
- data/src/core/ext/upb-generated/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.h +24 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +8 -6
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +31 -9
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +5 -3
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +24 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/filter_state.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/filter_state.upb.h +113 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/status_code_input.upb.c +43 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/status_code_input.upb.h +114 -0
- data/src/core/ext/upb-generated/envoy/type/v3/ratelimit_unit.upb.h +3 -1
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/clusters.upbdefs.c +54 -53
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump_shared.upbdefs.c +34 -13
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump_shared.upbdefs.h +10 -0
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +195 -187
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +232 -224
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +0 -5
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c +95 -75
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +94 -93
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c +81 -75
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +189 -187
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c +7 -3
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +71 -66
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +137 -133
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.c +16 -12
- data/src/core/ext/upbdefs-generated/envoy/config/rbac/v3/rbac.upbdefs.c +140 -133
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +81 -70
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +771 -741
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +10 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/datadog.upbdefs.c +16 -14
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/opentelemetry.upbdefs.c +14 -13
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/zipkin.upbdefs.c +20 -18
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c +53 -42
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +363 -356
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +149 -145
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c +16 -13
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/filter_state.upbdefs.c +48 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/filter_state.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +14 -14
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/status_code_input.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/status_code_input.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/ratelimit_unit.upbdefs.c +10 -9
- data/src/core/ext/xds/certificate_provider_store.h +3 -3
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +1 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.h +3 -3
- data/src/core/ext/xds/upb_utils.h +3 -3
- data/src/core/ext/xds/xds_api.h +3 -3
- data/src/core/ext/xds/xds_bootstrap.h +3 -3
- data/src/core/ext/xds/xds_bootstrap_grpc.cc +1 -0
- data/src/core/ext/xds/xds_bootstrap_grpc.h +3 -3
- data/src/core/ext/xds/xds_certificate_provider.h +3 -3
- data/src/core/ext/xds/xds_channel_args.h +3 -3
- data/src/core/ext/xds/xds_channel_stack_modifier.h +3 -3
- data/src/core/ext/xds/xds_client.cc +8 -3
- data/src/core/ext/xds/xds_client.h +3 -3
- data/src/core/ext/xds/xds_client_grpc.cc +0 -1
- data/src/core/ext/xds/xds_client_grpc.h +3 -3
- data/src/core/ext/xds/xds_client_stats.h +4 -3
- data/src/core/ext/xds/xds_cluster.cc +11 -7
- data/src/core/ext/xds/xds_cluster.h +6 -6
- data/src/core/ext/xds/xds_cluster_specifier_plugin.h +3 -3
- data/src/core/ext/xds/xds_common_types.cc +1 -0
- data/src/core/ext/xds/xds_common_types.h +3 -3
- data/src/core/ext/xds/xds_endpoint.cc +1 -1
- data/src/core/ext/xds/xds_endpoint.h +3 -3
- data/src/core/ext/xds/xds_health_status.h +30 -3
- data/src/core/ext/xds/xds_http_fault_filter.h +3 -3
- data/src/core/ext/xds/xds_http_filters.cc +1 -1
- data/src/core/ext/xds/xds_http_filters.h +3 -3
- data/src/core/ext/xds/xds_http_rbac_filter.h +3 -3
- data/src/core/ext/xds/xds_http_stateful_session_filter.h +3 -3
- data/src/core/ext/xds/xds_lb_policy_registry.cc +95 -0
- data/src/core/ext/xds/xds_lb_policy_registry.h +3 -3
- data/src/core/ext/xds/xds_listener.cc +1 -0
- data/src/core/ext/xds/xds_listener.h +3 -3
- data/src/core/ext/xds/xds_resource_type.h +3 -3
- data/src/core/ext/xds/xds_resource_type_impl.h +3 -3
- data/src/core/ext/xds/xds_route_config.cc +6 -0
- data/src/core/ext/xds/xds_route_config.h +3 -3
- data/src/core/ext/xds/xds_routing.h +3 -3
- data/src/core/ext/xds/xds_transport.h +3 -3
- data/src/core/ext/xds/xds_transport_grpc.h +3 -3
- data/src/core/lib/address_utils/parse_address.h +3 -3
- data/src/core/lib/address_utils/sockaddr_utils.cc +1 -0
- data/src/core/lib/address_utils/sockaddr_utils.h +3 -3
- data/src/core/lib/avl/avl.h +3 -3
- data/src/core/lib/backoff/backoff.h +3 -3
- data/src/core/lib/channel/call_finalization.h +3 -3
- data/src/core/lib/channel/call_tracer.h +3 -3
- data/src/core/lib/channel/channel_args.cc +1 -0
- data/src/core/lib/channel/channel_args.h +11 -5
- data/src/core/lib/channel/channel_args_preconditioning.h +3 -3
- data/src/core/lib/channel/channel_fwd.h +3 -3
- data/src/core/lib/channel/channel_stack.cc +1 -2
- data/src/core/lib/channel/channel_stack.h +4 -4
- data/src/core/lib/channel/channel_stack_builder.h +3 -3
- data/src/core/lib/channel/channel_stack_builder_impl.cc +14 -1
- data/src/core/lib/channel/channel_stack_builder_impl.h +3 -3
- data/src/core/lib/channel/channel_trace.h +3 -3
- data/src/core/lib/channel/channelz.h +3 -3
- data/src/core/lib/channel/channelz_registry.h +3 -3
- data/src/core/lib/channel/connected_channel.cc +883 -354
- data/src/core/lib/channel/connected_channel.h +3 -3
- data/src/core/lib/channel/context.h +7 -3
- data/src/core/lib/channel/promise_based_filter.cc +532 -260
- data/src/core/lib/channel/promise_based_filter.h +124 -44
- data/src/core/lib/channel/status_util.h +3 -3
- data/src/core/lib/compression/compression_internal.h +3 -3
- data/src/core/lib/compression/message_compress.h +3 -3
- data/src/core/lib/config/core_configuration.h +3 -3
- data/src/core/lib/debug/event_log.h +3 -3
- data/src/core/lib/debug/histogram_view.h +3 -3
- data/src/core/lib/debug/stats.h +3 -3
- data/src/core/lib/debug/stats_data.cc +66 -65
- data/src/core/lib/debug/stats_data.h +42 -33
- data/src/core/lib/debug/trace.h +4 -26
- data/src/core/lib/event_engine/channel_args_endpoint_config.cc +5 -0
- data/src/core/lib/event_engine/channel_args_endpoint_config.h +3 -3
- data/src/core/lib/event_engine/common_closures.h +3 -3
- data/src/core/lib/event_engine/default_event_engine.cc +9 -4
- data/src/core/lib/event_engine/default_event_engine.h +30 -6
- data/src/core/lib/event_engine/default_event_engine_factory.h +3 -3
- data/src/core/lib/event_engine/event_engine.cc +25 -0
- data/src/core/lib/event_engine/executor/executor.h +3 -3
- data/src/core/lib/event_engine/forkable.cc +11 -6
- data/src/core/lib/event_engine/forkable.h +3 -3
- data/src/core/lib/event_engine/handle_containers.h +10 -3
- data/src/core/lib/event_engine/poller.h +3 -3
- data/src/core/lib/event_engine/posix.h +158 -0
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +44 -16
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h +14 -4
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +6 -7
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.h +3 -3
- data/src/core/lib/event_engine/posix_engine/event_poller.h +3 -3
- data/src/core/lib/event_engine/posix_engine/event_poller_posix_default.h +3 -3
- data/src/core/lib/event_engine/posix_engine/internal_errqueue.h +3 -3
- data/src/core/lib/event_engine/posix_engine/lockfree_event.h +3 -3
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +52 -55
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +46 -13
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +82 -12
- data/src/core/lib/event_engine/posix_engine/posix_engine.h +23 -9
- data/src/core/lib/event_engine/posix_engine/posix_engine_closure.h +3 -3
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +60 -7
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.h +65 -14
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +0 -1
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h +6 -6
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +3 -3
- data/src/core/lib/event_engine/posix_engine/timer.h +3 -3
- data/src/core/lib/event_engine/posix_engine/timer_heap.h +3 -3
- data/src/core/lib/event_engine/posix_engine/timer_manager.h +3 -3
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.h +3 -3
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h +3 -3
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h +3 -3
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h +3 -3
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h +3 -3
- data/src/core/lib/event_engine/resolved_address.cc +19 -0
- data/src/core/lib/event_engine/resolved_address_internal.h +34 -0
- data/src/core/lib/event_engine/shim.cc +56 -0
- data/src/core/lib/event_engine/shim.h +33 -0
- data/src/core/lib/event_engine/slice.cc +1 -1
- data/src/core/lib/event_engine/tcp_socket_utils.cc +18 -2
- data/src/core/lib/event_engine/tcp_socket_utils.h +8 -3
- data/src/core/lib/event_engine/thread_local.cc +29 -0
- data/src/core/lib/event_engine/thread_local.h +32 -0
- data/src/core/lib/event_engine/thread_pool.cc +41 -65
- data/src/core/lib/event_engine/thread_pool.h +21 -17
- data/src/core/lib/event_engine/time_util.h +3 -3
- data/src/core/lib/event_engine/trace.cc +6 -0
- data/src/core/lib/event_engine/trace.h +16 -3
- data/src/core/lib/event_engine/utils.cc +2 -2
- data/src/core/lib/event_engine/utils.h +12 -4
- data/src/core/lib/event_engine/windows/iocp.cc +24 -40
- data/src/core/lib/event_engine/windows/iocp.h +3 -3
- data/src/core/lib/event_engine/windows/win_socket.cc +56 -33
- data/src/core/lib/event_engine/windows/win_socket.h +34 -25
- data/src/core/lib/event_engine/windows/windows_endpoint.cc +331 -0
- data/src/core/lib/event_engine/windows/windows_endpoint.h +103 -0
- data/src/core/lib/event_engine/windows/windows_engine.cc +243 -20
- data/src/core/lib/event_engine/windows/windows_engine.h +62 -23
- data/src/core/lib/experiments/config.cc +16 -1
- data/src/core/lib/experiments/config.h +13 -3
- data/src/core/lib/experiments/experiments.cc +14 -8
- data/src/core/lib/experiments/experiments.h +80 -21
- data/src/core/lib/gpr/alloc.h +3 -3
- data/src/core/lib/gpr/spinlock.h +3 -3
- data/src/core/lib/gpr/string.h +3 -3
- data/src/core/lib/gpr/sync_abseil.cc +15 -7
- data/src/core/lib/gpr/time_precise.h +3 -3
- data/src/core/lib/gpr/tmpfile.h +3 -3
- data/src/core/lib/gpr/useful.h +3 -3
- data/src/core/lib/gprpp/atomic_utils.h +3 -3
- data/src/core/lib/gprpp/bitset.h +3 -3
- data/src/core/lib/gprpp/chunked_vector.h +3 -3
- data/src/core/lib/gprpp/construct_destruct.h +3 -3
- data/src/core/lib/gprpp/cpp_impl_of.h +3 -3
- data/src/core/lib/gprpp/crash.h +3 -3
- data/src/core/lib/gprpp/debug_location.h +3 -6
- data/src/core/lib/gprpp/dual_ref_counted.h +3 -3
- data/src/core/lib/gprpp/env.h +3 -3
- data/src/core/lib/gprpp/examine_stack.h +3 -3
- data/src/core/lib/gprpp/fork.cc +21 -4
- data/src/core/lib/gprpp/fork.h +7 -5
- data/src/core/lib/gprpp/global_config.h +3 -3
- data/src/core/lib/gprpp/global_config_custom.h +3 -3
- data/src/core/lib/gprpp/global_config_env.cc +1 -0
- data/src/core/lib/gprpp/global_config_env.h +3 -3
- data/src/core/lib/gprpp/global_config_generic.h +3 -3
- data/src/core/lib/gprpp/host_port.cc +2 -0
- data/src/core/lib/gprpp/host_port.h +3 -3
- data/src/core/lib/gprpp/load_file.h +3 -3
- data/src/core/lib/gprpp/manual_constructor.h +3 -3
- data/src/core/lib/gprpp/match.h +3 -3
- data/src/core/lib/gprpp/memory.h +3 -3
- data/src/core/lib/gprpp/mpscq.h +3 -3
- data/src/core/lib/gprpp/no_destruct.h +3 -3
- data/src/core/lib/gprpp/notification.h +3 -3
- data/src/core/lib/gprpp/orphanable.h +3 -3
- data/src/core/lib/gprpp/overload.h +3 -3
- data/src/core/lib/gprpp/packed_table.h +3 -3
- data/src/core/lib/gprpp/per_cpu.h +3 -3
- data/src/core/lib/gprpp/ref_counted.h +3 -3
- data/src/core/lib/gprpp/ref_counted_ptr.h +3 -3
- data/src/core/lib/gprpp/single_set_ptr.h +3 -3
- data/src/core/lib/gprpp/sorted_pack.h +3 -3
- data/src/core/lib/gprpp/stat.h +3 -3
- data/src/core/lib/gprpp/status_helper.h +3 -3
- data/src/core/lib/gprpp/strerror.cc +2 -0
- data/src/core/lib/gprpp/strerror.h +3 -3
- data/src/core/lib/gprpp/sync.h +3 -3
- data/src/core/lib/gprpp/table.h +3 -3
- data/src/core/lib/gprpp/tchar.h +3 -3
- data/src/core/lib/gprpp/thd.h +3 -3
- data/src/core/lib/gprpp/time.cc +1 -0
- data/src/core/lib/gprpp/time.h +3 -3
- data/src/core/lib/gprpp/time_averaged_stats.h +3 -3
- data/src/core/lib/gprpp/time_util.h +3 -3
- data/src/core/lib/gprpp/unique_type_name.h +3 -3
- data/src/core/lib/gprpp/validation_errors.h +3 -3
- data/src/core/lib/gprpp/work_serializer.h +3 -3
- data/src/core/lib/handshaker/proxy_mapper.h +3 -3
- data/src/core/lib/handshaker/proxy_mapper_registry.h +3 -3
- data/src/core/lib/http/format_request.cc +1 -0
- data/src/core/lib/http/format_request.h +3 -3
- data/src/core/lib/http/httpcli.cc +1 -0
- data/src/core/lib/http/httpcli.h +3 -3
- data/src/core/lib/http/httpcli_ssl_credentials.h +3 -3
- data/src/core/lib/http/parser.h +3 -3
- data/src/core/lib/iomgr/block_annotate.h +3 -3
- data/src/core/lib/iomgr/buffer_list.h +3 -3
- data/src/core/lib/iomgr/call_combiner.cc +4 -4
- data/src/core/lib/iomgr/call_combiner.h +3 -3
- data/src/core/lib/iomgr/cfstream_handle.h +3 -3
- data/src/core/lib/iomgr/closure.cc +27 -0
- data/src/core/lib/iomgr/closure.h +5 -3
- data/src/core/lib/iomgr/combiner.h +3 -3
- data/src/core/lib/iomgr/dynamic_annotations.h +3 -3
- data/src/core/lib/iomgr/endpoint.h +3 -3
- data/src/core/lib/iomgr/endpoint_cfstream.h +3 -3
- data/src/core/lib/iomgr/endpoint_pair.h +3 -3
- data/src/core/lib/iomgr/endpoint_pair_windows.cc +10 -2
- data/src/core/lib/iomgr/error.h +3 -3
- data/src/core/lib/iomgr/error_cfstream.h +3 -3
- data/src/core/lib/iomgr/ev_apple.h +3 -3
- data/src/core/lib/iomgr/ev_epoll1_linux.h +3 -3
- data/src/core/lib/iomgr/ev_poll_posix.h +3 -3
- data/src/core/lib/iomgr/ev_posix.h +3 -3
- data/src/core/lib/iomgr/event_engine_shims/closure.cc +62 -0
- data/src/core/lib/iomgr/event_engine_shims/closure.h +39 -0
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +430 -0
- data/src/core/lib/iomgr/event_engine_shims/endpoint.h +43 -0
- data/src/core/lib/iomgr/event_engine_shims/tcp_client.cc +91 -0
- data/src/core/lib/iomgr/event_engine_shims/tcp_client.h +44 -0
- data/src/core/lib/iomgr/exec_ctx.h +3 -3
- data/src/core/lib/iomgr/executor.h +3 -3
- data/src/core/lib/iomgr/fork_posix.cc +5 -4
- data/src/core/lib/iomgr/gethostname.h +3 -3
- data/src/core/lib/iomgr/grpc_if_nametoindex.h +3 -3
- data/src/core/lib/iomgr/internal_errqueue.h +3 -3
- data/src/core/lib/iomgr/iocp_windows.h +3 -3
- data/src/core/lib/iomgr/iomgr.h +3 -3
- data/src/core/lib/iomgr/iomgr_fwd.h +3 -3
- data/src/core/lib/iomgr/iomgr_internal.h +3 -3
- data/src/core/lib/iomgr/load_file.h +3 -3
- data/src/core/lib/iomgr/lockfree_event.h +3 -3
- data/src/core/lib/iomgr/nameser.h +3 -3
- data/src/core/lib/iomgr/polling_entity.h +3 -3
- data/src/core/lib/iomgr/pollset.h +3 -3
- data/src/core/lib/iomgr/pollset_set.h +3 -3
- data/src/core/lib/iomgr/pollset_set_windows.h +3 -3
- data/src/core/lib/iomgr/pollset_windows.cc +2 -2
- data/src/core/lib/iomgr/pollset_windows.h +3 -3
- data/src/core/lib/iomgr/port.h +3 -3
- data/src/core/lib/iomgr/python_util.h +3 -3
- data/src/core/lib/iomgr/resolve_address.h +3 -3
- data/src/core/lib/iomgr/resolve_address_impl.h +3 -3
- data/src/core/lib/iomgr/resolve_address_posix.h +3 -3
- data/src/core/lib/iomgr/resolve_address_windows.h +3 -3
- data/src/core/lib/iomgr/resolved_address.h +3 -3
- data/src/core/lib/iomgr/sockaddr.h +3 -3
- data/src/core/lib/iomgr/sockaddr_posix.h +3 -3
- data/src/core/lib/iomgr/sockaddr_windows.h +3 -3
- data/src/core/lib/iomgr/socket_factory_posix.h +3 -3
- data/src/core/lib/iomgr/socket_mutator.h +3 -3
- data/src/core/lib/iomgr/socket_utils.h +3 -3
- data/src/core/lib/iomgr/socket_utils_posix.h +3 -3
- data/src/core/lib/iomgr/socket_windows.h +3 -3
- data/src/core/lib/iomgr/systemd_utils.cc +19 -19
- data/src/core/lib/iomgr/systemd_utils.h +24 -24
- data/src/core/lib/iomgr/tcp_client.h +3 -3
- data/src/core/lib/iomgr/tcp_client_posix.cc +12 -0
- data/src/core/lib/iomgr/tcp_client_posix.h +3 -3
- data/src/core/lib/iomgr/tcp_client_windows.cc +13 -1
- data/src/core/lib/iomgr/tcp_posix.cc +49 -65
- data/src/core/lib/iomgr/tcp_posix.h +3 -3
- data/src/core/lib/iomgr/tcp_server.h +3 -3
- data/src/core/lib/iomgr/tcp_server_posix.cc +219 -4
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +13 -3
- data/src/core/lib/iomgr/tcp_server_windows.cc +4 -6
- data/src/core/lib/iomgr/tcp_windows.h +3 -3
- data/src/core/lib/iomgr/timer.h +3 -3
- data/src/core/lib/iomgr/timer_generic.h +3 -3
- data/src/core/lib/iomgr/timer_heap.h +3 -3
- data/src/core/lib/iomgr/timer_manager.h +3 -3
- data/src/core/lib/iomgr/unix_sockets_posix.h +3 -3
- data/src/core/lib/iomgr/wakeup_fd_pipe.h +3 -3
- data/src/core/lib/iomgr/wakeup_fd_posix.h +3 -3
- data/src/core/lib/json/json.h +3 -3
- data/src/core/lib/json/json_args.h +3 -3
- data/src/core/lib/json/json_channel_args.h +3 -3
- data/src/core/lib/json/json_object_loader.h +3 -3
- data/src/core/lib/json/json_reader.cc +1 -0
- data/src/core/lib/json/json_util.h +3 -3
- data/src/core/lib/load_balancing/lb_policy.cc +9 -0
- data/src/core/lib/load_balancing/lb_policy.h +9 -5
- data/src/core/lib/load_balancing/lb_policy_factory.h +3 -3
- data/src/core/lib/load_balancing/lb_policy_registry.cc +1 -0
- data/src/core/lib/load_balancing/lb_policy_registry.h +3 -3
- data/src/core/lib/load_balancing/subchannel_interface.h +8 -6
- data/src/core/lib/matchers/matchers.cc +1 -0
- data/src/core/lib/matchers/matchers.h +3 -3
- data/src/core/lib/promise/activity.cc +8 -6
- data/src/core/lib/promise/activity.h +52 -66
- data/src/core/lib/promise/arena_promise.h +3 -3
- data/src/core/lib/promise/context.h +3 -3
- data/src/core/lib/promise/detail/basic_join.h +197 -0
- data/src/core/lib/promise/detail/basic_seq.h +10 -16
- data/src/core/lib/promise/detail/promise_factory.h +3 -3
- data/src/core/lib/promise/detail/promise_like.h +3 -3
- data/src/core/lib/promise/detail/status.h +3 -3
- data/src/core/lib/promise/detail/switch.h +3 -3
- data/src/core/lib/promise/exec_ctx_wakeup_scheduler.h +3 -3
- data/src/core/lib/promise/if.h +195 -0
- data/src/core/lib/promise/interceptor_list.h +308 -0
- data/src/core/lib/promise/intra_activity_waiter.h +9 -3
- data/src/core/lib/promise/latch.h +99 -5
- data/src/core/lib/promise/loop.h +4 -4
- data/src/core/lib/promise/map.h +4 -6
- data/src/core/lib/promise/pipe.h +296 -193
- data/src/core/lib/promise/poll.h +113 -14
- data/src/core/lib/promise/promise.h +4 -5
- data/src/core/lib/promise/race.h +6 -9
- data/src/core/lib/promise/seq.h +3 -3
- data/src/core/lib/promise/sleep.h +3 -3
- data/src/core/lib/promise/{pipe.cc → trace.cc} +3 -2
- data/src/core/lib/promise/trace.h +24 -0
- data/src/core/lib/promise/try_join.h +82 -0
- data/src/core/lib/promise/try_seq.h +3 -3
- data/src/core/lib/resolver/resolver.h +3 -3
- data/src/core/lib/resolver/resolver_factory.h +4 -4
- data/src/core/lib/resolver/resolver_registry.cc +15 -0
- data/src/core/lib/resolver/resolver_registry.h +3 -3
- data/src/core/lib/resolver/server_address.cc +1 -0
- data/src/core/lib/resolver/server_address.h +3 -3
- data/src/core/lib/resource_quota/api.h +3 -3
- data/src/core/lib/resource_quota/arena.cc +36 -9
- data/src/core/lib/resource_quota/arena.h +84 -22
- data/src/core/lib/resource_quota/memory_quota.h +3 -3
- data/src/core/lib/resource_quota/periodic_update.h +3 -3
- data/src/core/lib/resource_quota/resource_quota.h +3 -3
- data/src/core/lib/resource_quota/thread_quota.h +3 -3
- data/src/core/lib/resource_quota/trace.h +3 -3
- data/src/core/lib/security/authorization/authorization_engine.h +3 -3
- data/src/core/lib/security/authorization/authorization_policy_provider.h +3 -3
- data/src/core/lib/security/authorization/evaluate_args.h +3 -3
- data/src/core/lib/security/authorization/grpc_authorization_engine.h +3 -3
- data/src/core/lib/security/authorization/grpc_server_authz_filter.h +3 -3
- data/src/core/lib/security/authorization/matchers.h +3 -3
- data/src/core/lib/security/authorization/rbac_policy.cc +1 -0
- data/src/core/lib/security/authorization/rbac_policy.h +3 -3
- data/src/core/lib/security/certificate_provider/certificate_provider_factory.h +3 -3
- data/src/core/lib/security/certificate_provider/certificate_provider_registry.h +3 -3
- data/src/core/lib/security/context/security_context.h +3 -3
- data/src/core/lib/security/credentials/alts/alts_credentials.h +3 -3
- data/src/core/lib/security/credentials/alts/check_gcp_environment.h +3 -3
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h +3 -3
- data/src/core/lib/security/credentials/call_creds_util.h +3 -3
- data/src/core/lib/security/credentials/channel_creds_registry.h +3 -3
- data/src/core/lib/security/credentials/composite/composite_credentials.h +3 -3
- data/src/core/lib/security/credentials/credentials.h +3 -3
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +1 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.h +3 -3
- data/src/core/lib/security/credentials/external/aws_request_signer.cc +1 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.h +3 -3
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +1 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.h +3 -3
- data/src/core/lib/security/credentials/external/file_external_account_credentials.h +3 -3
- data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +1 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.h +3 -3
- data/src/core/lib/security/credentials/fake/fake_credentials.h +3 -3
- data/src/core/lib/security/credentials/google_default/google_default_credentials.h +3 -3
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +1 -0
- data/src/core/lib/security/credentials/iam/iam_credentials.h +3 -3
- data/src/core/lib/security/credentials/insecure/insecure_credentials.h +3 -3
- data/src/core/lib/security/credentials/jwt/json_token.h +3 -3
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +4 -3
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +3 -3
- data/src/core/lib/security/credentials/local/local_credentials.h +3 -3
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +4 -3
- data/src/core/lib/security/credentials/plugin/plugin_credentials.h +3 -3
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +3 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +3 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +1 -1
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +3 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h +3 -3
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +3 -3
- data/src/core/lib/security/credentials/tls/tls_credentials.h +3 -3
- data/src/core/lib/security/credentials/tls/tls_utils.h +3 -3
- data/src/core/lib/security/credentials/xds/xds_credentials.h +3 -3
- data/src/core/lib/security/security_connector/alts/alts_security_connector.h +3 -3
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +1 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.h +3 -3
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +3 -3
- data/src/core/lib/security/security_connector/load_system_roots.h +3 -3
- data/src/core/lib/security/security_connector/load_system_roots_supported.h +3 -3
- data/src/core/lib/security/security_connector/local/local_security_connector.h +3 -3
- data/src/core/lib/security/security_connector/security_connector.h +3 -3
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +1 -0
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +3 -3
- data/src/core/lib/security/security_connector/ssl_utils.h +3 -3
- data/src/core/lib/security/security_connector/ssl_utils_config.h +3 -3
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +3 -3
- data/src/core/lib/security/transport/auth_filters.h +27 -5
- data/src/core/lib/security/transport/secure_endpoint.h +3 -3
- data/src/core/lib/security/transport/security_handshaker.cc +9 -0
- data/src/core/lib/security/transport/security_handshaker.h +3 -3
- data/src/core/lib/security/transport/server_auth_filter.cc +120 -251
- data/src/core/lib/security/transport/tsi_error.h +3 -3
- data/src/core/lib/security/util/json_util.h +3 -3
- data/src/core/lib/service_config/service_config.h +3 -3
- data/src/core/lib/service_config/service_config_call_data.h +3 -3
- data/src/core/lib/service_config/service_config_impl.h +3 -3
- data/src/core/lib/service_config/service_config_parser.h +3 -3
- data/src/core/lib/slice/b64.h +3 -3
- data/src/core/lib/slice/percent_encoding.h +3 -3
- data/src/core/lib/slice/slice.cc +3 -3
- data/src/core/lib/slice/slice.h +14 -21
- data/src/core/lib/slice/slice_buffer.h +10 -4
- data/src/core/lib/slice/slice_internal.h +3 -3
- data/src/core/lib/slice/slice_refcount.cc +20 -0
- data/src/core/lib/slice/slice_refcount.h +26 -6
- data/src/core/lib/slice/slice_string_helpers.h +3 -3
- data/src/core/lib/surface/api_trace.h +3 -3
- data/src/core/lib/surface/builtins.h +3 -3
- data/src/core/lib/surface/call.cc +866 -252
- data/src/core/lib/surface/call.h +31 -3
- data/src/core/lib/surface/call_log_batch.cc +1 -0
- data/src/core/lib/surface/call_test_only.h +3 -3
- data/src/core/lib/surface/call_trace.cc +21 -11
- data/src/core/lib/surface/call_trace.h +3 -3
- data/src/core/lib/surface/channel.h +3 -3
- data/src/core/lib/surface/channel_init.h +3 -3
- data/src/core/lib/surface/channel_stack_type.h +3 -3
- data/src/core/lib/surface/completion_queue.cc +1 -0
- data/src/core/lib/surface/completion_queue.h +3 -3
- data/src/core/lib/surface/completion_queue_factory.h +3 -3
- data/src/core/lib/surface/event_string.cc +1 -0
- data/src/core/lib/surface/event_string.h +3 -3
- data/src/core/lib/surface/init.cc +1 -1
- data/src/core/lib/surface/init.h +3 -3
- data/src/core/lib/surface/init_internally.h +3 -3
- data/src/core/lib/surface/lame_client.cc +3 -1
- data/src/core/lib/surface/lame_client.h +3 -3
- data/src/core/lib/surface/server.cc +273 -27
- data/src/core/lib/surface/server.h +6 -3
- data/src/core/lib/surface/validate_metadata.h +3 -3
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/bdp_estimator.h +3 -3
- data/src/core/lib/transport/connectivity_state.h +3 -3
- data/src/core/lib/transport/error_utils.h +3 -3
- data/src/core/lib/transport/handshaker.cc +11 -0
- data/src/core/lib/transport/handshaker.h +4 -4
- data/src/core/lib/transport/handshaker_factory.h +3 -3
- data/src/core/lib/transport/handshaker_registry.h +3 -3
- data/src/core/lib/transport/http2_errors.h +3 -3
- data/src/core/lib/transport/http_connect_handshaker.h +3 -3
- data/src/core/lib/transport/metadata_batch.cc +11 -0
- data/src/core/lib/transport/metadata_batch.h +24 -3
- data/src/core/lib/transport/parsed_metadata.h +3 -3
- data/src/core/lib/transport/pid_controller.h +3 -3
- data/src/core/lib/transport/status_conversion.h +3 -3
- data/src/core/lib/transport/tcp_connect_handshaker.cc +0 -1
- data/src/core/lib/transport/tcp_connect_handshaker.h +3 -3
- data/src/core/lib/transport/timeout_encoding.h +3 -3
- data/src/core/lib/transport/transport.cc +3 -8
- data/src/core/lib/transport/transport.h +16 -8
- data/src/core/lib/transport/transport_fwd.h +3 -3
- data/src/core/lib/transport/transport_impl.h +3 -3
- data/src/core/lib/transport/transport_op_string.cc +1 -0
- data/src/core/lib/uri/uri_parser.cc +1 -1
- data/src/core/lib/uri/uri_parser.h +3 -3
- data/src/core/plugin_registry/grpc_plugin_registry.cc +5 -0
- data/src/core/tsi/alts/crypt/gsec.h +3 -3
- data/src/core/tsi/alts/frame_protector/alts_counter.h +3 -3
- data/src/core/tsi/alts/frame_protector/alts_crypter.h +3 -3
- data/src/core/tsi/alts/frame_protector/alts_frame_protector.h +3 -3
- data/src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.h +3 -3
- data/src/core/tsi/alts/frame_protector/frame_handler.h +3 -3
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +3 -3
- data/src/core/tsi/alts/handshaker/alts_shared_resource.h +3 -3
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +3 -3
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +3 -3
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.h +3 -3
- data/src/core/tsi/alts/handshaker/transport_security_common_api.h +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol.h +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h +3 -3
- data/src/core/tsi/fake_transport_security.h +3 -3
- data/src/core/tsi/local_transport_security.h +3 -3
- data/src/core/tsi/ssl/key_logging/ssl_key_logging.cc +1 -1
- data/src/core/tsi/ssl/key_logging/ssl_key_logging.h +3 -3
- data/src/core/tsi/ssl/session_cache/ssl_session.h +3 -3
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +3 -3
- data/src/core/tsi/ssl_transport_security.cc +113 -24
- data/src/core/tsi/ssl_transport_security.h +5 -3
- data/src/core/tsi/ssl_transport_security_utils.h +3 -3
- data/src/core/tsi/ssl_types.h +3 -3
- data/src/core/tsi/transport_security.h +3 -3
- data/src/core/tsi/transport_security_grpc.h +3 -3
- data/src/core/tsi/transport_security_interface.h +3 -3
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/generate_proto_ruby.sh +0 -6
- data/third_party/abseil-cpp/absl/algorithm/container.h +56 -57
- data/third_party/abseil-cpp/absl/base/attributes.h +39 -19
- data/third_party/abseil-cpp/absl/base/config.h +44 -3
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.h +3 -18
- data/third_party/abseil-cpp/absl/base/internal/cycleclock_config.h +55 -0
- data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +2 -1
- data/third_party/abseil-cpp/absl/base/internal/inline_variable.h +3 -3
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +2 -2
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h +1 -1
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +10 -6
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +23 -24
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +3 -3
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +2 -6
- data/third_party/abseil-cpp/absl/base/internal/spinlock_win32.inc +4 -1
- data/third_party/abseil-cpp/absl/base/internal/strerror.cc +4 -4
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +14 -10
- data/third_party/abseil-cpp/absl/base/internal/thread_annotations.h +9 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.h +4 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +3 -40
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h +62 -0
- data/third_party/abseil-cpp/absl/base/macros.h +4 -21
- data/third_party/abseil-cpp/absl/base/optimization.h +58 -6
- data/third_party/abseil-cpp/absl/base/options.h +1 -7
- data/third_party/abseil-cpp/absl/base/policy_checks.h +15 -13
- data/third_party/abseil-cpp/absl/container/fixed_array.h +7 -5
- data/third_party/abseil-cpp/absl/container/flat_hash_set.h +0 -7
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +66 -18
- data/third_party/abseil-cpp/absl/container/internal/common.h +3 -3
- data/third_party/abseil-cpp/absl/container/internal/common_policy_traits.h +132 -0
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +13 -1
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +4 -55
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +50 -5
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +14 -46
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +110 -32
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +155 -4
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +661 -341
- data/third_party/abseil-cpp/absl/crc/crc32c.cc +99 -0
- data/third_party/abseil-cpp/absl/crc/crc32c.h +183 -0
- data/third_party/abseil-cpp/absl/crc/internal/cpu_detect.cc +256 -0
- data/third_party/abseil-cpp/absl/crc/internal/cpu_detect.h +57 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc.cc +468 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc.h +91 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h +269 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc32c.h +39 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc32c_inline.h +72 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_cord_state.cc +130 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_cord_state.h +159 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_internal.h +179 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_memcpy.h +119 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_memcpy_fallback.cc +75 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_memcpy_x86_64.cc +434 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_non_temporal_memcpy.cc +93 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc +725 -0
- data/third_party/abseil-cpp/absl/crc/internal/non_temporal_arm_intrinsics.h +79 -0
- data/third_party/abseil-cpp/absl/crc/internal/non_temporal_memcpy.h +180 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +1 -1
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +67 -38
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.h +1 -1
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +12 -13
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +11 -9
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +1 -1
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +40 -85
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +5 -4
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +33 -8
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +3 -2
- data/third_party/abseil-cpp/absl/debugging/symbolize_darwin.inc +3 -2
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +118 -94
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +7 -6
- data/third_party/abseil-cpp/absl/functional/any_invocable.h +5 -2
- data/third_party/abseil-cpp/absl/functional/internal/any_invocable.h +47 -26
- data/third_party/abseil-cpp/absl/hash/internal/city.cc +10 -10
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +18 -4
- data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.cc +3 -14
- data/third_party/abseil-cpp/absl/memory/memory.h +26 -447
- data/third_party/abseil-cpp/absl/meta/type_traits.h +104 -12
- data/third_party/abseil-cpp/absl/numeric/bits.h +2 -3
- data/third_party/abseil-cpp/absl/numeric/int128.cc +10 -8
- data/third_party/abseil-cpp/absl/profiling/internal/sample_recorder.h +14 -6
- data/third_party/abseil-cpp/absl/random/internal/fast_uniform_bits.h +2 -1
- data/third_party/abseil-cpp/absl/random/internal/nonsecure_base.h +1 -1
- data/third_party/abseil-cpp/absl/random/internal/pcg_engine.h +2 -23
- data/third_party/abseil-cpp/absl/random/internal/pool_urbg.cc +9 -9
- data/third_party/abseil-cpp/absl/random/internal/seed_material.cc +2 -2
- data/third_party/abseil-cpp/absl/random/random.h +6 -6
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +1 -0
- data/third_party/abseil-cpp/absl/status/status.cc +19 -12
- data/third_party/abseil-cpp/absl/status/status.h +2 -2
- data/third_party/abseil-cpp/absl/strings/ascii.cc +5 -5
- data/third_party/abseil-cpp/absl/strings/charconv.cc +534 -96
- data/third_party/abseil-cpp/absl/strings/cord.cc +92 -40
- data/third_party/abseil-cpp/absl/strings/cord.h +71 -80
- data/third_party/abseil-cpp/absl/strings/cord_buffer.h +8 -5
- data/third_party/abseil-cpp/absl/strings/escaping.cc +73 -62
- data/third_party/abseil-cpp/absl/strings/escaping.h +24 -19
- data/third_party/abseil-cpp/absl/strings/internal/char_map.h +14 -12
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +4 -4
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +2 -2
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +326 -70
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.cc +8 -4
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.h +26 -14
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.cc +5 -5
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.cc +9 -7
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.h +5 -4
- data/third_party/abseil-cpp/absl/strings/internal/cordz_functions.h +7 -15
- data/third_party/abseil-cpp/absl/strings/internal/cordz_handle.h +3 -3
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.cc +8 -5
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.h +7 -7
- data/third_party/abseil-cpp/absl/strings/internal/cordz_statistics.h +4 -4
- data/third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.cc +93 -0
- data/third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.h +34 -0
- data/third_party/abseil-cpp/absl/strings/internal/escaping.cc +12 -10
- data/third_party/abseil-cpp/absl/strings/internal/escaping.h +7 -9
- data/third_party/abseil-cpp/absl/strings/internal/has_absl_stringify.h +55 -0
- data/third_party/abseil-cpp/absl/strings/internal/memutil.cc +9 -6
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.cc +14 -7
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.h +35 -10
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +113 -46
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +126 -29
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +3 -2
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +4 -3
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +49 -287
- data/third_party/abseil-cpp/absl/strings/internal/str_format/constexpr_parser.h +351 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +2 -1
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +4 -2
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +215 -181
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +10 -209
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +10 -101
- data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +2 -1
- data/third_party/abseil-cpp/absl/strings/internal/stringify_sink.cc +28 -0
- data/third_party/abseil-cpp/absl/strings/internal/stringify_sink.h +57 -0
- data/third_party/abseil-cpp/absl/strings/numbers.cc +34 -31
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +9 -6
- data/third_party/abseil-cpp/absl/strings/str_cat.h +50 -3
- data/third_party/abseil-cpp/absl/strings/str_format.h +71 -9
- data/third_party/abseil-cpp/absl/strings/string_view.cc +6 -6
- data/third_party/abseil-cpp/absl/strings/string_view.h +3 -10
- data/third_party/abseil-cpp/absl/strings/substitute.cc +8 -6
- data/third_party/abseil-cpp/absl/strings/substitute.h +46 -20
- data/third_party/abseil-cpp/absl/synchronization/internal/futex.h +20 -17
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +37 -31
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +22 -8
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +104 -55
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +85 -46
- data/third_party/abseil-cpp/absl/synchronization/notification.cc +0 -1
- data/third_party/abseil-cpp/absl/synchronization/notification.h +0 -1
- data/third_party/abseil-cpp/absl/time/civil_time.cc +26 -0
- data/third_party/abseil-cpp/absl/time/civil_time.h +25 -0
- data/third_party/abseil-cpp/absl/time/clock.cc +17 -11
- data/third_party/abseil-cpp/absl/time/duration.cc +7 -7
- data/third_party/abseil-cpp/absl/time/format.cc +2 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +1 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc +26 -5
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +7 -6
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc +36 -35
- data/third_party/abseil-cpp/absl/time/time.cc +2 -2
- data/third_party/abseil-cpp/absl/time/time.h +253 -158
- data/third_party/abseil-cpp/absl/types/internal/span.h +30 -19
- data/third_party/abseil-cpp/absl/types/internal/variant.h +28 -40
- data/third_party/abseil-cpp/absl/types/span.h +29 -7
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_genn.c +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +1 -2
- metadata +75 -10
- data/src/core/lib/event_engine/socket_notifier.h +0 -55
- data/src/core/lib/promise/for_each.h +0 -155
- data/src/core/lib/promise/map_pipe.h +0 -88
- data/src/core/lib/promise/try_concurrently.h +0 -342
@@ -16,11 +16,13 @@
|
|
16
16
|
#define ABSL_STRINGS_INTERNAL_OSTRINGSTREAM_H_
|
17
17
|
|
18
18
|
#include <cassert>
|
19
|
+
#include <ios>
|
19
20
|
#include <ostream>
|
20
21
|
#include <streambuf>
|
21
22
|
#include <string>
|
23
|
+
#include <utility>
|
22
24
|
|
23
|
-
#include "absl/base/
|
25
|
+
#include "absl/base/config.h"
|
24
26
|
|
25
27
|
namespace absl {
|
26
28
|
ABSL_NAMESPACE_BEGIN
|
@@ -60,26 +62,49 @@ namespace strings_internal {
|
|
60
62
|
// strm << 3.14;
|
61
63
|
//
|
62
64
|
// Note: flush() has no effect. No reason to call it.
|
63
|
-
class OStringStream :
|
65
|
+
class OStringStream final : public std::ostream {
|
64
66
|
public:
|
65
67
|
// The argument can be null, in which case you'll need to call str(p) with a
|
66
68
|
// non-null argument before you can write to the stream.
|
67
69
|
//
|
68
70
|
// The destructor of OStringStream doesn't use the std::string. It's OK to
|
69
71
|
// destroy the std::string before the stream.
|
70
|
-
explicit OStringStream(std::string*
|
72
|
+
explicit OStringStream(std::string* str)
|
73
|
+
: std::ostream(&buf_), buf_(str) {}
|
74
|
+
OStringStream(OStringStream&& that)
|
75
|
+
: std::ostream(std::move(static_cast<std::ostream&>(that))),
|
76
|
+
buf_(that.buf_) {
|
77
|
+
rdbuf(&buf_);
|
78
|
+
}
|
79
|
+
OStringStream& operator=(OStringStream&& that) {
|
80
|
+
std::ostream::operator=(std::move(static_cast<std::ostream&>(that)));
|
81
|
+
buf_ = that.buf_;
|
82
|
+
rdbuf(&buf_);
|
83
|
+
return *this;
|
84
|
+
}
|
71
85
|
|
72
|
-
std::string* str() { return
|
73
|
-
const std::string* str() const { return
|
74
|
-
void str(std::string*
|
86
|
+
std::string* str() { return buf_.str(); }
|
87
|
+
const std::string* str() const { return buf_.str(); }
|
88
|
+
void str(std::string* str) { buf_.str(str); }
|
75
89
|
|
76
90
|
private:
|
77
|
-
|
91
|
+
class Streambuf final : public std::streambuf {
|
92
|
+
public:
|
93
|
+
explicit Streambuf(std::string* str) : str_(str) {}
|
94
|
+
Streambuf(const Streambuf&) = default;
|
95
|
+
Streambuf& operator=(const Streambuf&) = default;
|
78
96
|
|
79
|
-
|
80
|
-
|
97
|
+
std::string* str() { return str_; }
|
98
|
+
const std::string* str() const { return str_; }
|
99
|
+
void str(std::string* str) { str_ = str; }
|
81
100
|
|
82
|
-
|
101
|
+
protected:
|
102
|
+
int_type overflow(int c) override;
|
103
|
+
std::streamsize xsputn(const char* s, std::streamsize n) override;
|
104
|
+
|
105
|
+
private:
|
106
|
+
std::string* str_;
|
107
|
+
} buf_;
|
83
108
|
};
|
84
109
|
|
85
110
|
} // namespace strings_internal
|
@@ -77,7 +77,7 @@ class IntDigits {
|
|
77
77
|
v >>= 3;
|
78
78
|
} while (v);
|
79
79
|
start_ = p;
|
80
|
-
size_ = storage_ + sizeof(storage_) - p;
|
80
|
+
size_ = static_cast<size_t>(storage_ + sizeof(storage_) - p);
|
81
81
|
}
|
82
82
|
|
83
83
|
// Print the signed or unsigned integer as decimal.
|
@@ -86,7 +86,8 @@ class IntDigits {
|
|
86
86
|
void PrintAsDec(T v) {
|
87
87
|
static_assert(std::is_integral<T>::value, "");
|
88
88
|
start_ = storage_;
|
89
|
-
size_ = numbers_internal::FastIntToBuffer(v, storage_) -
|
89
|
+
size_ = static_cast<size_t>(numbers_internal::FastIntToBuffer(v, storage_) -
|
90
|
+
storage_);
|
90
91
|
}
|
91
92
|
|
92
93
|
void PrintAsDec(int128 v) {
|
@@ -115,7 +116,7 @@ class IntDigits {
|
|
115
116
|
if (add_neg) {
|
116
117
|
*--p = '-';
|
117
118
|
}
|
118
|
-
size_ = storage_ + sizeof(storage_) - p;
|
119
|
+
size_ = static_cast<size_t>(storage_ + sizeof(storage_) - p);
|
119
120
|
start_ = p;
|
120
121
|
}
|
121
122
|
|
@@ -138,7 +139,7 @@ class IntDigits {
|
|
138
139
|
++p;
|
139
140
|
}
|
140
141
|
start_ = p;
|
141
|
-
size_ = storage_ + sizeof(storage_) - p;
|
142
|
+
size_ = static_cast<size_t>(storage_ + sizeof(storage_) - p);
|
142
143
|
}
|
143
144
|
|
144
145
|
// Print the unsigned integer as hex using uppercase.
|
@@ -154,7 +155,7 @@ class IntDigits {
|
|
154
155
|
v >>= 4;
|
155
156
|
} while (v);
|
156
157
|
start_ = p;
|
157
|
-
size_ = storage_ + sizeof(storage_) - p;
|
158
|
+
size_ = static_cast<size_t>(storage_ + sizeof(storage_) - p);
|
158
159
|
}
|
159
160
|
|
160
161
|
// The printed value including the '-' sign if available.
|
@@ -208,10 +209,12 @@ string_view SignColumn(bool neg, const FormatConversionSpecImpl conv) {
|
|
208
209
|
return {};
|
209
210
|
}
|
210
211
|
|
211
|
-
bool ConvertCharImpl(
|
212
|
-
|
212
|
+
bool ConvertCharImpl(char v,
|
213
|
+
const FormatConversionSpecImpl conv,
|
214
|
+
FormatSinkImpl* sink) {
|
213
215
|
size_t fill = 0;
|
214
|
-
if (conv.width() >= 0)
|
216
|
+
if (conv.width() >= 0)
|
217
|
+
fill = static_cast<size_t>(conv.width());
|
215
218
|
ReducePadding(1, &fill);
|
216
219
|
if (!conv.has_left_flag()) sink->Append(fill, ' ');
|
217
220
|
sink->Append(1, v);
|
@@ -225,7 +228,8 @@ bool ConvertIntImplInnerSlow(const IntDigits &as_digits,
|
|
225
228
|
// Print as a sequence of Substrings:
|
226
229
|
// [left_spaces][sign][base_indicator][zeroes][formatted][right_spaces]
|
227
230
|
size_t fill = 0;
|
228
|
-
if (conv.width() >= 0)
|
231
|
+
if (conv.width() >= 0)
|
232
|
+
fill = static_cast<size_t>(conv.width());
|
229
233
|
|
230
234
|
string_view formatted = as_digits.without_neg_or_zero();
|
231
235
|
ReducePadding(formatted, &fill);
|
@@ -236,10 +240,9 @@ bool ConvertIntImplInnerSlow(const IntDigits &as_digits,
|
|
236
240
|
string_view base_indicator = BaseIndicator(as_digits, conv);
|
237
241
|
ReducePadding(base_indicator, &fill);
|
238
242
|
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
precision = 1;
|
243
|
+
bool precision_specified = conv.precision() >= 0;
|
244
|
+
size_t precision =
|
245
|
+
precision_specified ? static_cast<size_t>(conv.precision()) : size_t{1};
|
243
246
|
|
244
247
|
if (conv.has_alt_flag() &&
|
245
248
|
conv.conversion_char() == FormatConversionCharInternal::o) {
|
@@ -247,7 +250,7 @@ bool ConvertIntImplInnerSlow(const IntDigits &as_digits,
|
|
247
250
|
// "For o conversion, it increases the precision (if necessary) to
|
248
251
|
// force the first digit of the result to be zero."
|
249
252
|
if (formatted.empty() || *formatted.begin() != '0') {
|
250
|
-
|
253
|
+
size_t needed = formatted.size() + 1;
|
251
254
|
precision = std::max(precision, needed);
|
252
255
|
}
|
253
256
|
}
|
@@ -275,19 +278,71 @@ bool ConvertIntImplInnerSlow(const IntDigits &as_digits,
|
|
275
278
|
return true;
|
276
279
|
}
|
277
280
|
|
281
|
+
template <typename T,
|
282
|
+
typename std::enable_if<(std::is_integral<T>::value &&
|
283
|
+
std::is_signed<T>::value) ||
|
284
|
+
std::is_same<T, int128>::value,
|
285
|
+
int>::type = 0>
|
286
|
+
constexpr auto ConvertV(T) {
|
287
|
+
return FormatConversionCharInternal::d;
|
288
|
+
}
|
289
|
+
|
290
|
+
template <typename T,
|
291
|
+
typename std::enable_if<(std::is_integral<T>::value &&
|
292
|
+
std::is_unsigned<T>::value) ||
|
293
|
+
std::is_same<T, uint128>::value,
|
294
|
+
int>::type = 0>
|
295
|
+
constexpr auto ConvertV(T) {
|
296
|
+
return FormatConversionCharInternal::u;
|
297
|
+
}
|
298
|
+
|
299
|
+
template <typename T>
|
300
|
+
bool ConvertFloatArg(T v, FormatConversionSpecImpl conv, FormatSinkImpl *sink) {
|
301
|
+
if (conv.conversion_char() == FormatConversionCharInternal::v) {
|
302
|
+
conv.set_conversion_char(FormatConversionCharInternal::g);
|
303
|
+
}
|
304
|
+
|
305
|
+
return FormatConversionCharIsFloat(conv.conversion_char()) &&
|
306
|
+
ConvertFloatImpl(v, conv, sink);
|
307
|
+
}
|
308
|
+
|
309
|
+
inline bool ConvertStringArg(string_view v, const FormatConversionSpecImpl conv,
|
310
|
+
FormatSinkImpl *sink) {
|
311
|
+
if (conv.is_basic()) {
|
312
|
+
sink->Append(v);
|
313
|
+
return true;
|
314
|
+
}
|
315
|
+
return sink->PutPaddedString(v, conv.width(), conv.precision(),
|
316
|
+
conv.has_left_flag());
|
317
|
+
}
|
318
|
+
|
319
|
+
} // namespace
|
320
|
+
|
321
|
+
bool ConvertBoolArg(bool v, FormatSinkImpl *sink) {
|
322
|
+
if (v) {
|
323
|
+
sink->Append("true");
|
324
|
+
} else {
|
325
|
+
sink->Append("false");
|
326
|
+
}
|
327
|
+
return true;
|
328
|
+
}
|
329
|
+
|
278
330
|
template <typename T>
|
279
|
-
bool ConvertIntArg(T v,
|
280
|
-
FormatSinkImpl *sink) {
|
331
|
+
bool ConvertIntArg(T v, FormatConversionSpecImpl conv, FormatSinkImpl *sink) {
|
281
332
|
using U = typename MakeUnsigned<T>::type;
|
282
333
|
IntDigits as_digits;
|
283
334
|
|
335
|
+
if (conv.conversion_char() == FormatConversionCharInternal::v) {
|
336
|
+
conv.set_conversion_char(ConvertV(T{}));
|
337
|
+
}
|
338
|
+
|
284
339
|
// This odd casting is due to a bug in -Wswitch behavior in gcc49 which causes
|
285
340
|
// it to complain about a switch/case type mismatch, even though both are
|
286
341
|
// FormatConverionChar. Likely this is because at this point
|
287
342
|
// FormatConversionChar is declared, but not defined.
|
288
343
|
switch (static_cast<uint8_t>(conv.conversion_char())) {
|
289
344
|
case static_cast<uint8_t>(FormatConversionCharInternal::c):
|
290
|
-
return ConvertCharImpl(static_cast<
|
345
|
+
return ConvertCharImpl(static_cast<char>(v), conv, sink);
|
291
346
|
|
292
347
|
case static_cast<uint8_t>(FormatConversionCharInternal::o):
|
293
348
|
as_digits.PrintAsOct(static_cast<U>(v));
|
@@ -320,7 +375,7 @@ bool ConvertIntArg(T v, const FormatConversionSpecImpl conv,
|
|
320
375
|
return ConvertFloatImpl(static_cast<double>(v), conv, sink);
|
321
376
|
|
322
377
|
default:
|
323
|
-
|
378
|
+
ABSL_ASSUME(false);
|
324
379
|
}
|
325
380
|
|
326
381
|
if (conv.is_basic()) {
|
@@ -330,24 +385,37 @@ bool ConvertIntArg(T v, const FormatConversionSpecImpl conv,
|
|
330
385
|
return ConvertIntImplInnerSlow(as_digits, conv, sink);
|
331
386
|
}
|
332
387
|
|
333
|
-
template <
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
388
|
+
template bool ConvertIntArg<char>(char v, FormatConversionSpecImpl conv,
|
389
|
+
FormatSinkImpl *sink);
|
390
|
+
template bool ConvertIntArg<signed char>(signed char v,
|
391
|
+
FormatConversionSpecImpl conv,
|
392
|
+
FormatSinkImpl *sink);
|
393
|
+
template bool ConvertIntArg<unsigned char>(unsigned char v,
|
394
|
+
FormatConversionSpecImpl conv,
|
395
|
+
FormatSinkImpl *sink);
|
396
|
+
template bool ConvertIntArg<short>(short v, // NOLINT
|
397
|
+
FormatConversionSpecImpl conv,
|
398
|
+
FormatSinkImpl *sink);
|
399
|
+
template bool ConvertIntArg<unsigned short>(unsigned short v, // NOLINT
|
400
|
+
FormatConversionSpecImpl conv,
|
401
|
+
FormatSinkImpl *sink);
|
402
|
+
template bool ConvertIntArg<int>(int v, FormatConversionSpecImpl conv,
|
403
|
+
FormatSinkImpl *sink);
|
404
|
+
template bool ConvertIntArg<unsigned int>(unsigned int v,
|
405
|
+
FormatConversionSpecImpl conv,
|
406
|
+
FormatSinkImpl *sink);
|
407
|
+
template bool ConvertIntArg<long>(long v, // NOLINT
|
408
|
+
FormatConversionSpecImpl conv,
|
409
|
+
FormatSinkImpl *sink);
|
410
|
+
template bool ConvertIntArg<unsigned long>(unsigned long v, // NOLINT
|
411
|
+
FormatConversionSpecImpl conv,
|
412
|
+
FormatSinkImpl *sink);
|
413
|
+
template bool ConvertIntArg<long long>(long long v, // NOLINT
|
414
|
+
FormatConversionSpecImpl conv,
|
415
|
+
FormatSinkImpl *sink);
|
416
|
+
template bool ConvertIntArg<unsigned long long>(unsigned long long v, // NOLINT
|
417
|
+
FormatConversionSpecImpl conv,
|
418
|
+
FormatSinkImpl *sink);
|
351
419
|
|
352
420
|
// ==================== Strings ====================
|
353
421
|
StringConvertResult FormatConvertImpl(const std::string &v,
|
@@ -375,7 +443,7 @@ FormatConvertImpl(const char *v, const FormatConversionSpecImpl conv,
|
|
375
443
|
len = std::strlen(v);
|
376
444
|
} else {
|
377
445
|
// If precision is set, we look for the NUL-terminator on the valid range.
|
378
|
-
len = std::find(v, v + conv.precision(), '\0') - v;
|
446
|
+
len = static_cast<size_t>(std::find(v, v + conv.precision(), '\0') - v);
|
379
447
|
}
|
380
448
|
return {ConvertStringArg(string_view(v, len), conv, sink)};
|
381
449
|
}
|
@@ -410,19 +478,18 @@ FloatingConvertResult FormatConvertImpl(long double v,
|
|
410
478
|
}
|
411
479
|
|
412
480
|
// ==================== Chars ====================
|
413
|
-
|
414
|
-
|
415
|
-
FormatSinkImpl *sink) {
|
481
|
+
CharConvertResult FormatConvertImpl(char v, const FormatConversionSpecImpl conv,
|
482
|
+
FormatSinkImpl *sink) {
|
416
483
|
return {ConvertIntArg(v, conv, sink)};
|
417
484
|
}
|
418
|
-
|
419
|
-
|
420
|
-
|
485
|
+
CharConvertResult FormatConvertImpl(signed char v,
|
486
|
+
const FormatConversionSpecImpl conv,
|
487
|
+
FormatSinkImpl *sink) {
|
421
488
|
return {ConvertIntArg(v, conv, sink)};
|
422
489
|
}
|
423
|
-
|
424
|
-
|
425
|
-
|
490
|
+
CharConvertResult FormatConvertImpl(unsigned char v,
|
491
|
+
const FormatConversionSpecImpl conv,
|
492
|
+
FormatSinkImpl *sink) {
|
426
493
|
return {ConvertIntArg(v, conv, sink)};
|
427
494
|
}
|
428
495
|
|
@@ -18,6 +18,7 @@
|
|
18
18
|
#include <string.h>
|
19
19
|
#include <wchar.h>
|
20
20
|
|
21
|
+
#include <algorithm>
|
21
22
|
#include <cstdio>
|
22
23
|
#include <iomanip>
|
23
24
|
#include <limits>
|
@@ -25,10 +26,12 @@
|
|
25
26
|
#include <sstream>
|
26
27
|
#include <string>
|
27
28
|
#include <type_traits>
|
29
|
+
#include <utility>
|
28
30
|
|
29
31
|
#include "absl/base/port.h"
|
30
32
|
#include "absl/meta/type_traits.h"
|
31
33
|
#include "absl/numeric/int128.h"
|
34
|
+
#include "absl/strings/internal/has_absl_stringify.h"
|
32
35
|
#include "absl/strings/internal/str_format/extension.h"
|
33
36
|
#include "absl/strings/string_view.h"
|
34
37
|
|
@@ -45,6 +48,24 @@ class FormatConversionSpec;
|
|
45
48
|
|
46
49
|
namespace str_format_internal {
|
47
50
|
|
51
|
+
template <FormatConversionCharSet C>
|
52
|
+
struct ArgConvertResult {
|
53
|
+
bool value;
|
54
|
+
};
|
55
|
+
|
56
|
+
using IntegralConvertResult = ArgConvertResult<FormatConversionCharSetUnion(
|
57
|
+
FormatConversionCharSetInternal::c,
|
58
|
+
FormatConversionCharSetInternal::kNumeric,
|
59
|
+
FormatConversionCharSetInternal::kStar,
|
60
|
+
FormatConversionCharSetInternal::v)>;
|
61
|
+
using FloatingConvertResult = ArgConvertResult<FormatConversionCharSetUnion(
|
62
|
+
FormatConversionCharSetInternal::kFloating,
|
63
|
+
FormatConversionCharSetInternal::v)>;
|
64
|
+
using CharConvertResult = ArgConvertResult<FormatConversionCharSetUnion(
|
65
|
+
FormatConversionCharSetInternal::c,
|
66
|
+
FormatConversionCharSetInternal::kNumeric,
|
67
|
+
FormatConversionCharSetInternal::kStar)>;
|
68
|
+
|
48
69
|
template <typename T, typename = void>
|
49
70
|
struct HasUserDefinedConvert : std::false_type {};
|
50
71
|
|
@@ -55,7 +76,50 @@ struct HasUserDefinedConvert<T, void_t<decltype(AbslFormatConvert(
|
|
55
76
|
std::declval<FormatSink*>()))>>
|
56
77
|
: std::true_type {};
|
57
78
|
|
58
|
-
|
79
|
+
// These declarations prevent ADL lookup from continuing in absl namespaces,
|
80
|
+
// we are deliberately using these as ADL hooks and want them to consider
|
81
|
+
// non-absl namespaces only.
|
82
|
+
void AbslFormatConvert();
|
83
|
+
void AbslStringify();
|
84
|
+
|
85
|
+
template <typename T>
|
86
|
+
bool ConvertIntArg(T v, FormatConversionSpecImpl conv, FormatSinkImpl* sink);
|
87
|
+
|
88
|
+
// Forward declarations of internal `ConvertIntArg` function template
|
89
|
+
// instantiations are here to avoid including the template body in the headers
|
90
|
+
// and instantiating it in large numbers of translation units. Explicit
|
91
|
+
// instantiations can be found in "absl/strings/internal/str_format/arg.cc"
|
92
|
+
extern template bool ConvertIntArg<char>(char v, FormatConversionSpecImpl conv,
|
93
|
+
FormatSinkImpl* sink);
|
94
|
+
extern template bool ConvertIntArg<signed char>(signed char v,
|
95
|
+
FormatConversionSpecImpl conv,
|
96
|
+
FormatSinkImpl* sink);
|
97
|
+
extern template bool ConvertIntArg<unsigned char>(unsigned char v,
|
98
|
+
FormatConversionSpecImpl conv,
|
99
|
+
FormatSinkImpl* sink);
|
100
|
+
extern template bool ConvertIntArg<short>(short v, // NOLINT
|
101
|
+
FormatConversionSpecImpl conv,
|
102
|
+
FormatSinkImpl* sink);
|
103
|
+
extern template bool ConvertIntArg<unsigned short>( // NOLINT
|
104
|
+
unsigned short v, FormatConversionSpecImpl conv, // NOLINT
|
105
|
+
FormatSinkImpl* sink);
|
106
|
+
extern template bool ConvertIntArg<int>(int v, FormatConversionSpecImpl conv,
|
107
|
+
FormatSinkImpl* sink);
|
108
|
+
extern template bool ConvertIntArg<unsigned int>(unsigned int v,
|
109
|
+
FormatConversionSpecImpl conv,
|
110
|
+
FormatSinkImpl* sink);
|
111
|
+
extern template bool ConvertIntArg<long>( // NOLINT
|
112
|
+
long v, FormatConversionSpecImpl conv, FormatSinkImpl* sink); // NOLINT
|
113
|
+
extern template bool ConvertIntArg<unsigned long>(unsigned long v, // NOLINT
|
114
|
+
FormatConversionSpecImpl conv,
|
115
|
+
FormatSinkImpl* sink);
|
116
|
+
extern template bool ConvertIntArg<long long>(long long v, // NOLINT
|
117
|
+
FormatConversionSpecImpl conv,
|
118
|
+
FormatSinkImpl* sink);
|
119
|
+
extern template bool ConvertIntArg<unsigned long long>( // NOLINT
|
120
|
+
unsigned long long v, FormatConversionSpecImpl conv, // NOLINT
|
121
|
+
FormatSinkImpl* sink);
|
122
|
+
|
59
123
|
template <typename T>
|
60
124
|
auto FormatConvertImpl(const T& v, FormatConversionSpecImpl conv,
|
61
125
|
FormatSinkImpl* sink)
|
@@ -71,6 +135,39 @@ auto FormatConvertImpl(const T& v, FormatConversionSpecImpl conv,
|
|
71
135
|
return AbslFormatConvert(v, fcs, &fs);
|
72
136
|
}
|
73
137
|
|
138
|
+
template <typename T>
|
139
|
+
auto FormatConvertImpl(const T& v, FormatConversionSpecImpl conv,
|
140
|
+
FormatSinkImpl* sink)
|
141
|
+
-> std::enable_if_t<std::is_enum<T>::value &&
|
142
|
+
std::is_void<decltype(AbslStringify(
|
143
|
+
std::declval<FormatSink&>(), v))>::value,
|
144
|
+
IntegralConvertResult> {
|
145
|
+
if (conv.conversion_char() == FormatConversionCharInternal::v) {
|
146
|
+
using FormatSinkT =
|
147
|
+
absl::enable_if_t<sizeof(const T& (*)()) != 0, FormatSink>;
|
148
|
+
auto fs = sink->Wrap<FormatSinkT>();
|
149
|
+
AbslStringify(fs, v);
|
150
|
+
return {true};
|
151
|
+
} else {
|
152
|
+
return {ConvertIntArg(
|
153
|
+
static_cast<typename std::underlying_type<T>::type>(v), conv, sink)};
|
154
|
+
}
|
155
|
+
}
|
156
|
+
|
157
|
+
template <typename T>
|
158
|
+
auto FormatConvertImpl(const T& v, FormatConversionSpecImpl,
|
159
|
+
FormatSinkImpl* sink)
|
160
|
+
-> std::enable_if_t<!std::is_enum<T>::value &&
|
161
|
+
std::is_void<decltype(AbslStringify(
|
162
|
+
std::declval<FormatSink&>(), v))>::value,
|
163
|
+
ArgConvertResult<FormatConversionCharSetInternal::v>> {
|
164
|
+
using FormatSinkT =
|
165
|
+
absl::enable_if_t<sizeof(const T& (*)()) != 0, FormatSink>;
|
166
|
+
auto fs = sink->Wrap<FormatSinkT>();
|
167
|
+
AbslStringify(fs, v);
|
168
|
+
return {true};
|
169
|
+
}
|
170
|
+
|
74
171
|
template <typename T>
|
75
172
|
class StreamedWrapper;
|
76
173
|
|
@@ -95,11 +192,6 @@ struct VoidPtr {
|
|
95
192
|
uintptr_t value;
|
96
193
|
};
|
97
194
|
|
98
|
-
template <FormatConversionCharSet C>
|
99
|
-
struct ArgConvertResult {
|
100
|
-
bool value;
|
101
|
-
};
|
102
|
-
|
103
195
|
template <FormatConversionCharSet C>
|
104
196
|
constexpr FormatConversionCharSet ExtractCharSet(FormatConvertResult<C>) {
|
105
197
|
return C;
|
@@ -110,8 +202,8 @@ constexpr FormatConversionCharSet ExtractCharSet(ArgConvertResult<C>) {
|
|
110
202
|
return C;
|
111
203
|
}
|
112
204
|
|
113
|
-
using StringConvertResult =
|
114
|
-
|
205
|
+
using StringConvertResult = ArgConvertResult<FormatConversionCharSetUnion(
|
206
|
+
FormatConversionCharSetInternal::s, FormatConversionCharSetInternal::v)>;
|
115
207
|
ArgConvertResult<FormatConversionCharSetInternal::p> FormatConvertImpl(
|
116
208
|
VoidPtr v, FormatConversionSpecImpl conv, FormatSinkImpl* sink);
|
117
209
|
|
@@ -173,12 +265,7 @@ StringConvertResult FormatConvertImpl(const AbslCord& value,
|
|
173
265
|
return {true};
|
174
266
|
}
|
175
267
|
|
176
|
-
|
177
|
-
FormatConversionCharSetInternal::c,
|
178
|
-
FormatConversionCharSetInternal::kNumeric,
|
179
|
-
FormatConversionCharSetInternal::kStar)>;
|
180
|
-
using FloatingConvertResult =
|
181
|
-
ArgConvertResult<FormatConversionCharSetInternal::kFloating>;
|
268
|
+
bool ConvertBoolArg(bool v, FormatSinkImpl* sink);
|
182
269
|
|
183
270
|
// Floats.
|
184
271
|
FloatingConvertResult FormatConvertImpl(float v, FormatConversionSpecImpl conv,
|
@@ -190,14 +277,14 @@ FloatingConvertResult FormatConvertImpl(long double v,
|
|
190
277
|
FormatSinkImpl* sink);
|
191
278
|
|
192
279
|
// Chars.
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
280
|
+
CharConvertResult FormatConvertImpl(char v, FormatConversionSpecImpl conv,
|
281
|
+
FormatSinkImpl* sink);
|
282
|
+
CharConvertResult FormatConvertImpl(signed char v,
|
283
|
+
FormatConversionSpecImpl conv,
|
284
|
+
FormatSinkImpl* sink);
|
285
|
+
CharConvertResult FormatConvertImpl(unsigned char v,
|
286
|
+
FormatConversionSpecImpl conv,
|
287
|
+
FormatSinkImpl* sink);
|
201
288
|
|
202
289
|
// Ints.
|
203
290
|
IntegralConvertResult FormatConvertImpl(short v, // NOLINT
|
@@ -228,9 +315,16 @@ IntegralConvertResult FormatConvertImpl(int128 v, FormatConversionSpecImpl conv,
|
|
228
315
|
IntegralConvertResult FormatConvertImpl(uint128 v,
|
229
316
|
FormatConversionSpecImpl conv,
|
230
317
|
FormatSinkImpl* sink);
|
318
|
+
|
319
|
+
// This function needs to be a template due to ambiguity regarding type
|
320
|
+
// conversions.
|
231
321
|
template <typename T, enable_if_t<std::is_same<T, bool>::value, int> = 0>
|
232
322
|
IntegralConvertResult FormatConvertImpl(T v, FormatConversionSpecImpl conv,
|
233
323
|
FormatSinkImpl* sink) {
|
324
|
+
if (conv.conversion_char() == FormatConversionCharInternal::v) {
|
325
|
+
return {ConvertBoolArg(v, sink)};
|
326
|
+
}
|
327
|
+
|
234
328
|
return FormatConvertImpl(static_cast<int>(v), conv, sink);
|
235
329
|
}
|
236
330
|
|
@@ -238,7 +332,8 @@ IntegralConvertResult FormatConvertImpl(T v, FormatConversionSpecImpl conv,
|
|
238
332
|
// FormatArgImpl will use the underlying Convert functions instead.
|
239
333
|
template <typename T>
|
240
334
|
typename std::enable_if<std::is_enum<T>::value &&
|
241
|
-
!HasUserDefinedConvert<T>::value
|
335
|
+
!HasUserDefinedConvert<T>::value &&
|
336
|
+
!strings_internal::HasAbslStringify<T>::value,
|
242
337
|
IntegralConvertResult>::type
|
243
338
|
FormatConvertImpl(T v, FormatConversionSpecImpl conv, FormatSinkImpl* sink);
|
244
339
|
|
@@ -301,11 +396,11 @@ struct FormatArgImplFriend {
|
|
301
396
|
|
302
397
|
template <typename Arg>
|
303
398
|
constexpr FormatConversionCharSet ArgumentToConv() {
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
399
|
+
using ConvResult = decltype(str_format_internal::FormatConvertImpl(
|
400
|
+
std::declval<const Arg&>(),
|
401
|
+
std::declval<const FormatConversionSpecImpl&>(),
|
402
|
+
std::declval<FormatSinkImpl*>()));
|
403
|
+
return absl::str_format_internal::ExtractCharSet(ConvResult{});
|
309
404
|
}
|
310
405
|
|
311
406
|
// A type-erased handle to a format argument.
|
@@ -351,7 +446,8 @@ class FormatArgImpl {
|
|
351
446
|
template <typename T, typename = void>
|
352
447
|
struct DecayType {
|
353
448
|
static constexpr bool kHasUserDefined =
|
354
|
-
str_format_internal::HasUserDefinedConvert<T>::value
|
449
|
+
str_format_internal::HasUserDefinedConvert<T>::value ||
|
450
|
+
strings_internal::HasAbslStringify<T>::value;
|
355
451
|
using type = typename std::conditional<
|
356
452
|
!kHasUserDefined && std::is_convertible<T, const char*>::value,
|
357
453
|
const char*,
|
@@ -363,6 +459,7 @@ class FormatArgImpl {
|
|
363
459
|
struct DecayType<T,
|
364
460
|
typename std::enable_if<
|
365
461
|
!str_format_internal::HasUserDefinedConvert<T>::value &&
|
462
|
+
!strings_internal::HasAbslStringify<T>::value &&
|
366
463
|
std::is_enum<T>::value>::type> {
|
367
464
|
using type = typename std::underlying_type<T>::type;
|
368
465
|
};
|
@@ -32,7 +32,8 @@ inline bool BindFromPosition(int position, int* value,
|
|
32
32
|
return false;
|
33
33
|
}
|
34
34
|
// -1 because positions are 1-based
|
35
|
-
return FormatArgImplFriend::ToInt(pack[position - 1],
|
35
|
+
return FormatArgImplFriend::ToInt(pack[static_cast<size_t>(position) - 1],
|
36
|
+
value);
|
36
37
|
}
|
37
38
|
|
38
39
|
class ArgContext {
|
@@ -56,7 +57,7 @@ inline bool ArgContext::Bind(const UnboundConversion* unbound,
|
|
56
57
|
const FormatArgImpl* arg = nullptr;
|
57
58
|
int arg_position = unbound->arg_position;
|
58
59
|
if (static_cast<size_t>(arg_position - 1) >= pack_.size()) return false;
|
59
|
-
arg = &pack_[arg_position - 1]; // 1-based
|
60
|
+
arg = &pack_[static_cast<size_t>(arg_position - 1)]; // 1-based
|
60
61
|
|
61
62
|
if (unbound->flags != Flags::kBasic) {
|
62
63
|
int width = unbound->width.value();
|
@@ -235,9 +235,10 @@ class StreamedWrapper {
|
|
235
235
|
|
236
236
|
private:
|
237
237
|
template <typename S>
|
238
|
-
friend ArgConvertResult<
|
239
|
-
|
240
|
-
|
238
|
+
friend ArgConvertResult<FormatConversionCharSetUnion(
|
239
|
+
FormatConversionCharSetInternal::s, FormatConversionCharSetInternal::v)>
|
240
|
+
FormatConvertImpl(const StreamedWrapper<S>& v, FormatConversionSpecImpl conv,
|
241
|
+
FormatSinkImpl* out);
|
241
242
|
const T& v_;
|
242
243
|
};
|
243
244
|
|