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
@@ -76,10 +76,10 @@ ABSL_DLL extern const char kToUpper[256];
|
|
76
76
|
// Declaration for the array of characters to lower-case characters.
|
77
77
|
ABSL_DLL extern const char kToLower[256];
|
78
78
|
|
79
|
-
void AsciiStrToLower(
|
79
|
+
void AsciiStrToLower(char* absl_nonnull dst, const char* absl_nullable src,
|
80
80
|
size_t n);
|
81
81
|
|
82
|
-
void AsciiStrToUpper(
|
82
|
+
void AsciiStrToUpper(char* absl_nonnull dst, const char* absl_nullable src,
|
83
83
|
size_t n);
|
84
84
|
|
85
85
|
} // namespace ascii_internal
|
@@ -185,10 +185,10 @@ inline char ascii_tolower(unsigned char c) {
|
|
185
185
|
}
|
186
186
|
|
187
187
|
// Converts the characters in `s` to lowercase, changing the contents of `s`.
|
188
|
-
void AsciiStrToLower(
|
188
|
+
void AsciiStrToLower(std::string* absl_nonnull s);
|
189
189
|
|
190
190
|
// Creates a lowercase string from a given absl::string_view.
|
191
|
-
|
191
|
+
[[nodiscard]] inline std::string AsciiStrToLower(absl::string_view s) {
|
192
192
|
std::string result;
|
193
193
|
strings_internal::STLStringResizeUninitialized(&result, s.size());
|
194
194
|
ascii_internal::AsciiStrToLower(&result[0], s.data(), s.size());
|
@@ -199,7 +199,7 @@ ABSL_MUST_USE_RESULT inline std::string AsciiStrToLower(absl::string_view s) {
|
|
199
199
|
//
|
200
200
|
// (Template is used to lower priority of this overload.)
|
201
201
|
template <int&... DoNotSpecify>
|
202
|
-
|
202
|
+
[[nodiscard]] inline std::string AsciiStrToLower(std::string&& s) {
|
203
203
|
std::string result = std::move(s);
|
204
204
|
absl::AsciiStrToLower(&result);
|
205
205
|
return result;
|
@@ -214,10 +214,10 @@ inline char ascii_toupper(unsigned char c) {
|
|
214
214
|
}
|
215
215
|
|
216
216
|
// Converts the characters in `s` to uppercase, changing the contents of `s`.
|
217
|
-
void AsciiStrToUpper(
|
217
|
+
void AsciiStrToUpper(std::string* absl_nonnull s);
|
218
218
|
|
219
219
|
// Creates an uppercase string from a given absl::string_view.
|
220
|
-
|
220
|
+
[[nodiscard]] inline std::string AsciiStrToUpper(absl::string_view s) {
|
221
221
|
std::string result;
|
222
222
|
strings_internal::STLStringResizeUninitialized(&result, s.size());
|
223
223
|
ascii_internal::AsciiStrToUpper(&result[0], s.data(), s.size());
|
@@ -228,7 +228,7 @@ ABSL_MUST_USE_RESULT inline std::string AsciiStrToUpper(absl::string_view s) {
|
|
228
228
|
//
|
229
229
|
// (Template is used to lower priority of this overload.)
|
230
230
|
template <int&... DoNotSpecify>
|
231
|
-
|
231
|
+
[[nodiscard]] inline std::string AsciiStrToUpper(std::string&& s) {
|
232
232
|
std::string result = std::move(s);
|
233
233
|
absl::AsciiStrToUpper(&result);
|
234
234
|
return result;
|
@@ -236,47 +236,47 @@ ABSL_MUST_USE_RESULT inline std::string AsciiStrToUpper(std::string&& s) {
|
|
236
236
|
|
237
237
|
// Returns absl::string_view with whitespace stripped from the beginning of the
|
238
238
|
// given string_view.
|
239
|
-
|
240
|
-
absl::string_view str) {
|
239
|
+
[[nodiscard]] inline absl::string_view StripLeadingAsciiWhitespace(
|
240
|
+
absl::string_view str ABSL_ATTRIBUTE_LIFETIME_BOUND) {
|
241
241
|
auto it = std::find_if_not(str.begin(), str.end(), absl::ascii_isspace);
|
242
242
|
return str.substr(static_cast<size_t>(it - str.begin()));
|
243
243
|
}
|
244
244
|
|
245
245
|
// Strips in place whitespace from the beginning of the given string.
|
246
|
-
inline void StripLeadingAsciiWhitespace(
|
246
|
+
inline void StripLeadingAsciiWhitespace(std::string* absl_nonnull str) {
|
247
247
|
auto it = std::find_if_not(str->begin(), str->end(), absl::ascii_isspace);
|
248
248
|
str->erase(str->begin(), it);
|
249
249
|
}
|
250
250
|
|
251
251
|
// Returns absl::string_view with whitespace stripped from the end of the given
|
252
252
|
// string_view.
|
253
|
-
|
254
|
-
absl::string_view str) {
|
253
|
+
[[nodiscard]] inline absl::string_view StripTrailingAsciiWhitespace(
|
254
|
+
absl::string_view str ABSL_ATTRIBUTE_LIFETIME_BOUND) {
|
255
255
|
auto it = std::find_if_not(str.rbegin(), str.rend(), absl::ascii_isspace);
|
256
256
|
return str.substr(0, static_cast<size_t>(str.rend() - it));
|
257
257
|
}
|
258
258
|
|
259
259
|
// Strips in place whitespace from the end of the given string
|
260
|
-
inline void StripTrailingAsciiWhitespace(
|
260
|
+
inline void StripTrailingAsciiWhitespace(std::string* absl_nonnull str) {
|
261
261
|
auto it = std::find_if_not(str->rbegin(), str->rend(), absl::ascii_isspace);
|
262
262
|
str->erase(static_cast<size_t>(str->rend() - it));
|
263
263
|
}
|
264
264
|
|
265
265
|
// Returns absl::string_view with whitespace stripped from both ends of the
|
266
266
|
// given string_view.
|
267
|
-
|
268
|
-
absl::string_view str) {
|
267
|
+
[[nodiscard]] inline absl::string_view StripAsciiWhitespace(
|
268
|
+
absl::string_view str ABSL_ATTRIBUTE_LIFETIME_BOUND) {
|
269
269
|
return StripTrailingAsciiWhitespace(StripLeadingAsciiWhitespace(str));
|
270
270
|
}
|
271
271
|
|
272
272
|
// Strips in place whitespace from both ends of the given string
|
273
|
-
inline void StripAsciiWhitespace(
|
273
|
+
inline void StripAsciiWhitespace(std::string* absl_nonnull str) {
|
274
274
|
StripTrailingAsciiWhitespace(str);
|
275
275
|
StripLeadingAsciiWhitespace(str);
|
276
276
|
}
|
277
277
|
|
278
278
|
// Removes leading, trailing, and consecutive internal whitespace.
|
279
|
-
void RemoveExtraAsciiWhitespace(
|
279
|
+
void RemoveExtraAsciiWhitespace(std::string* absl_nonnull str);
|
280
280
|
|
281
281
|
ABSL_NAMESPACE_END
|
282
282
|
} // namespace absl
|
@@ -120,7 +120,7 @@ struct FloatTraits<double> {
|
|
120
120
|
// Parsing a smaller N will produce something finite.
|
121
121
|
static constexpr int kEiselLemireMaxExclusiveExp10 = 309;
|
122
122
|
|
123
|
-
static double MakeNan(
|
123
|
+
static double MakeNan(const char* absl_nonnull tagp) {
|
124
124
|
#if ABSL_HAVE_BUILTIN(__builtin_nan)
|
125
125
|
// Use __builtin_nan() if available since it has a fix for
|
126
126
|
// https://bugs.llvm.org/show_bug.cgi?id=37778
|
@@ -193,7 +193,7 @@ struct FloatTraits<float> {
|
|
193
193
|
static constexpr int kEiselLemireMinInclusiveExp10 = -46 - 18;
|
194
194
|
static constexpr int kEiselLemireMaxExclusiveExp10 = 39;
|
195
195
|
|
196
|
-
static float MakeNan(
|
196
|
+
static float MakeNan(const char* absl_nonnull tagp) {
|
197
197
|
#if ABSL_HAVE_BUILTIN(__builtin_nanf)
|
198
198
|
// Use __builtin_nanf() if available since it has a fix for
|
199
199
|
// https://bugs.llvm.org/show_bug.cgi?id=37778
|
@@ -345,7 +345,7 @@ int NormalizedShiftSize(int mantissa_width, int binary_exponent) {
|
|
345
345
|
// `value` must be wider than the requested bit width.
|
346
346
|
//
|
347
347
|
// Returns the number of bits shifted.
|
348
|
-
int TruncateToBitWidth(int bit_width,
|
348
|
+
int TruncateToBitWidth(int bit_width, uint128* absl_nonnull value) {
|
349
349
|
const int current_bit_width = BitWidth(*value);
|
350
350
|
const int shift = current_bit_width - bit_width;
|
351
351
|
*value >>= shift;
|
@@ -357,7 +357,7 @@ int TruncateToBitWidth(int bit_width, absl::Nonnull<uint128*> value) {
|
|
357
357
|
// the appropriate double, and returns true.
|
358
358
|
template <typename FloatType>
|
359
359
|
bool HandleEdgeCase(const strings_internal::ParsedFloat& input, bool negative,
|
360
|
-
|
360
|
+
FloatType* absl_nonnull value) {
|
361
361
|
if (input.type == strings_internal::FloatType::kNan) {
|
362
362
|
// A bug in gcc would cause the compiler to optimize away the buffer we are
|
363
363
|
// building below. Declaring the buffer volatile avoids the issue, and has
|
@@ -389,7 +389,7 @@ bool HandleEdgeCase(const strings_internal::ParsedFloat& input, bool negative,
|
|
389
389
|
return true;
|
390
390
|
}
|
391
391
|
if (input.mantissa == 0) {
|
392
|
-
*value = negative ? -0.
|
392
|
+
*value = negative ? -0.0f : 0.0f;
|
393
393
|
return true;
|
394
394
|
}
|
395
395
|
return false;
|
@@ -403,8 +403,8 @@ bool HandleEdgeCase(const strings_internal::ParsedFloat& input, bool negative,
|
|
403
403
|
// number is stored in *value.
|
404
404
|
template <typename FloatType>
|
405
405
|
void EncodeResult(const CalculatedFloat& calculated, bool negative,
|
406
|
-
absl::
|
407
|
-
|
406
|
+
absl::from_chars_result* absl_nonnull result,
|
407
|
+
FloatType* absl_nonnull value) {
|
408
408
|
if (calculated.exponent == kOverflow) {
|
409
409
|
result->ec = std::errc::result_out_of_range;
|
410
410
|
*value = negative ? -std::numeric_limits<FloatType>::max()
|
@@ -412,7 +412,7 @@ void EncodeResult(const CalculatedFloat& calculated, bool negative,
|
|
412
412
|
return;
|
413
413
|
} else if (calculated.mantissa == 0 || calculated.exponent == kUnderflow) {
|
414
414
|
result->ec = std::errc::result_out_of_range;
|
415
|
-
*value = negative ? -0.
|
415
|
+
*value = negative ? -0.0f : 0.0f;
|
416
416
|
return;
|
417
417
|
}
|
418
418
|
*value = FloatTraits<FloatType>::Make(
|
@@ -450,7 +450,7 @@ void EncodeResult(const CalculatedFloat& calculated, bool negative,
|
|
450
450
|
// Zero and negative values of `shift` are accepted, in which case the word is
|
451
451
|
// shifted left, as necessary.
|
452
452
|
uint64_t ShiftRightAndRound(uint128 value, int shift, bool input_exact,
|
453
|
-
|
453
|
+
bool* absl_nonnull output_exact) {
|
454
454
|
if (shift <= 0) {
|
455
455
|
*output_exact = input_exact;
|
456
456
|
return static_cast<uint64_t>(value << -shift);
|
@@ -684,12 +684,11 @@ CalculatedFloat CalculateFromParsedDecimal(
|
|
684
684
|
// this function returns false) is both fast and correct.
|
685
685
|
template <typename FloatType>
|
686
686
|
bool EiselLemire(const strings_internal::ParsedFloat& input, bool negative,
|
687
|
-
|
688
|
-
absl::Nonnull<std::errc*> ec) {
|
687
|
+
FloatType* absl_nonnull value, std::errc* absl_nonnull ec) {
|
689
688
|
uint64_t man = input.mantissa;
|
690
689
|
int exp10 = input.exponent;
|
691
690
|
if (exp10 < FloatTraits<FloatType>::kEiselLemireMinInclusiveExp10) {
|
692
|
-
*value = negative ? -0.
|
691
|
+
*value = negative ? -0.0f : 0.0f;
|
693
692
|
*ec = std::errc::result_out_of_range;
|
694
693
|
return true;
|
695
694
|
} else if (exp10 >= FloatTraits<FloatType>::kEiselLemireMaxExclusiveExp10) {
|
@@ -842,7 +841,7 @@ bool EiselLemire(const strings_internal::ParsedFloat& input, bool negative,
|
|
842
841
|
if (negative) {
|
843
842
|
ret_bits |= 0x8000000000000000u;
|
844
843
|
}
|
845
|
-
*value = absl::bit_cast<double>(ret_bits);
|
844
|
+
*value = static_cast<FloatType>(absl::bit_cast<double>(ret_bits));
|
846
845
|
return true;
|
847
846
|
} else if (FloatTraits<FloatType>::kTargetBits == 32) {
|
848
847
|
uint32_t ret_bits = (static_cast<uint32_t>(ret_exp2) << 23) |
|
@@ -850,7 +849,7 @@ bool EiselLemire(const strings_internal::ParsedFloat& input, bool negative,
|
|
850
849
|
if (negative) {
|
851
850
|
ret_bits |= 0x80000000u;
|
852
851
|
}
|
853
|
-
*value = absl::bit_cast<float>(ret_bits);
|
852
|
+
*value = static_cast<FloatType>(absl::bit_cast<float>(ret_bits));
|
854
853
|
return true;
|
855
854
|
}
|
856
855
|
#endif // ABSL_BIT_PACK_FLOATS
|
@@ -858,9 +857,9 @@ bool EiselLemire(const strings_internal::ParsedFloat& input, bool negative,
|
|
858
857
|
}
|
859
858
|
|
860
859
|
template <typename FloatType>
|
861
|
-
from_chars_result FromCharsImpl(
|
862
|
-
|
863
|
-
|
860
|
+
from_chars_result FromCharsImpl(const char* absl_nonnull first,
|
861
|
+
const char* absl_nonnull last, FloatType& value,
|
862
|
+
chars_format fmt_flags) {
|
864
863
|
from_chars_result result;
|
865
864
|
result.ptr = first; // overwritten on successful parse
|
866
865
|
result.ec = std::errc();
|
@@ -890,7 +889,7 @@ from_chars_result FromCharsImpl(absl::Nonnull<const char*> first,
|
|
890
889
|
result.ec = std::errc::invalid_argument;
|
891
890
|
} else {
|
892
891
|
result.ptr = first + 1;
|
893
|
-
value = negative ? -0.
|
892
|
+
value = negative ? -0.0f : 0.0f;
|
894
893
|
}
|
895
894
|
return result;
|
896
895
|
}
|
@@ -945,14 +944,14 @@ from_chars_result FromCharsImpl(absl::Nonnull<const char*> first,
|
|
945
944
|
}
|
946
945
|
} // namespace
|
947
946
|
|
948
|
-
from_chars_result from_chars(
|
949
|
-
|
947
|
+
from_chars_result from_chars(const char* absl_nonnull first,
|
948
|
+
const char* absl_nonnull last, double& value,
|
950
949
|
chars_format fmt) {
|
951
950
|
return FromCharsImpl(first, last, value, fmt);
|
952
951
|
}
|
953
952
|
|
954
|
-
from_chars_result from_chars(
|
955
|
-
|
953
|
+
from_chars_result from_chars(const char* absl_nonnull first,
|
954
|
+
const char* absl_nonnull last, float& value,
|
956
955
|
chars_format fmt) {
|
957
956
|
return FromCharsImpl(first, last, value, fmt);
|
958
957
|
}
|
@@ -45,7 +45,7 @@ enum class chars_format {
|
|
45
45
|
// characters that were successfully parsed. If none was found, `ptr` is set
|
46
46
|
// to the `first` argument to from_chars.
|
47
47
|
struct from_chars_result {
|
48
|
-
|
48
|
+
const char* absl_nonnull ptr;
|
49
49
|
std::errc ec;
|
50
50
|
};
|
51
51
|
|
@@ -77,13 +77,13 @@ struct from_chars_result {
|
|
77
77
|
// format that strtod() accepts, except that a "0x" prefix is NOT matched.
|
78
78
|
// (In particular, in `hex` mode, the input "0xff" results in the largest
|
79
79
|
// matching pattern "0".)
|
80
|
-
absl::from_chars_result from_chars(
|
81
|
-
|
80
|
+
absl::from_chars_result from_chars(const char* absl_nonnull first,
|
81
|
+
const char* absl_nonnull last,
|
82
82
|
double& value, // NOLINT
|
83
83
|
chars_format fmt = chars_format::general);
|
84
84
|
|
85
|
-
absl::from_chars_result from_chars(
|
86
|
-
|
85
|
+
absl::from_chars_result from_chars(const char* absl_nonnull first,
|
86
|
+
const char* absl_nonnull last,
|
87
87
|
float& value, // NOLINT
|
88
88
|
chars_format fmt = chars_format::general);
|
89
89
|
|
@@ -75,21 +75,19 @@ using ::absl::cord_internal::kMinFlatLength;
|
|
75
75
|
using ::absl::cord_internal::kInlinedVectorSize;
|
76
76
|
using ::absl::cord_internal::kMaxBytesToCopy;
|
77
77
|
|
78
|
-
static void DumpNode(
|
79
|
-
|
80
|
-
static bool VerifyNode(
|
81
|
-
|
78
|
+
static void DumpNode(CordRep* absl_nonnull nonnull_rep, bool include_data,
|
79
|
+
std::ostream* absl_nonnull os, int indent = 0);
|
80
|
+
static bool VerifyNode(CordRep* absl_nonnull root,
|
81
|
+
CordRep* absl_nonnull start_node);
|
82
82
|
|
83
|
-
static inline
|
84
|
-
absl::Nullable<CordRep*> node) {
|
83
|
+
static inline CordRep* absl_nullable VerifyTree(CordRep* absl_nullable node) {
|
85
84
|
assert(node == nullptr || VerifyNode(node, node));
|
86
85
|
static_cast<void>(&VerifyNode);
|
87
86
|
return node;
|
88
87
|
}
|
89
88
|
|
90
|
-
static
|
91
|
-
|
92
|
-
size_t alloc_hint) {
|
89
|
+
static CordRepFlat* absl_nonnull CreateFlat(const char* absl_nonnull data,
|
90
|
+
size_t length, size_t alloc_hint) {
|
93
91
|
CordRepFlat* flat = CordRepFlat::New(length + alloc_hint);
|
94
92
|
flat->length = length;
|
95
93
|
memcpy(flat->Data(), data, length);
|
@@ -98,8 +96,8 @@ static absl::Nonnull<CordRepFlat*> CreateFlat(absl::Nonnull<const char*> data,
|
|
98
96
|
|
99
97
|
// Creates a new flat or Btree out of the specified array.
|
100
98
|
// The returned node has a refcount of 1.
|
101
|
-
static
|
102
|
-
|
99
|
+
static CordRep* absl_nonnull NewBtree(const char* absl_nonnull data,
|
100
|
+
size_t length, size_t alloc_hint) {
|
103
101
|
if (length <= kMaxFlatLength) {
|
104
102
|
return CreateFlat(data, length, alloc_hint);
|
105
103
|
}
|
@@ -112,8 +110,8 @@ static absl::Nonnull<CordRep*> NewBtree(absl::Nonnull<const char*> data,
|
|
112
110
|
|
113
111
|
// Create a new tree out of the specified array.
|
114
112
|
// The returned node has a refcount of 1.
|
115
|
-
static
|
116
|
-
|
113
|
+
static CordRep* absl_nullable NewTree(const char* absl_nullable data,
|
114
|
+
size_t length, size_t alloc_hint) {
|
117
115
|
if (length == 0) return nullptr;
|
118
116
|
return NewBtree(data, length, alloc_hint);
|
119
117
|
}
|
@@ -121,7 +119,7 @@ static absl::Nullable<CordRep*> NewTree(absl::Nullable<const char*> data,
|
|
121
119
|
namespace cord_internal {
|
122
120
|
|
123
121
|
void InitializeCordRepExternal(absl::string_view data,
|
124
|
-
|
122
|
+
CordRepExternal* absl_nonnull rep) {
|
125
123
|
assert(!data.empty());
|
126
124
|
rep->length = data.size();
|
127
125
|
rep->tag = EXTERNAL;
|
@@ -135,7 +133,7 @@ void InitializeCordRepExternal(absl::string_view data,
|
|
135
133
|
// and not wasteful, we move the string into an external cord rep, preserving
|
136
134
|
// the already allocated string contents.
|
137
135
|
// Requires the provided string length to be larger than `kMaxInline`.
|
138
|
-
static
|
136
|
+
static CordRep* absl_nonnull CordRepFromString(std::string&& src) {
|
139
137
|
assert(src.length() > cord_internal::kMaxInline);
|
140
138
|
if (
|
141
139
|
// String is short: copy data to avoid external block overhead.
|
@@ -163,17 +161,12 @@ static absl::Nonnull<CordRep*> CordRepFromString(std::string&& src) {
|
|
163
161
|
// --------------------------------------------------------------------
|
164
162
|
// Cord::InlineRep functions
|
165
163
|
|
166
|
-
|
167
|
-
constexpr unsigned char Cord::InlineRep::kMaxInline;
|
168
|
-
#endif
|
169
|
-
|
170
|
-
inline void Cord::InlineRep::set_data(absl::Nonnull<const char*> data,
|
171
|
-
size_t n) {
|
164
|
+
inline void Cord::InlineRep::set_data(const char* absl_nonnull data, size_t n) {
|
172
165
|
static_assert(kMaxInline == 15, "set_data is hard-coded for a length of 15");
|
173
166
|
data_.set_inline_data(data, n);
|
174
167
|
}
|
175
168
|
|
176
|
-
inline
|
169
|
+
inline char* absl_nonnull Cord::InlineRep::set_data(size_t n) {
|
177
170
|
assert(n <= kMaxInline);
|
178
171
|
ResetToEmpty();
|
179
172
|
set_inline_size(n);
|
@@ -197,13 +190,13 @@ inline void Cord::InlineRep::remove_prefix(size_t n) {
|
|
197
190
|
|
198
191
|
// Returns `rep` converted into a CordRepBtree.
|
199
192
|
// Directly returns `rep` if `rep` is already a CordRepBtree.
|
200
|
-
static
|
193
|
+
static CordRepBtree* absl_nonnull ForceBtree(CordRep* rep) {
|
201
194
|
return rep->IsBtree()
|
202
195
|
? rep->btree()
|
203
196
|
: CordRepBtree::Create(cord_internal::RemoveCrcNode(rep));
|
204
197
|
}
|
205
198
|
|
206
|
-
void Cord::InlineRep::AppendTreeToInlined(
|
199
|
+
void Cord::InlineRep::AppendTreeToInlined(CordRep* absl_nonnull tree,
|
207
200
|
MethodIdentifier method) {
|
208
201
|
assert(!is_tree());
|
209
202
|
if (!data_.is_empty()) {
|
@@ -213,7 +206,7 @@ void Cord::InlineRep::AppendTreeToInlined(absl::Nonnull<CordRep*> tree,
|
|
213
206
|
EmplaceTree(tree, method);
|
214
207
|
}
|
215
208
|
|
216
|
-
void Cord::InlineRep::AppendTreeToTree(
|
209
|
+
void Cord::InlineRep::AppendTreeToTree(CordRep* absl_nonnull tree,
|
217
210
|
MethodIdentifier method) {
|
218
211
|
assert(is_tree());
|
219
212
|
const CordzUpdateScope scope(data_.cordz_info(), method);
|
@@ -221,7 +214,7 @@ void Cord::InlineRep::AppendTreeToTree(absl::Nonnull<CordRep*> tree,
|
|
221
214
|
SetTree(tree, scope);
|
222
215
|
}
|
223
216
|
|
224
|
-
void Cord::InlineRep::AppendTree(
|
217
|
+
void Cord::InlineRep::AppendTree(CordRep* absl_nonnull tree,
|
225
218
|
MethodIdentifier method) {
|
226
219
|
assert(tree != nullptr);
|
227
220
|
assert(tree->length != 0);
|
@@ -233,7 +226,7 @@ void Cord::InlineRep::AppendTree(absl::Nonnull<CordRep*> tree,
|
|
233
226
|
}
|
234
227
|
}
|
235
228
|
|
236
|
-
void Cord::InlineRep::PrependTreeToInlined(
|
229
|
+
void Cord::InlineRep::PrependTreeToInlined(CordRep* absl_nonnull tree,
|
237
230
|
MethodIdentifier method) {
|
238
231
|
assert(!is_tree());
|
239
232
|
if (!data_.is_empty()) {
|
@@ -243,7 +236,7 @@ void Cord::InlineRep::PrependTreeToInlined(absl::Nonnull<CordRep*> tree,
|
|
243
236
|
EmplaceTree(tree, method);
|
244
237
|
}
|
245
238
|
|
246
|
-
void Cord::InlineRep::PrependTreeToTree(
|
239
|
+
void Cord::InlineRep::PrependTreeToTree(CordRep* absl_nonnull tree,
|
247
240
|
MethodIdentifier method) {
|
248
241
|
assert(is_tree());
|
249
242
|
const CordzUpdateScope scope(data_.cordz_info(), method);
|
@@ -251,7 +244,7 @@ void Cord::InlineRep::PrependTreeToTree(absl::Nonnull<CordRep*> tree,
|
|
251
244
|
SetTree(tree, scope);
|
252
245
|
}
|
253
246
|
|
254
|
-
void Cord::InlineRep::PrependTree(
|
247
|
+
void Cord::InlineRep::PrependTree(CordRep* absl_nonnull tree,
|
255
248
|
MethodIdentifier method) {
|
256
249
|
assert(tree != nullptr);
|
257
250
|
assert(tree->length != 0);
|
@@ -267,9 +260,10 @@ void Cord::InlineRep::PrependTree(absl::Nonnull<CordRep*> tree,
|
|
267
260
|
// suitable leaf is found, the function will update the length field for all
|
268
261
|
// nodes to account for the size increase. The append region address will be
|
269
262
|
// written to region and the actual size increase will be written to size.
|
270
|
-
static inline bool PrepareAppendRegion(
|
271
|
-
|
272
|
-
|
263
|
+
static inline bool PrepareAppendRegion(CordRep* absl_nonnull root,
|
264
|
+
char* absl_nullable* absl_nonnull region,
|
265
|
+
size_t* absl_nonnull size,
|
266
|
+
size_t max_length) {
|
273
267
|
if (root->IsBtree() && root->refcount.IsOne()) {
|
274
268
|
Span<char> span = root->btree()->GetAppendBuffer(max_length);
|
275
269
|
if (!span.empty()) {
|
@@ -472,11 +466,11 @@ void Cord::InlineRep::AppendArray(absl::string_view src,
|
|
472
466
|
CommitTree(root, rep, scope, method);
|
473
467
|
}
|
474
468
|
|
475
|
-
inline
|
469
|
+
inline CordRep* absl_nonnull Cord::TakeRep() const& {
|
476
470
|
return CordRep::Ref(contents_.tree());
|
477
471
|
}
|
478
472
|
|
479
|
-
inline
|
473
|
+
inline CordRep* absl_nonnull Cord::TakeRep() && {
|
480
474
|
CordRep* rep = contents_.tree();
|
481
475
|
contents_.clear();
|
482
476
|
return rep;
|
@@ -534,7 +528,7 @@ inline void Cord::AppendImpl(C&& src) {
|
|
534
528
|
contents_.AppendTree(rep, CordzUpdateTracker::kAppendCord);
|
535
529
|
}
|
536
530
|
|
537
|
-
static CordRep::ExtractResult ExtractAppendBuffer(
|
531
|
+
static CordRep::ExtractResult ExtractAppendBuffer(CordRep* absl_nonnull rep,
|
538
532
|
size_t min_capacity) {
|
539
533
|
switch (rep->tag) {
|
540
534
|
case cord_internal::BTREE:
|
@@ -781,9 +775,9 @@ int ClampResult(int memcmp_res) {
|
|
781
775
|
return static_cast<int>(memcmp_res > 0) - static_cast<int>(memcmp_res < 0);
|
782
776
|
}
|
783
777
|
|
784
|
-
int CompareChunks(absl::
|
785
|
-
absl::
|
786
|
-
|
778
|
+
int CompareChunks(absl::string_view* absl_nonnull lhs,
|
779
|
+
absl::string_view* absl_nonnull rhs,
|
780
|
+
size_t* absl_nonnull size_to_compare) {
|
787
781
|
size_t compared_size = std::min(lhs->size(), rhs->size());
|
788
782
|
assert(*size_to_compare >= compared_size);
|
789
783
|
*size_to_compare -= compared_size;
|
@@ -881,7 +875,7 @@ void Cord::SetExpectedChecksum(uint32_t crc) {
|
|
881
875
|
SetCrcCordState(std::move(state));
|
882
876
|
}
|
883
877
|
|
884
|
-
|
878
|
+
const crc_internal::CrcCordState* absl_nullable Cord::MaybeGetCrcCordState()
|
885
879
|
const {
|
886
880
|
if (!contents_.is_tree() || !contents_.tree()->IsCrc()) {
|
887
881
|
return nullptr;
|
@@ -899,8 +893,8 @@ absl::optional<uint32_t> Cord::ExpectedChecksum() const {
|
|
899
893
|
|
900
894
|
inline int Cord::CompareSlowPath(absl::string_view rhs, size_t compared_size,
|
901
895
|
size_t size_to_compare) const {
|
902
|
-
auto advance = [](
|
903
|
-
absl::
|
896
|
+
auto advance = [](Cord::ChunkIterator* absl_nonnull it,
|
897
|
+
absl::string_view* absl_nonnull chunk) {
|
904
898
|
if (!chunk->empty()) return true;
|
905
899
|
++*it;
|
906
900
|
if (it->bytes_remaining_ == 0) return false;
|
@@ -930,8 +924,8 @@ inline int Cord::CompareSlowPath(absl::string_view rhs, size_t compared_size,
|
|
930
924
|
|
931
925
|
inline int Cord::CompareSlowPath(const Cord& rhs, size_t compared_size,
|
932
926
|
size_t size_to_compare) const {
|
933
|
-
auto advance = [](
|
934
|
-
absl::
|
927
|
+
auto advance = [](Cord::ChunkIterator* absl_nonnull it,
|
928
|
+
absl::string_view* absl_nonnull chunk) {
|
935
929
|
if (!chunk->empty()) return true;
|
936
930
|
++*it;
|
937
931
|
if (it->bytes_remaining_ == 0) return false;
|
@@ -981,7 +975,9 @@ ResultType GenericCompare(const Cord& lhs, const RHS& rhs,
|
|
981
975
|
|
982
976
|
size_t compared_size = std::min(lhs_chunk.size(), rhs_chunk.size());
|
983
977
|
assert(size_to_compare >= compared_size);
|
984
|
-
int memcmp_res = ::memcmp(lhs_chunk.data(),
|
978
|
+
int memcmp_res = compared_size > 0 ? ::memcmp(lhs_chunk.data(),
|
979
|
+
rhs_chunk.data(), compared_size)
|
980
|
+
: 0;
|
985
981
|
if (compared_size == size_to_compare || memcmp_res != 0) {
|
986
982
|
return ComputeCompareResult<ResultType>(memcmp_res);
|
987
983
|
}
|
@@ -1053,7 +1049,7 @@ Cord::operator std::string() const {
|
|
1053
1049
|
return s;
|
1054
1050
|
}
|
1055
1051
|
|
1056
|
-
void CopyCordToString(const Cord& src,
|
1052
|
+
void CopyCordToString(const Cord& src, std::string* absl_nonnull dst) {
|
1057
1053
|
if (!src.contents_.is_tree()) {
|
1058
1054
|
src.contents_.CopyTo(dst);
|
1059
1055
|
} else {
|
@@ -1062,7 +1058,7 @@ void CopyCordToString(const Cord& src, absl::Nonnull<std::string*> dst) {
|
|
1062
1058
|
}
|
1063
1059
|
}
|
1064
1060
|
|
1065
|
-
void AppendCordToString(const Cord& src,
|
1061
|
+
void AppendCordToString(const Cord& src, std::string* absl_nonnull dst) {
|
1066
1062
|
const size_t cur_dst_size = dst->size();
|
1067
1063
|
const size_t new_dst_size = cur_dst_size + src.size();
|
1068
1064
|
absl::strings_internal::STLStringResizeUninitializedAmortized(dst,
|
@@ -1071,10 +1067,10 @@ void AppendCordToString(const Cord& src, absl::Nonnull<std::string*> dst) {
|
|
1071
1067
|
src.CopyToArrayImpl(append_ptr);
|
1072
1068
|
}
|
1073
1069
|
|
1074
|
-
void Cord::CopyToArraySlowPath(
|
1070
|
+
void Cord::CopyToArraySlowPath(char* absl_nonnull dst) const {
|
1075
1071
|
assert(contents_.is_tree());
|
1076
1072
|
absl::string_view fragment;
|
1077
|
-
if (GetFlatAux(contents_.tree(), &fragment)) {
|
1073
|
+
if (GetFlatAux(contents_.tree(), &fragment) && !fragment.empty()) {
|
1078
1074
|
memcpy(dst, fragment.data(), fragment.size());
|
1079
1075
|
return;
|
1080
1076
|
}
|
@@ -1397,8 +1393,8 @@ absl::string_view Cord::FlattenSlowPath() {
|
|
1397
1393
|
return absl::string_view(new_buffer, total_size);
|
1398
1394
|
}
|
1399
1395
|
|
1400
|
-
/* static */ bool Cord::GetFlatAux(
|
1401
|
-
absl::
|
1396
|
+
/* static */ bool Cord::GetFlatAux(CordRep* absl_nonnull rep,
|
1397
|
+
absl::string_view* absl_nonnull fragment) {
|
1402
1398
|
assert(rep != nullptr);
|
1403
1399
|
if (rep->length == 0) {
|
1404
1400
|
*fragment = absl::string_view();
|
@@ -1432,7 +1428,7 @@ absl::string_view Cord::FlattenSlowPath() {
|
|
1432
1428
|
}
|
1433
1429
|
|
1434
1430
|
/* static */ void Cord::ForEachChunkAux(
|
1435
|
-
absl::
|
1431
|
+
absl::cord_internal::CordRep* absl_nonnull rep,
|
1436
1432
|
absl::FunctionRef<void(absl::string_view)> callback) {
|
1437
1433
|
assert(rep != nullptr);
|
1438
1434
|
if (rep->length == 0) return;
|
@@ -1457,8 +1453,8 @@ absl::string_view Cord::FlattenSlowPath() {
|
|
1457
1453
|
}
|
1458
1454
|
}
|
1459
1455
|
|
1460
|
-
static void DumpNode(
|
1461
|
-
|
1456
|
+
static void DumpNode(CordRep* absl_nonnull nonnull_rep, bool include_data,
|
1457
|
+
std::ostream* absl_nonnull os, int indent) {
|
1462
1458
|
CordRep* rep = nonnull_rep;
|
1463
1459
|
const int kIndentStep = 1;
|
1464
1460
|
for (;;) {
|
@@ -1504,17 +1500,17 @@ static void DumpNode(absl::Nonnull<CordRep*> nonnull_rep, bool include_data,
|
|
1504
1500
|
}
|
1505
1501
|
}
|
1506
1502
|
|
1507
|
-
static std::string ReportError(
|
1508
|
-
|
1503
|
+
static std::string ReportError(CordRep* absl_nonnull root,
|
1504
|
+
CordRep* absl_nonnull node) {
|
1509
1505
|
std::ostringstream buf;
|
1510
1506
|
buf << "Error at node " << node << " in:";
|
1511
1507
|
DumpNode(root, true, &buf);
|
1512
1508
|
return buf.str();
|
1513
1509
|
}
|
1514
1510
|
|
1515
|
-
static bool VerifyNode(
|
1516
|
-
|
1517
|
-
absl::InlinedVector<
|
1511
|
+
static bool VerifyNode(CordRep* absl_nonnull root,
|
1512
|
+
CordRep* absl_nonnull start_node) {
|
1513
|
+
absl::InlinedVector<CordRep* absl_nonnull, 2> worklist;
|
1518
1514
|
worklist.push_back(start_node);
|
1519
1515
|
do {
|
1520
1516
|
CordRep* node = worklist.back();
|