gitlab-grpc 1.42.1.gitlab
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +1 -0
- data/Makefile +3004 -0
- data/etc/roots.pem +4337 -0
- data/include/grpc/byte_buffer.h +27 -0
- data/include/grpc/byte_buffer_reader.h +26 -0
- data/include/grpc/census.h +40 -0
- data/include/grpc/compression.h +75 -0
- data/include/grpc/event_engine/README.md +38 -0
- data/include/grpc/event_engine/endpoint_config.h +43 -0
- data/include/grpc/event_engine/event_engine.h +375 -0
- data/include/grpc/event_engine/internal/memory_allocator_impl.h +98 -0
- data/include/grpc/event_engine/memory_allocator.h +210 -0
- data/include/grpc/event_engine/port.h +39 -0
- data/include/grpc/fork.h +26 -0
- data/include/grpc/grpc.h +579 -0
- data/include/grpc/grpc_cronet.h +38 -0
- data/include/grpc/grpc_posix.h +62 -0
- data/include/grpc/grpc_security.h +1142 -0
- data/include/grpc/grpc_security_constants.h +165 -0
- data/include/grpc/impl/codegen/README.md +22 -0
- data/include/grpc/impl/codegen/atm.h +97 -0
- data/include/grpc/impl/codegen/atm_gcc_atomic.h +93 -0
- data/include/grpc/impl/codegen/atm_gcc_sync.h +87 -0
- data/include/grpc/impl/codegen/atm_windows.h +134 -0
- data/include/grpc/impl/codegen/byte_buffer.h +103 -0
- data/include/grpc/impl/codegen/byte_buffer_reader.h +44 -0
- data/include/grpc/impl/codegen/compression_types.h +110 -0
- data/include/grpc/impl/codegen/connectivity_state.h +46 -0
- data/include/grpc/impl/codegen/fork.h +50 -0
- data/include/grpc/impl/codegen/gpr_slice.h +71 -0
- data/include/grpc/impl/codegen/gpr_types.h +61 -0
- data/include/grpc/impl/codegen/grpc_types.h +813 -0
- data/include/grpc/impl/codegen/log.h +112 -0
- data/include/grpc/impl/codegen/port_platform.h +719 -0
- data/include/grpc/impl/codegen/propagation_bits.h +54 -0
- data/include/grpc/impl/codegen/slice.h +129 -0
- data/include/grpc/impl/codegen/status.h +156 -0
- data/include/grpc/impl/codegen/sync.h +68 -0
- data/include/grpc/impl/codegen/sync_abseil.h +38 -0
- data/include/grpc/impl/codegen/sync_custom.h +40 -0
- data/include/grpc/impl/codegen/sync_generic.h +51 -0
- data/include/grpc/impl/codegen/sync_posix.h +54 -0
- data/include/grpc/impl/codegen/sync_windows.h +42 -0
- data/include/grpc/load_reporting.h +48 -0
- data/include/grpc/module.modulemap +64 -0
- data/include/grpc/slice.h +172 -0
- data/include/grpc/slice_buffer.h +84 -0
- data/include/grpc/status.h +26 -0
- data/include/grpc/support/alloc.h +52 -0
- data/include/grpc/support/atm.h +26 -0
- data/include/grpc/support/atm_gcc_atomic.h +26 -0
- data/include/grpc/support/atm_gcc_sync.h +26 -0
- data/include/grpc/support/atm_windows.h +26 -0
- data/include/grpc/support/cpu.h +44 -0
- data/include/grpc/support/log.h +26 -0
- data/include/grpc/support/log_windows.h +38 -0
- data/include/grpc/support/port_platform.h +24 -0
- data/include/grpc/support/string_util.h +51 -0
- data/include/grpc/support/sync.h +282 -0
- data/include/grpc/support/sync_abseil.h +26 -0
- data/include/grpc/support/sync_custom.h +26 -0
- data/include/grpc/support/sync_generic.h +26 -0
- data/include/grpc/support/sync_posix.h +26 -0
- data/include/grpc/support/sync_windows.h +26 -0
- data/include/grpc/support/thd_id.h +44 -0
- data/include/grpc/support/time.h +92 -0
- data/include/grpc/support/workaround_list.h +31 -0
- data/src/core/ext/filters/census/grpc_context.cc +39 -0
- data/src/core/ext/filters/client_channel/backend_metric.cc +80 -0
- data/src/core/ext/filters/client_channel/backend_metric.h +36 -0
- data/src/core/ext/filters/client_channel/backup_poller.cc +183 -0
- data/src/core/ext/filters/client_channel/backup_poller.h +42 -0
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +220 -0
- data/src/core/ext/filters/client_channel/client_channel.cc +3119 -0
- data/src/core/ext/filters/client_channel/client_channel.h +581 -0
- data/src/core/ext/filters/client_channel/client_channel_channelz.cc +96 -0
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +75 -0
- data/src/core/ext/filters/client_channel/client_channel_factory.cc +56 -0
- data/src/core/ext/filters/client_channel/client_channel_factory.h +46 -0
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +74 -0
- data/src/core/ext/filters/client_channel/config_selector.cc +59 -0
- data/src/core/ext/filters/client_channel/config_selector.h +145 -0
- data/src/core/ext/filters/client_channel/connector.h +79 -0
- data/src/core/ext/filters/client_channel/dynamic_filters.cc +190 -0
- data/src/core/ext/filters/client_channel/dynamic_filters.h +99 -0
- data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +83 -0
- data/src/core/ext/filters/client_channel/global_subchannel_pool.h +72 -0
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +619 -0
- data/src/core/ext/filters/client_channel/health/health_check_client.h +177 -0
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +392 -0
- data/src/core/ext/filters/client_channel/http_connect_handshaker.h +42 -0
- data/src/core/ext/filters/client_channel/http_proxy.cc +234 -0
- data/src/core/ext/filters/client_channel/http_proxy.h +28 -0
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.cc +96 -0
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +101 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +304 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +83 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +148 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h +29 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +1866 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +47 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc +76 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +37 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +44 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +83 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +93 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +76 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +192 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +74 -0
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +522 -0
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +918 -0
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +757 -0
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h +37 -0
- data/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +2502 -0
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +503 -0
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +426 -0
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +741 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +745 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.h +60 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h +29 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +795 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +701 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +1362 -0
- data/src/core/ext/filters/client_channel/lb_policy.cc +131 -0
- data/src/core/ext/filters/client_channel/lb_policy.h +425 -0
- data/src/core/ext/filters/client_channel/lb_policy_factory.h +48 -0
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +185 -0
- data/src/core/ext/filters/client_channel/lb_policy_registry.h +65 -0
- data/src/core/ext/filters/client_channel/local_subchannel_pool.cc +56 -0
- data/src/core/ext/filters/client_channel/local_subchannel_pool.h +58 -0
- data/src/core/ext/filters/client_channel/proxy_mapper.h +54 -0
- data/src/core/ext/filters/client_channel/proxy_mapper_registry.cc +89 -0
- data/src/core/ext/filters/client_channel/proxy_mapper_registry.h +50 -0
- data/src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc +139 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +526 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +74 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc +31 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +110 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +902 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +1203 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +122 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc +28 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc +29 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +34 -0
- data/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc +28 -0
- data/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h +29 -0
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +332 -0
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +380 -0
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +95 -0
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +384 -0
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +195 -0
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +1002 -0
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h +28 -0
- data/src/core/ext/filters/client_channel/resolver.cc +87 -0
- data/src/core/ext/filters/client_channel/resolver.h +136 -0
- data/src/core/ext/filters/client_channel/resolver_factory.h +75 -0
- data/src/core/ext/filters/client_channel/resolver_registry.cc +195 -0
- data/src/core/ext/filters/client_channel/resolver_registry.h +89 -0
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +189 -0
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +99 -0
- data/src/core/ext/filters/client_channel/retry_filter.cc +2573 -0
- data/src/core/ext/filters/client_channel/retry_filter.h +30 -0
- data/src/core/ext/filters/client_channel/retry_service_config.cc +316 -0
- data/src/core/ext/filters/client_channel/retry_service_config.h +96 -0
- data/src/core/ext/filters/client_channel/retry_throttle.cc +162 -0
- data/src/core/ext/filters/client_channel/retry_throttle.h +79 -0
- data/src/core/ext/filters/client_channel/server_address.cc +170 -0
- data/src/core/ext/filters/client_channel/server_address.h +144 -0
- data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +156 -0
- data/src/core/ext/filters/client_channel/subchannel.cc +1021 -0
- data/src/core/ext/filters/client_channel/subchannel.h +382 -0
- data/src/core/ext/filters/client_channel/subchannel_interface.h +130 -0
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.cc +126 -0
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +106 -0
- data/src/core/ext/filters/client_idle/client_idle_filter.cc +264 -0
- data/src/core/ext/filters/client_idle/idle_filter_state.cc +96 -0
- data/src/core/ext/filters/client_idle/idle_filter_state.h +66 -0
- data/src/core/ext/filters/deadline/deadline_filter.cc +391 -0
- data/src/core/ext/filters/deadline/deadline_filter.h +86 -0
- data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +503 -0
- data/src/core/ext/filters/fault_injection/fault_injection_filter.h +39 -0
- data/src/core/ext/filters/fault_injection/service_config_parser.cc +181 -0
- data/src/core/ext/filters/fault_injection/service_config_parser.h +85 -0
- data/src/core/ext/filters/http/client/http_client_filter.cc +604 -0
- data/src/core/ext/filters/http/client/http_client_filter.h +31 -0
- data/src/core/ext/filters/http/client_authority_filter.cc +159 -0
- data/src/core/ext/filters/http/client_authority_filter.h +34 -0
- data/src/core/ext/filters/http/http_filters_plugin.cc +90 -0
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +553 -0
- data/src/core/ext/filters/http/message_compress/message_compress_filter.h +53 -0
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +398 -0
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.h +31 -0
- data/src/core/ext/filters/http/server/http_server_filter.cc +537 -0
- data/src/core/ext/filters/http/server/http_server_filter.h +29 -0
- data/src/core/ext/filters/max_age/max_age_filter.cc +560 -0
- data/src/core/ext/filters/max_age/max_age_filter.h +26 -0
- data/src/core/ext/filters/message_size/message_size_filter.cc +402 -0
- data/src/core/ext/filters/message_size/message_size_filter.h +66 -0
- data/src/core/ext/service_config/service_config.cc +227 -0
- data/src/core/ext/service_config/service_config.h +127 -0
- data/src/core/ext/service_config/service_config_call_data.h +72 -0
- data/src/core/ext/service_config/service_config_parser.cc +89 -0
- data/src/core/ext/service_config/service_config_parser.h +97 -0
- data/src/core/ext/transport/chttp2/alpn/alpn.cc +45 -0
- data/src/core/ext/transport/chttp2/alpn/alpn.h +36 -0
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +276 -0
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +77 -0
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +119 -0
- data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +95 -0
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +189 -0
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +923 -0
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +47 -0
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +53 -0
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +83 -0
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +125 -0
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +252 -0
- data/src/core/ext/transport/chttp2/transport/bin_decoder.h +57 -0
- data/src/core/ext/transport/chttp2/transport/bin_encoder.cc +231 -0
- data/src/core/ext/transport/chttp2/transport/bin_encoder.h +42 -0
- data/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc +37 -0
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +3351 -0
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +66 -0
- data/src/core/ext/transport/chttp2/transport/context_list.cc +68 -0
- data/src/core/ext/transport/chttp2/transport/context_list.h +52 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +430 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.h +488 -0
- data/src/core/ext/transport/chttp2/transport/frame.h +47 -0
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +308 -0
- data/src/core/ext/transport/chttp2/transport/frame_data.h +83 -0
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +187 -0
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +63 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +132 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +46 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +118 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +51 -0
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +273 -0
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +62 -0
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +123 -0
- data/src/core/ext/transport/chttp2/transport/frame_window_update.h +43 -0
- data/src/core/ext/transport/chttp2/transport/hpack_constants.h +41 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +546 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +277 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_index.h +107 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc +86 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.h +69 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +1454 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +136 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +146 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +137 -0
- data/src/core/ext/transport/chttp2/transport/hpack_utils.cc +46 -0
- data/src/core/ext/transport/chttp2/transport/hpack_utils.h +30 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings.cc +62 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +61 -0
- data/src/core/ext/transport/chttp2/transport/huffsyms.cc +92 -0
- data/src/core/ext/transport/chttp2/transport/huffsyms.h +32 -0
- data/src/core/ext/transport/chttp2/transport/internal.h +892 -0
- data/src/core/ext/transport/chttp2/transport/parsing.cc +651 -0
- data/src/core/ext/transport/chttp2/transport/popularity_count.h +60 -0
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +216 -0
- data/src/core/ext/transport/chttp2/transport/stream_map.cc +177 -0
- data/src/core/ext/transport/chttp2/transport/stream_map.h +67 -0
- data/src/core/ext/transport/chttp2/transport/varint.cc +62 -0
- data/src/core/ext/transport/chttp2/transport/varint.h +71 -0
- data/src/core/ext/transport/chttp2/transport/writing.cc +716 -0
- data/src/core/ext/transport/inproc/inproc_plugin.cc +28 -0
- data/src/core/ext/transport/inproc/inproc_transport.cc +1360 -0
- data/src/core/ext/transport/inproc/inproc_transport.h +35 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c +406 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h +1591 -0
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c +17 -0
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +30 -0
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +66 -0
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +243 -0
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +955 -0
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c +371 -0
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h +1554 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c +74 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h +271 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +494 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +2116 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h +83 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c +56 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h +370 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +124 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +470 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h +94 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +382 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +1295 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +103 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +418 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h +84 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h +161 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +241 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +917 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +171 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +830 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c +36 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h +94 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +244 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +1089 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h +71 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.c +46 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.h +133 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +101 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +43 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h +132 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.h +96 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c +90 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h +261 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +125 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +462 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c +112 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h +397 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c +33 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h +79 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +138 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +640 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +161 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +680 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.c +48 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.h +177 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +42 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +127 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c +144 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h +536 -0
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c +153 -0
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h +550 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +185 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +738 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +82 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +312 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +960 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +4213 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +60 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +177 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c +49 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h +134 -0
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c +29 -0
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h +73 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c +79 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h +298 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c +79 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h +303 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c +42 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h +123 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +403 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +1785 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c +19 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +35 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +130 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +559 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +73 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +237 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +148 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +674 -0
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c +25 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +146 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +535 -0
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c +54 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h +163 -0
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c +121 -0
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h +468 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.c +60 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.h +205 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +48 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +144 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c +36 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h +96 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h +90 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h +84 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +65 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +184 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +158 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c +46 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h +136 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h +225 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h +343 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c +90 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h +313 -0
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.c +17 -0
- data/src/core/ext/upb-generated/envoy/type/v3/http.upb.h +36 -0
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c +40 -0
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h +111 -0
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.c +51 -0
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.h +148 -0
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c +30 -0
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h +74 -0
- data/src/core/ext/upb-generated/google/api/annotations.upb.c +18 -0
- data/src/core/ext/upb-generated/google/api/annotations.upb.h +30 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c +242 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h +896 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +251 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +943 -0
- data/src/core/ext/upb-generated/google/api/http.upb.c +66 -0
- data/src/core/ext/upb-generated/google/api/http.upb.h +228 -0
- data/src/core/ext/upb-generated/google/protobuf/any.upb.c +27 -0
- data/src/core/ext/upb-generated/google/protobuf/any.upb.h +70 -0
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +486 -0
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +2047 -0
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +27 -0
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +70 -0
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +22 -0
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +62 -0
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +79 -0
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +231 -0
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +27 -0
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +70 -0
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +106 -0
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +346 -0
- data/src/core/ext/upb-generated/google/rpc/status.upb.c +33 -0
- data/src/core/ext/upb-generated/google/rpc/status.upb.h +87 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +49 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +127 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +212 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +805 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +42 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +137 -0
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +36 -0
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +108 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +141 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +507 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.c +55 -0
- data/src/core/ext/upb-generated/src/proto/grpc/lookup/v1/rls.upb.h +154 -0
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +48 -0
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +140 -0
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.c +29 -0
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.h +70 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c +17 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +30 -0
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.c +28 -0
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.h +77 -0
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c +27 -0
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h +66 -0
- data/src/core/ext/upb-generated/validate/validate.upb.c +464 -0
- data/src/core/ext/upb-generated/validate/validate.upb.h +2447 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.c +58 -0
- data/src/core/ext/upb-generated/xds/annotations/v3/status.upb.h +182 -0
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.c +28 -0
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.h +66 -0
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c +52 -0
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h +155 -0
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c +42 -0
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h +90 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.c +36 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.h +100 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c +54 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h +178 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c +36 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h +91 -0
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.c +58 -0
- data/src/core/ext/upb-generated/xds/data/orca/v3/orca_load_report.upb.h +130 -0
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.c +33 -0
- data/src/core/ext/upb-generated/xds/type/v3/typed_struct.upb.h +83 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c +354 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.h +140 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c +41 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c +252 -0
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h +105 -0
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +424 -0
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h +120 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +596 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +155 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c +136 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c +127 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +313 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h +150 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c +144 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c +66 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c +263 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c +236 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +300 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c +43 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c +107 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +140 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c +146 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +205 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c +201 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.c +90 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c +67 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c +141 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c +152 -0
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h +75 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +115 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +982 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +295 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c +71 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c +61 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c +51 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c +102 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c +123 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c +79 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +567 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +125 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c +44 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +196 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c +97 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +251 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c +60 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c +142 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c +73 -0
- data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c +80 -0
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c +80 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c +74 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c +163 -0
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.c +64 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c +65 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +76 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c +69 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c +63 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c +81 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c +92 -0
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c +95 -0
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c +34 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c +47 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c +61 -0
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c +39 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c +386 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h +165 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c +37 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c +65 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c +66 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h +75 -0
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c +42 -0
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c +71 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c +34 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c +51 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c +44 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c +332 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h +145 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.c +75 -0
- data/src/core/ext/upbdefs-generated/xds/annotations/v3/status.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c +43 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c +63 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c +50 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c +68 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c +51 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.c +45 -0
- data/src/core/ext/upbdefs-generated/xds/type/v3/typed_struct.upbdefs.h +35 -0
- data/src/core/ext/xds/certificate_provider_factory.h +61 -0
- data/src/core/ext/xds/certificate_provider_registry.cc +103 -0
- data/src/core/ext/xds/certificate_provider_registry.h +57 -0
- data/src/core/ext/xds/certificate_provider_store.cc +87 -0
- data/src/core/ext/xds/certificate_provider_store.h +112 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +144 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.h +69 -0
- data/src/core/ext/xds/xds_api.cc +3965 -0
- data/src/core/ext/xds/xds_api.h +744 -0
- data/src/core/ext/xds/xds_bootstrap.cc +471 -0
- data/src/core/ext/xds/xds_bootstrap.h +125 -0
- data/src/core/ext/xds/xds_certificate_provider.cc +405 -0
- data/src/core/ext/xds/xds_certificate_provider.h +151 -0
- data/src/core/ext/xds/xds_channel_args.h +32 -0
- data/src/core/ext/xds/xds_channel_stack_modifier.cc +113 -0
- data/src/core/ext/xds/xds_channel_stack_modifier.h +52 -0
- data/src/core/ext/xds/xds_client.cc +2791 -0
- data/src/core/ext/xds/xds_client.h +380 -0
- data/src/core/ext/xds/xds_client_stats.cc +160 -0
- data/src/core/ext/xds/xds_client_stats.h +240 -0
- data/src/core/ext/xds/xds_http_fault_filter.cc +227 -0
- data/src/core/ext/xds/xds_http_fault_filter.h +64 -0
- data/src/core/ext/xds/xds_http_filters.cc +116 -0
- data/src/core/ext/xds/xds_http_filters.h +133 -0
- data/src/core/ext/xds/xds_server_config_fetcher.cc +544 -0
- data/src/core/lib/address_utils/parse_address.cc +320 -0
- data/src/core/lib/address_utils/parse_address.h +77 -0
- data/src/core/lib/address_utils/sockaddr_utils.cc +412 -0
- data/src/core/lib/address_utils/sockaddr_utils.h +110 -0
- data/src/core/lib/avl/avl.cc +306 -0
- data/src/core/lib/avl/avl.h +94 -0
- data/src/core/lib/backoff/backoff.cc +78 -0
- data/src/core/lib/backoff/backoff.h +89 -0
- data/src/core/lib/channel/call_tracer.h +85 -0
- data/src/core/lib/channel/channel_args.cc +400 -0
- data/src/core/lib/channel/channel_args.h +143 -0
- data/src/core/lib/channel/channel_stack.cc +267 -0
- data/src/core/lib/channel/channel_stack.h +312 -0
- data/src/core/lib/channel/channel_stack_builder.cc +313 -0
- data/src/core/lib/channel/channel_stack_builder.h +158 -0
- data/src/core/lib/channel/channel_trace.cc +193 -0
- data/src/core/lib/channel/channel_trace.h +135 -0
- data/src/core/lib/channel/channelz.cc +596 -0
- data/src/core/lib/channel/channelz.h +357 -0
- data/src/core/lib/channel/channelz_registry.cc +285 -0
- data/src/core/lib/channel/channelz_registry.h +99 -0
- data/src/core/lib/channel/connected_channel.cc +245 -0
- data/src/core/lib/channel/connected_channel.h +33 -0
- data/src/core/lib/channel/context.h +52 -0
- data/src/core/lib/channel/handshaker.cc +222 -0
- data/src/core/lib/channel/handshaker.h +161 -0
- data/src/core/lib/channel/handshaker_factory.h +50 -0
- data/src/core/lib/channel/handshaker_registry.cc +50 -0
- data/src/core/lib/channel/handshaker_registry.h +71 -0
- data/src/core/lib/channel/status_util.cc +109 -0
- data/src/core/lib/channel/status_util.h +67 -0
- data/src/core/lib/compression/algorithm_metadata.h +62 -0
- data/src/core/lib/compression/compression.cc +183 -0
- data/src/core/lib/compression/compression_args.cc +138 -0
- data/src/core/lib/compression/compression_args.h +56 -0
- data/src/core/lib/compression/compression_internal.cc +283 -0
- data/src/core/lib/compression/compression_internal.h +97 -0
- data/src/core/lib/compression/message_compress.cc +192 -0
- data/src/core/lib/compression/message_compress.h +40 -0
- data/src/core/lib/compression/stream_compression.cc +81 -0
- data/src/core/lib/compression/stream_compression.h +117 -0
- data/src/core/lib/compression/stream_compression_gzip.cc +231 -0
- data/src/core/lib/compression/stream_compression_gzip.h +28 -0
- data/src/core/lib/compression/stream_compression_identity.cc +91 -0
- data/src/core/lib/compression/stream_compression_identity.h +29 -0
- data/src/core/lib/config/core_configuration.cc +96 -0
- data/src/core/lib/config/core_configuration.h +146 -0
- data/src/core/lib/debug/stats.cc +172 -0
- data/src/core/lib/debug/stats.h +71 -0
- data/src/core/lib/debug/stats_data.cc +689 -0
- data/src/core/lib/debug/stats_data.h +556 -0
- data/src/core/lib/debug/trace.cc +155 -0
- data/src/core/lib/debug/trace.h +132 -0
- data/src/core/lib/event_engine/endpoint_config.cc +45 -0
- data/src/core/lib/event_engine/endpoint_config_internal.h +42 -0
- data/src/core/lib/event_engine/event_engine.cc +50 -0
- data/src/core/lib/event_engine/sockaddr.cc +40 -0
- data/src/core/lib/event_engine/sockaddr.h +44 -0
- data/src/core/lib/gpr/alloc.cc +76 -0
- data/src/core/lib/gpr/alloc.h +28 -0
- data/src/core/lib/gpr/atm.cc +35 -0
- data/src/core/lib/gpr/cpu_iphone.cc +44 -0
- data/src/core/lib/gpr/cpu_linux.cc +82 -0
- data/src/core/lib/gpr/cpu_posix.cc +83 -0
- data/src/core/lib/gpr/cpu_windows.cc +33 -0
- data/src/core/lib/gpr/env.h +40 -0
- data/src/core/lib/gpr/env_linux.cc +75 -0
- data/src/core/lib/gpr/env_posix.cc +46 -0
- data/src/core/lib/gpr/env_windows.cc +74 -0
- data/src/core/lib/gpr/log.cc +140 -0
- data/src/core/lib/gpr/log_android.cc +77 -0
- data/src/core/lib/gpr/log_linux.cc +114 -0
- data/src/core/lib/gpr/log_posix.cc +110 -0
- data/src/core/lib/gpr/log_windows.cc +116 -0
- data/src/core/lib/gpr/murmur_hash.cc +82 -0
- data/src/core/lib/gpr/murmur_hash.h +29 -0
- data/src/core/lib/gpr/spinlock.h +53 -0
- data/src/core/lib/gpr/string.cc +343 -0
- data/src/core/lib/gpr/string.h +112 -0
- data/src/core/lib/gpr/string_posix.cc +72 -0
- data/src/core/lib/gpr/string_util_windows.cc +82 -0
- data/src/core/lib/gpr/string_windows.cc +69 -0
- data/src/core/lib/gpr/string_windows.h +32 -0
- data/src/core/lib/gpr/sync.cc +124 -0
- data/src/core/lib/gpr/sync_abseil.cc +114 -0
- data/src/core/lib/gpr/sync_posix.cc +170 -0
- data/src/core/lib/gpr/sync_windows.cc +120 -0
- data/src/core/lib/gpr/time.cc +264 -0
- data/src/core/lib/gpr/time_posix.cc +186 -0
- data/src/core/lib/gpr/time_precise.cc +168 -0
- data/src/core/lib/gpr/time_precise.h +70 -0
- data/src/core/lib/gpr/time_windows.cc +99 -0
- data/src/core/lib/gpr/tls.h +151 -0
- data/src/core/lib/gpr/tmpfile.h +32 -0
- data/src/core/lib/gpr/tmpfile_msys.cc +58 -0
- data/src/core/lib/gpr/tmpfile_posix.cc +69 -0
- data/src/core/lib/gpr/tmpfile_windows.cc +69 -0
- data/src/core/lib/gpr/useful.h +113 -0
- data/src/core/lib/gpr/wrap_memcpy.cc +43 -0
- data/src/core/lib/gprpp/arena.cc +104 -0
- data/src/core/lib/gprpp/arena.h +131 -0
- data/src/core/lib/gprpp/atomic_utils.h +47 -0
- data/src/core/lib/gprpp/bitset.h +188 -0
- data/src/core/lib/gprpp/chunked_vector.h +211 -0
- data/src/core/lib/gprpp/construct_destruct.h +39 -0
- data/src/core/lib/gprpp/debug_location.h +53 -0
- data/src/core/lib/gprpp/dual_ref_counted.h +330 -0
- data/src/core/lib/gprpp/examine_stack.cc +43 -0
- data/src/core/lib/gprpp/examine_stack.h +46 -0
- data/src/core/lib/gprpp/fork.cc +244 -0
- data/src/core/lib/gprpp/fork.h +103 -0
- data/src/core/lib/gprpp/global_config.h +95 -0
- data/src/core/lib/gprpp/global_config_custom.h +29 -0
- data/src/core/lib/gprpp/global_config_env.cc +137 -0
- data/src/core/lib/gprpp/global_config_env.h +131 -0
- data/src/core/lib/gprpp/global_config_generic.h +44 -0
- data/src/core/lib/gprpp/host_port.cc +112 -0
- data/src/core/lib/gprpp/host_port.h +56 -0
- data/src/core/lib/gprpp/manual_constructor.h +216 -0
- data/src/core/lib/gprpp/match.h +73 -0
- data/src/core/lib/gprpp/memory.h +57 -0
- data/src/core/lib/gprpp/mpscq.cc +108 -0
- data/src/core/lib/gprpp/mpscq.h +99 -0
- data/src/core/lib/gprpp/orphanable.h +125 -0
- data/src/core/lib/gprpp/overload.h +59 -0
- data/src/core/lib/gprpp/ref_counted.h +349 -0
- data/src/core/lib/gprpp/ref_counted_ptr.h +353 -0
- data/src/core/lib/gprpp/stat.h +38 -0
- data/src/core/lib/gprpp/stat_posix.cc +49 -0
- data/src/core/lib/gprpp/stat_windows.cc +48 -0
- data/src/core/lib/gprpp/status_helper.cc +427 -0
- data/src/core/lib/gprpp/status_helper.h +194 -0
- data/src/core/lib/gprpp/sync.h +198 -0
- data/src/core/lib/gprpp/table.h +411 -0
- data/src/core/lib/gprpp/thd.h +174 -0
- data/src/core/lib/gprpp/thd_posix.cc +209 -0
- data/src/core/lib/gprpp/thd_windows.cc +171 -0
- data/src/core/lib/gprpp/time_util.cc +77 -0
- data/src/core/lib/gprpp/time_util.h +42 -0
- data/src/core/lib/http/format_request.cc +104 -0
- data/src/core/lib/http/format_request.h +35 -0
- data/src/core/lib/http/httpcli.cc +324 -0
- data/src/core/lib/http/httpcli.h +128 -0
- data/src/core/lib/http/httpcli_security_connector.cc +215 -0
- data/src/core/lib/http/parser.cc +392 -0
- data/src/core/lib/http/parser.h +114 -0
- data/src/core/lib/iomgr/block_annotate.h +57 -0
- data/src/core/lib/iomgr/buffer_list.cc +307 -0
- data/src/core/lib/iomgr/buffer_list.h +163 -0
- data/src/core/lib/iomgr/call_combiner.cc +281 -0
- data/src/core/lib/iomgr/call_combiner.h +215 -0
- data/src/core/lib/iomgr/cfstream_handle.cc +210 -0
- data/src/core/lib/iomgr/cfstream_handle.h +90 -0
- data/src/core/lib/iomgr/closure.h +256 -0
- data/src/core/lib/iomgr/combiner.cc +328 -0
- data/src/core/lib/iomgr/combiner.h +89 -0
- data/src/core/lib/iomgr/dualstack_socket_posix.cc +48 -0
- data/src/core/lib/iomgr/dynamic_annotations.h +67 -0
- data/src/core/lib/iomgr/endpoint.cc +67 -0
- data/src/core/lib/iomgr/endpoint.h +108 -0
- data/src/core/lib/iomgr/endpoint_cfstream.cc +389 -0
- data/src/core/lib/iomgr/endpoint_cfstream.h +49 -0
- data/src/core/lib/iomgr/endpoint_pair.h +34 -0
- data/src/core/lib/iomgr/endpoint_pair_event_engine.cc +32 -0
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +77 -0
- data/src/core/lib/iomgr/endpoint_pair_windows.cc +95 -0
- data/src/core/lib/iomgr/error.cc +985 -0
- data/src/core/lib/iomgr/error.h +442 -0
- data/src/core/lib/iomgr/error_cfstream.cc +59 -0
- data/src/core/lib/iomgr/error_cfstream.h +31 -0
- data/src/core/lib/iomgr/error_internal.h +66 -0
- data/src/core/lib/iomgr/ev_apple.cc +359 -0
- data/src/core/lib/iomgr/ev_apple.h +43 -0
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +1364 -0
- data/src/core/lib/iomgr/ev_epoll1_linux.h +31 -0
- data/src/core/lib/iomgr/ev_epollex_linux.cc +1654 -0
- data/src/core/lib/iomgr/ev_epollex_linux.h +30 -0
- data/src/core/lib/iomgr/ev_poll_posix.cc +1430 -0
- data/src/core/lib/iomgr/ev_poll_posix.h +29 -0
- data/src/core/lib/iomgr/ev_posix.cc +417 -0
- data/src/core/lib/iomgr/ev_posix.h +207 -0
- data/src/core/lib/iomgr/ev_windows.cc +30 -0
- data/src/core/lib/iomgr/event_engine/closure.cc +77 -0
- data/src/core/lib/iomgr/event_engine/closure.h +42 -0
- data/src/core/lib/iomgr/event_engine/endpoint.cc +173 -0
- data/src/core/lib/iomgr/event_engine/endpoint.h +52 -0
- data/src/core/lib/iomgr/event_engine/iomgr.cc +104 -0
- data/src/core/lib/iomgr/event_engine/iomgr.h +42 -0
- data/src/core/lib/iomgr/event_engine/pollset.cc +88 -0
- data/src/core/lib/iomgr/event_engine/pollset.h +25 -0
- data/src/core/lib/iomgr/event_engine/promise.h +51 -0
- data/src/core/lib/iomgr/event_engine/resolved_address_internal.cc +41 -0
- data/src/core/lib/iomgr/event_engine/resolved_address_internal.h +35 -0
- data/src/core/lib/iomgr/event_engine/resolver.cc +114 -0
- data/src/core/lib/iomgr/event_engine/tcp.cc +293 -0
- data/src/core/lib/iomgr/event_engine/timer.cc +62 -0
- data/src/core/lib/iomgr/exec_ctx.cc +227 -0
- data/src/core/lib/iomgr/exec_ctx.h +375 -0
- data/src/core/lib/iomgr/executor/mpmcqueue.cc +182 -0
- data/src/core/lib/iomgr/executor/mpmcqueue.h +171 -0
- data/src/core/lib/iomgr/executor/threadpool.cc +136 -0
- data/src/core/lib/iomgr/executor/threadpool.h +150 -0
- data/src/core/lib/iomgr/executor.cc +455 -0
- data/src/core/lib/iomgr/executor.h +122 -0
- data/src/core/lib/iomgr/fork_posix.cc +119 -0
- data/src/core/lib/iomgr/fork_windows.cc +41 -0
- data/src/core/lib/iomgr/gethostname.h +26 -0
- data/src/core/lib/iomgr/gethostname_fallback.cc +30 -0
- data/src/core/lib/iomgr/gethostname_host_name_max.cc +40 -0
- data/src/core/lib/iomgr/gethostname_sysconf.cc +40 -0
- data/src/core/lib/iomgr/grpc_if_nametoindex.h +30 -0
- data/src/core/lib/iomgr/grpc_if_nametoindex_posix.cc +42 -0
- data/src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc +38 -0
- data/src/core/lib/iomgr/internal_errqueue.cc +68 -0
- data/src/core/lib/iomgr/internal_errqueue.h +191 -0
- data/src/core/lib/iomgr/iocp_windows.cc +158 -0
- data/src/core/lib/iomgr/iocp_windows.h +48 -0
- data/src/core/lib/iomgr/iomgr.cc +196 -0
- data/src/core/lib/iomgr/iomgr.h +60 -0
- data/src/core/lib/iomgr/iomgr_custom.cc +79 -0
- data/src/core/lib/iomgr/iomgr_custom.h +49 -0
- data/src/core/lib/iomgr/iomgr_internal.cc +53 -0
- data/src/core/lib/iomgr/iomgr_internal.h +74 -0
- data/src/core/lib/iomgr/iomgr_posix.cc +90 -0
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +200 -0
- data/src/core/lib/iomgr/iomgr_windows.cc +105 -0
- data/src/core/lib/iomgr/is_epollexclusive_available.cc +119 -0
- data/src/core/lib/iomgr/is_epollexclusive_available.h +36 -0
- data/src/core/lib/iomgr/load_file.cc +81 -0
- data/src/core/lib/iomgr/load_file.h +35 -0
- data/src/core/lib/iomgr/lockfree_event.cc +278 -0
- data/src/core/lib/iomgr/lockfree_event.h +72 -0
- data/src/core/lib/iomgr/nameser.h +106 -0
- data/src/core/lib/iomgr/polling_entity.cc +96 -0
- data/src/core/lib/iomgr/polling_entity.h +68 -0
- data/src/core/lib/iomgr/pollset.cc +56 -0
- data/src/core/lib/iomgr/pollset.h +99 -0
- data/src/core/lib/iomgr/pollset_custom.cc +105 -0
- data/src/core/lib/iomgr/pollset_custom.h +37 -0
- data/src/core/lib/iomgr/pollset_set.cc +55 -0
- data/src/core/lib/iomgr/pollset_set.h +55 -0
- data/src/core/lib/iomgr/pollset_set_custom.cc +47 -0
- data/src/core/lib/iomgr/pollset_set_custom.h +26 -0
- data/src/core/lib/iomgr/pollset_set_windows.cc +52 -0
- data/src/core/lib/iomgr/pollset_set_windows.h +26 -0
- data/src/core/lib/iomgr/pollset_windows.cc +243 -0
- data/src/core/lib/iomgr/pollset_windows.h +70 -0
- data/src/core/lib/iomgr/port.h +221 -0
- data/src/core/lib/iomgr/python_util.h +47 -0
- data/src/core/lib/iomgr/resolve_address.cc +55 -0
- data/src/core/lib/iomgr/resolve_address.h +83 -0
- data/src/core/lib/iomgr/resolve_address_custom.cc +169 -0
- data/src/core/lib/iomgr/resolve_address_custom.h +44 -0
- data/src/core/lib/iomgr/resolve_address_posix.cc +170 -0
- data/src/core/lib/iomgr/resolve_address_windows.cc +152 -0
- data/src/core/lib/iomgr/resource_quota.cc +1106 -0
- data/src/core/lib/iomgr/resource_quota.h +226 -0
- data/src/core/lib/iomgr/sockaddr.h +33 -0
- data/src/core/lib/iomgr/sockaddr_posix.h +55 -0
- data/src/core/lib/iomgr/sockaddr_windows.h +55 -0
- data/src/core/lib/iomgr/socket_factory_posix.cc +95 -0
- data/src/core/lib/iomgr/socket_factory_posix.h +69 -0
- data/src/core/lib/iomgr/socket_mutator.cc +97 -0
- data/src/core/lib/iomgr/socket_mutator.h +84 -0
- data/src/core/lib/iomgr/socket_utils.h +47 -0
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +515 -0
- data/src/core/lib/iomgr/socket_utils_linux.cc +42 -0
- data/src/core/lib/iomgr/socket_utils_posix.cc +58 -0
- data/src/core/lib/iomgr/socket_utils_posix.h +163 -0
- data/src/core/lib/iomgr/socket_utils_windows.cc +47 -0
- data/src/core/lib/iomgr/socket_windows.cc +202 -0
- data/src/core/lib/iomgr/socket_windows.h +127 -0
- data/src/core/lib/iomgr/sys_epoll_wrapper.h +30 -0
- data/src/core/lib/iomgr/tcp_client.cc +38 -0
- data/src/core/lib/iomgr/tcp_client.h +56 -0
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +205 -0
- data/src/core/lib/iomgr/tcp_client_custom.cc +152 -0
- data/src/core/lib/iomgr/tcp_client_posix.cc +360 -0
- data/src/core/lib/iomgr/tcp_client_posix.h +70 -0
- data/src/core/lib/iomgr/tcp_client_windows.cc +241 -0
- data/src/core/lib/iomgr/tcp_custom.cc +377 -0
- data/src/core/lib/iomgr/tcp_custom.h +86 -0
- data/src/core/lib/iomgr/tcp_posix.cc +1848 -0
- data/src/core/lib/iomgr/tcp_posix.h +67 -0
- data/src/core/lib/iomgr/tcp_server.cc +79 -0
- data/src/core/lib/iomgr/tcp_server.h +149 -0
- data/src/core/lib/iomgr/tcp_server_custom.cc +467 -0
- data/src/core/lib/iomgr/tcp_server_posix.cc +645 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +128 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +223 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +175 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc +36 -0
- data/src/core/lib/iomgr/tcp_server_windows.cc +568 -0
- data/src/core/lib/iomgr/tcp_windows.cc +530 -0
- data/src/core/lib/iomgr/tcp_windows.h +54 -0
- data/src/core/lib/iomgr/time_averaged_stats.cc +64 -0
- data/src/core/lib/iomgr/time_averaged_stats.h +72 -0
- data/src/core/lib/iomgr/timer.cc +46 -0
- data/src/core/lib/iomgr/timer.h +131 -0
- data/src/core/lib/iomgr/timer_custom.cc +96 -0
- data/src/core/lib/iomgr/timer_custom.h +43 -0
- data/src/core/lib/iomgr/timer_generic.cc +718 -0
- data/src/core/lib/iomgr/timer_generic.h +40 -0
- data/src/core/lib/iomgr/timer_heap.cc +134 -0
- data/src/core/lib/iomgr/timer_heap.h +43 -0
- data/src/core/lib/iomgr/timer_manager.cc +363 -0
- data/src/core/lib/iomgr/timer_manager.h +41 -0
- data/src/core/lib/iomgr/unix_sockets_posix.cc +108 -0
- data/src/core/lib/iomgr/unix_sockets_posix.h +49 -0
- data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +62 -0
- data/src/core/lib/iomgr/wakeup_fd_eventfd.cc +82 -0
- data/src/core/lib/iomgr/wakeup_fd_nospecial.cc +39 -0
- data/src/core/lib/iomgr/wakeup_fd_pipe.cc +99 -0
- data/src/core/lib/iomgr/wakeup_fd_pipe.h +28 -0
- data/src/core/lib/iomgr/wakeup_fd_posix.cc +70 -0
- data/src/core/lib/iomgr/wakeup_fd_posix.h +98 -0
- data/src/core/lib/iomgr/work_serializer.cc +155 -0
- data/src/core/lib/iomgr/work_serializer.h +81 -0
- data/src/core/lib/json/json.h +250 -0
- data/src/core/lib/json/json_reader.cc +849 -0
- data/src/core/lib/json/json_util.cc +126 -0
- data/src/core/lib/json/json_util.h +154 -0
- data/src/core/lib/json/json_writer.cc +335 -0
- data/src/core/lib/matchers/matchers.cc +327 -0
- data/src/core/lib/matchers/matchers.h +160 -0
- data/src/core/lib/profiling/basic_timers.cc +295 -0
- data/src/core/lib/profiling/stap_timers.cc +50 -0
- data/src/core/lib/profiling/timers.h +94 -0
- data/src/core/lib/security/authorization/authorization_engine.h +44 -0
- data/src/core/lib/security/authorization/authorization_policy_provider.h +33 -0
- data/src/core/lib/security/authorization/authorization_policy_provider_vtable.cc +46 -0
- data/src/core/lib/security/authorization/evaluate_args.cc +213 -0
- data/src/core/lib/security/authorization/evaluate_args.h +91 -0
- data/src/core/lib/security/authorization/sdk_server_authz_filter.cc +171 -0
- data/src/core/lib/security/authorization/sdk_server_authz_filter.h +67 -0
- data/src/core/lib/security/context/security_context.cc +325 -0
- data/src/core/lib/security/context/security_context.h +152 -0
- data/src/core/lib/security/credentials/alts/alts_credentials.cc +111 -0
- data/src/core/lib/security/credentials/alts/alts_credentials.h +109 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment.cc +72 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment.h +57 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc +68 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc +33 -0
- data/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +102 -0
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc +127 -0
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc +46 -0
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h +75 -0
- data/src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc +59 -0
- data/src/core/lib/security/credentials/composite/composite_credentials.cc +230 -0
- data/src/core/lib/security/credentials/composite/composite_credentials.h +106 -0
- data/src/core/lib/security/credentials/credentials.cc +164 -0
- data/src/core/lib/security/credentials/credentials.h +291 -0
- data/src/core/lib/security/credentials/credentials_metadata.cc +61 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +404 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.h +81 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.cc +214 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.h +72 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +527 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.h +122 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +136 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.h +49 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +211 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.h +60 -0
- data/src/core/lib/security/credentials/fake/fake_credentials.cc +113 -0
- data/src/core/lib/security/credentials/fake/fake_credentials.h +87 -0
- data/src/core/lib/security/credentials/google_default/credentials_generic.cc +42 -0
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +465 -0
- data/src/core/lib/security/credentials/google_default/google_default_credentials.h +87 -0
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +81 -0
- data/src/core/lib/security/credentials/iam/iam_credentials.h +49 -0
- data/src/core/lib/security/credentials/insecure/insecure_credentials.cc +64 -0
- data/src/core/lib/security/credentials/jwt/json_token.cc +288 -0
- data/src/core/lib/security/credentials/jwt/json_token.h +76 -0
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +192 -0
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +89 -0
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +922 -0
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +122 -0
- data/src/core/lib/security/credentials/local/local_credentials.cc +65 -0
- data/src/core/lib/security/credentials/local/local_credentials.h +61 -0
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +753 -0
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +173 -0
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +267 -0
- data/src/core/lib/security/credentials/plugin/plugin_credentials.h +72 -0
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +385 -0
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +108 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +348 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +217 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +455 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +147 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +177 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +193 -0
- data/src/core/lib/security/credentials/tls/tls_credentials.cc +133 -0
- data/src/core/lib/security/credentials/tls/tls_credentials.h +62 -0
- data/src/core/lib/security/credentials/tls/tls_utils.cc +123 -0
- data/src/core/lib/security/credentials/tls/tls_utils.h +51 -0
- data/src/core/lib/security/credentials/xds/xds_credentials.cc +244 -0
- data/src/core/lib/security/credentials/xds/xds_credentials.h +69 -0
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +311 -0
- data/src/core/lib/security/security_connector/alts/alts_security_connector.h +76 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +327 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.h +45 -0
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc +121 -0
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +97 -0
- data/src/core/lib/security/security_connector/load_system_roots.h +33 -0
- data/src/core/lib/security/security_connector/load_system_roots_fallback.cc +33 -0
- data/src/core/lib/security/security_connector/load_system_roots_linux.cc +171 -0
- data/src/core/lib/security/security_connector/load_system_roots_linux.h +46 -0
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +294 -0
- data/src/core/lib/security/security_connector/local/local_security_connector.h +59 -0
- data/src/core/lib/security/security_connector/security_connector.cc +137 -0
- data/src/core/lib/security/security_connector/security_connector.h +183 -0
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +453 -0
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +81 -0
- data/src/core/lib/security/security_connector/ssl_utils.cc +611 -0
- data/src/core/lib/security/security_connector/ssl_utils.h +188 -0
- data/src/core/lib/security/security_connector/ssl_utils_config.cc +32 -0
- data/src/core/lib/security/security_connector/ssl_utils_config.h +30 -0
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +667 -0
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +243 -0
- data/src/core/lib/security/transport/auth_filters.h +36 -0
- data/src/core/lib/security/transport/client_auth_filter.cc +473 -0
- data/src/core/lib/security/transport/secure_endpoint.cc +442 -0
- data/src/core/lib/security/transport/secure_endpoint.h +42 -0
- data/src/core/lib/security/transport/security_handshaker.cc +642 -0
- data/src/core/lib/security/transport/security_handshaker.h +46 -0
- data/src/core/lib/security/transport/server_auth_filter.cc +331 -0
- data/src/core/lib/security/transport/tsi_error.cc +28 -0
- data/src/core/lib/security/transport/tsi_error.h +30 -0
- data/src/core/lib/security/util/json_util.cc +70 -0
- data/src/core/lib/security/util/json_util.h +45 -0
- data/src/core/lib/slice/b64.cc +239 -0
- data/src/core/lib/slice/b64.h +50 -0
- data/src/core/lib/slice/percent_encoding.cc +212 -0
- data/src/core/lib/slice/percent_encoding.h +66 -0
- data/src/core/lib/slice/slice.cc +592 -0
- data/src/core/lib/slice/slice_api.cc +39 -0
- data/src/core/lib/slice/slice_buffer.cc +413 -0
- data/src/core/lib/slice/slice_intern.cc +367 -0
- data/src/core/lib/slice/slice_internal.h +123 -0
- data/src/core/lib/slice/slice_refcount.cc +17 -0
- data/src/core/lib/slice/slice_refcount.h +121 -0
- data/src/core/lib/slice/slice_refcount_base.h +173 -0
- data/src/core/lib/slice/slice_split.cc +100 -0
- data/src/core/lib/slice/slice_split.h +40 -0
- data/src/core/lib/slice/slice_string_helpers.cc +44 -0
- data/src/core/lib/slice/slice_string_helpers.h +38 -0
- data/src/core/lib/slice/slice_utils.h +200 -0
- data/src/core/lib/slice/static_slice.cc +529 -0
- data/src/core/lib/slice/static_slice.h +331 -0
- data/src/core/lib/surface/api_trace.cc +25 -0
- data/src/core/lib/surface/api_trace.h +53 -0
- data/src/core/lib/surface/builtins.cc +49 -0
- data/src/core/lib/surface/builtins.h +26 -0
- data/src/core/lib/surface/byte_buffer.cc +92 -0
- data/src/core/lib/surface/byte_buffer_reader.cc +101 -0
- data/src/core/lib/surface/call.cc +2056 -0
- data/src/core/lib/surface/call.h +131 -0
- data/src/core/lib/surface/call_details.cc +41 -0
- data/src/core/lib/surface/call_log_batch.cc +111 -0
- data/src/core/lib/surface/call_test_only.h +43 -0
- data/src/core/lib/surface/channel.cc +535 -0
- data/src/core/lib/surface/channel.h +178 -0
- data/src/core/lib/surface/channel_init.cc +56 -0
- data/src/core/lib/surface/channel_init.h +86 -0
- data/src/core/lib/surface/channel_ping.cc +63 -0
- data/src/core/lib/surface/channel_stack_type.cc +59 -0
- data/src/core/lib/surface/channel_stack_type.h +47 -0
- data/src/core/lib/surface/completion_queue.cc +1429 -0
- data/src/core/lib/surface/completion_queue.h +98 -0
- data/src/core/lib/surface/completion_queue_factory.cc +88 -0
- data/src/core/lib/surface/completion_queue_factory.h +39 -0
- data/src/core/lib/surface/event_string.cc +62 -0
- data/src/core/lib/surface/event_string.h +31 -0
- data/src/core/lib/surface/init.cc +220 -0
- data/src/core/lib/surface/init.h +35 -0
- data/src/core/lib/surface/init_secure.cc +103 -0
- data/src/core/lib/surface/lame_client.cc +192 -0
- data/src/core/lib/surface/lame_client.h +33 -0
- data/src/core/lib/surface/metadata_array.cc +36 -0
- data/src/core/lib/surface/server.cc +1608 -0
- data/src/core/lib/surface/server.h +497 -0
- data/src/core/lib/surface/validate_metadata.cc +136 -0
- data/src/core/lib/surface/validate_metadata.h +45 -0
- data/src/core/lib/surface/version.cc +28 -0
- data/src/core/lib/transport/bdp_estimator.cc +87 -0
- data/src/core/lib/transport/bdp_estimator.h +95 -0
- data/src/core/lib/transport/byte_stream.cc +158 -0
- data/src/core/lib/transport/byte_stream.h +166 -0
- data/src/core/lib/transport/connectivity_state.cc +188 -0
- data/src/core/lib/transport/connectivity_state.h +145 -0
- data/src/core/lib/transport/error_utils.cc +191 -0
- data/src/core/lib/transport/error_utils.h +58 -0
- data/src/core/lib/transport/http2_errors.h +41 -0
- data/src/core/lib/transport/metadata.cc +714 -0
- data/src/core/lib/transport/metadata.h +449 -0
- data/src/core/lib/transport/metadata_batch.cc +94 -0
- data/src/core/lib/transport/metadata_batch.h +1055 -0
- data/src/core/lib/transport/parsed_metadata.h +263 -0
- data/src/core/lib/transport/pid_controller.cc +51 -0
- data/src/core/lib/transport/pid_controller.h +116 -0
- data/src/core/lib/transport/static_metadata.cc +1117 -0
- data/src/core/lib/transport/static_metadata.h +340 -0
- data/src/core/lib/transport/status_conversion.cc +92 -0
- data/src/core/lib/transport/status_conversion.h +38 -0
- data/src/core/lib/transport/status_metadata.cc +63 -0
- data/src/core/lib/transport/status_metadata.h +48 -0
- data/src/core/lib/transport/timeout_encoding.cc +151 -0
- data/src/core/lib/transport/timeout_encoding.h +38 -0
- data/src/core/lib/transport/transport.cc +261 -0
- data/src/core/lib/transport/transport.h +471 -0
- data/src/core/lib/transport/transport_impl.h +71 -0
- data/src/core/lib/transport/transport_op_string.cc +189 -0
- data/src/core/lib/uri/uri_parser.cc +191 -0
- data/src/core/lib/uri/uri_parser.h +87 -0
- data/src/core/plugin_registry/grpc_plugin_registry.cc +197 -0
- data/src/core/tsi/alts/crypt/aes_gcm.cc +690 -0
- data/src/core/tsi/alts/crypt/gsec.cc +190 -0
- data/src/core/tsi/alts/crypt/gsec.h +459 -0
- data/src/core/tsi/alts/frame_protector/alts_counter.cc +118 -0
- data/src/core/tsi/alts/frame_protector/alts_counter.h +98 -0
- data/src/core/tsi/alts/frame_protector/alts_crypter.cc +66 -0
- data/src/core/tsi/alts/frame_protector/alts_crypter.h +255 -0
- data/src/core/tsi/alts/frame_protector/alts_frame_protector.cc +408 -0
- data/src/core/tsi/alts/frame_protector/alts_frame_protector.h +55 -0
- data/src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.cc +114 -0
- data/src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.h +114 -0
- data/src/core/tsi/alts/frame_protector/alts_seal_privacy_integrity_crypter.cc +105 -0
- data/src/core/tsi/alts/frame_protector/alts_unseal_privacy_integrity_crypter.cc +103 -0
- data/src/core/tsi/alts/frame_protector/frame_handler.cc +219 -0
- data/src/core/tsi/alts/frame_protector/frame_handler.h +236 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +903 -0
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +160 -0
- data/src/core/tsi/alts/handshaker/alts_shared_resource.cc +83 -0
- data/src/core/tsi/alts/handshaker/alts_shared_resource.h +73 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +705 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +104 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +89 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.cc +64 -0
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.h +53 -0
- data/src/core/tsi/alts/handshaker/transport_security_common_api.cc +223 -0
- data/src/core/tsi/alts/handshaker/transport_security_common_api.h +171 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc +226 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.h +54 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc +144 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.h +49 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol.h +91 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc +174 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h +99 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc +478 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h +199 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +307 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h +57 -0
- data/src/core/tsi/fake_transport_security.cc +809 -0
- data/src/core/tsi/fake_transport_security.h +47 -0
- data/src/core/tsi/local_transport_security.cc +178 -0
- data/src/core/tsi/local_transport_security.h +50 -0
- data/src/core/tsi/ssl/session_cache/ssl_session.h +71 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +57 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +179 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +92 -0
- data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +75 -0
- data/src/core/tsi/ssl_transport_security.cc +2260 -0
- data/src/core/tsi/ssl_transport_security.h +366 -0
- data/src/core/tsi/ssl_types.h +42 -0
- data/src/core/tsi/transport_security.cc +384 -0
- data/src/core/tsi/transport_security.h +142 -0
- data/src/core/tsi/transport_security_grpc.cc +73 -0
- data/src/core/tsi/transport_security_grpc.h +80 -0
- data/src/core/tsi/transport_security_interface.h +507 -0
- data/src/ruby/bin/math_client.rb +140 -0
- data/src/ruby/bin/math_pb.rb +34 -0
- data/src/ruby/bin/math_server.rb +191 -0
- data/src/ruby/bin/math_services_pb.rb +51 -0
- data/src/ruby/bin/noproto_client.rb +93 -0
- data/src/ruby/bin/noproto_server.rb +97 -0
- data/src/ruby/ext/grpc/ext-export.clang +1 -0
- data/src/ruby/ext/grpc/ext-export.gcc +6 -0
- data/src/ruby/ext/grpc/extconf.rb +129 -0
- data/src/ruby/ext/grpc/extconf.rb.orig +130 -0
- data/src/ruby/ext/grpc/extconf.rb.rej +18 -0
- data/src/ruby/ext/grpc/rb_byte_buffer.c +65 -0
- data/src/ruby/ext/grpc/rb_byte_buffer.h +35 -0
- data/src/ruby/ext/grpc/rb_call.c +1051 -0
- data/src/ruby/ext/grpc/rb_call.h +57 -0
- data/src/ruby/ext/grpc/rb_call_credentials.c +341 -0
- data/src/ruby/ext/grpc/rb_call_credentials.h +31 -0
- data/src/ruby/ext/grpc/rb_channel.c +846 -0
- data/src/ruby/ext/grpc/rb_channel.h +34 -0
- data/src/ruby/ext/grpc/rb_channel_args.c +155 -0
- data/src/ruby/ext/grpc/rb_channel_args.h +38 -0
- data/src/ruby/ext/grpc/rb_channel_credentials.c +286 -0
- data/src/ruby/ext/grpc/rb_channel_credentials.h +37 -0
- data/src/ruby/ext/grpc/rb_completion_queue.c +101 -0
- data/src/ruby/ext/grpc/rb_completion_queue.h +36 -0
- data/src/ruby/ext/grpc/rb_compression_options.c +471 -0
- data/src/ruby/ext/grpc/rb_compression_options.h +29 -0
- data/src/ruby/ext/grpc/rb_enable_cpp.cc +22 -0
- data/src/ruby/ext/grpc/rb_event_thread.c +145 -0
- data/src/ruby/ext/grpc/rb_event_thread.h +21 -0
- data/src/ruby/ext/grpc/rb_grpc.c +333 -0
- data/src/ruby/ext/grpc/rb_grpc.h +77 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +605 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +913 -0
- data/src/ruby/ext/grpc/rb_loader.c +57 -0
- data/src/ruby/ext/grpc/rb_loader.h +25 -0
- data/src/ruby/ext/grpc/rb_server.c +385 -0
- data/src/ruby/ext/grpc/rb_server.h +32 -0
- data/src/ruby/ext/grpc/rb_server_credentials.c +259 -0
- data/src/ruby/ext/grpc/rb_server_credentials.h +37 -0
- data/src/ruby/ext/grpc/rb_xds_channel_credentials.c +218 -0
- data/src/ruby/ext/grpc/rb_xds_channel_credentials.h +37 -0
- data/src/ruby/ext/grpc/rb_xds_server_credentials.c +170 -0
- data/src/ruby/ext/grpc/rb_xds_server_credentials.h +37 -0
- data/src/ruby/lib/grpc/core/status_codes.rb +135 -0
- data/src/ruby/lib/grpc/core/time_consts.rb +56 -0
- data/src/ruby/lib/grpc/errors.rb +277 -0
- data/src/ruby/lib/grpc/generic/active_call.rb +669 -0
- data/src/ruby/lib/grpc/generic/bidi_call.rb +233 -0
- data/src/ruby/lib/grpc/generic/client_stub.rb +503 -0
- data/src/ruby/lib/grpc/generic/interceptor_registry.rb +53 -0
- data/src/ruby/lib/grpc/generic/interceptors.rb +186 -0
- data/src/ruby/lib/grpc/generic/rpc_desc.rb +204 -0
- data/src/ruby/lib/grpc/generic/rpc_server.rb +551 -0
- data/src/ruby/lib/grpc/generic/service.rb +211 -0
- data/src/ruby/lib/grpc/google_rpc_status_utils.rb +40 -0
- data/src/ruby/lib/grpc/grpc.rb +24 -0
- data/src/ruby/lib/grpc/logconfig.rb +44 -0
- data/src/ruby/lib/grpc/notifier.rb +45 -0
- data/src/ruby/lib/grpc/structs.rb +15 -0
- data/src/ruby/lib/grpc/version.rb +18 -0
- data/src/ruby/lib/grpc.rb +37 -0
- data/src/ruby/pb/README.md +42 -0
- data/src/ruby/pb/generate_proto_ruby.sh +51 -0
- data/src/ruby/pb/grpc/health/checker.rb +75 -0
- data/src/ruby/pb/grpc/health/v1/health_pb.rb +31 -0
- data/src/ruby/pb/grpc/health/v1/health_services_pb.rb +62 -0
- data/src/ruby/pb/grpc/testing/duplicate/echo_duplicate_services_pb.rb +44 -0
- data/src/ruby/pb/grpc/testing/metrics_pb.rb +28 -0
- data/src/ruby/pb/grpc/testing/metrics_services_pb.rb +49 -0
- data/src/ruby/pb/src/proto/grpc/testing/empty_pb.rb +17 -0
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +145 -0
- data/src/ruby/pb/src/proto/grpc/testing/test_pb.rb +16 -0
- data/src/ruby/pb/src/proto/grpc/testing/test_services_pb.rb +152 -0
- data/src/ruby/spec/call_credentials_spec.rb +42 -0
- data/src/ruby/spec/call_spec.rb +180 -0
- data/src/ruby/spec/channel_connection_spec.rb +126 -0
- data/src/ruby/spec/channel_credentials_spec.rb +124 -0
- data/src/ruby/spec/channel_spec.rb +245 -0
- data/src/ruby/spec/client_auth_spec.rb +152 -0
- data/src/ruby/spec/client_server_spec.rb +664 -0
- data/src/ruby/spec/compression_options_spec.rb +149 -0
- data/src/ruby/spec/debug_message_spec.rb +134 -0
- data/src/ruby/spec/error_sanity_spec.rb +49 -0
- data/src/ruby/spec/errors_spec.rb +142 -0
- data/src/ruby/spec/errors_spec.rb.rej +11 -0
- data/src/ruby/spec/generic/active_call_spec.rb +683 -0
- data/src/ruby/spec/generic/client_interceptors_spec.rb +153 -0
- data/src/ruby/spec/generic/client_stub_spec.rb +1083 -0
- data/src/ruby/spec/generic/interceptor_registry_spec.rb +65 -0
- data/src/ruby/spec/generic/rpc_desc_spec.rb +374 -0
- data/src/ruby/spec/generic/rpc_server_pool_spec.rb +127 -0
- data/src/ruby/spec/generic/rpc_server_spec.rb +748 -0
- data/src/ruby/spec/generic/server_interceptors_spec.rb +218 -0
- data/src/ruby/spec/generic/service_spec.rb +263 -0
- data/src/ruby/spec/google_rpc_status_utils_spec.rb +282 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options.proto +28 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options_import.proto +22 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options_import2.proto +23 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options_ruby_style.proto +41 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/same_package_service_name.proto +27 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/same_ruby_package_service_name.proto +29 -0
- data/src/ruby/spec/pb/codegen/package_option_spec.rb +98 -0
- data/src/ruby/spec/pb/duplicate/codegen_spec.rb +57 -0
- data/src/ruby/spec/pb/health/checker_spec.rb +236 -0
- data/src/ruby/spec/server_credentials_spec.rb +104 -0
- data/src/ruby/spec/server_spec.rb +231 -0
- data/src/ruby/spec/spec_helper.rb +61 -0
- data/src/ruby/spec/support/helpers.rb +107 -0
- data/src/ruby/spec/support/services.rb +160 -0
- data/src/ruby/spec/testdata/README +1 -0
- data/src/ruby/spec/testdata/ca.pem +20 -0
- data/src/ruby/spec/testdata/client.key +28 -0
- data/src/ruby/spec/testdata/client.pem +20 -0
- data/src/ruby/spec/testdata/server1.key +28 -0
- data/src/ruby/spec/testdata/server1.pem +22 -0
- data/src/ruby/spec/time_consts_spec.rb +74 -0
- data/src/ruby/spec/user_agent_spec.rb +74 -0
- data/third_party/abseil-cpp/absl/algorithm/algorithm.h +159 -0
- data/third_party/abseil-cpp/absl/algorithm/container.h +1764 -0
- data/third_party/abseil-cpp/absl/base/attributes.h +702 -0
- data/third_party/abseil-cpp/absl/base/call_once.h +219 -0
- data/third_party/abseil-cpp/absl/base/casts.h +187 -0
- data/third_party/abseil-cpp/absl/base/config.h +742 -0
- data/third_party/abseil-cpp/absl/base/const_init.h +76 -0
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +496 -0
- data/third_party/abseil-cpp/absl/base/internal/atomic_hook.h +200 -0
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.cc +107 -0
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.h +94 -0
- data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +169 -0
- data/third_party/abseil-cpp/absl/base/internal/dynamic_annotations.h +398 -0
- data/third_party/abseil-cpp/absl/base/internal/endian.h +327 -0
- data/third_party/abseil-cpp/absl/base/internal/errno_saver.h +43 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.cc +93 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.h +130 -0
- data/third_party/abseil-cpp/absl/base/internal/hide_ptr.h +51 -0
- data/third_party/abseil-cpp/absl/base/internal/identity.h +37 -0
- data/third_party/abseil-cpp/absl/base/internal/inline_variable.h +107 -0
- data/third_party/abseil-cpp/absl/base/internal/invoke.h +187 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +620 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h +126 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +134 -0
- data/third_party/abseil-cpp/absl/base/internal/per_thread_tls.h +52 -0
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +242 -0
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +195 -0
- data/third_party/abseil-cpp/absl/base/internal/scheduling_mode.h +58 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +229 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +246 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_akaros.inc +35 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +74 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_posix.inc +46 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.cc +81 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.h +93 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_win32.inc +37 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +439 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.h +74 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_annotations.h +271 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.cc +155 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.h +265 -0
- data/third_party/abseil-cpp/absl/base/internal/throw_delegate.cc +212 -0
- data/third_party/abseil-cpp/absl/base/internal/throw_delegate.h +75 -0
- data/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h +68 -0
- data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +82 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +138 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +124 -0
- data/third_party/abseil-cpp/absl/base/log_severity.cc +27 -0
- data/third_party/abseil-cpp/absl/base/log_severity.h +121 -0
- data/third_party/abseil-cpp/absl/base/macros.h +158 -0
- data/third_party/abseil-cpp/absl/base/optimization.h +244 -0
- data/third_party/abseil-cpp/absl/base/options.h +238 -0
- data/third_party/abseil-cpp/absl/base/policy_checks.h +111 -0
- data/third_party/abseil-cpp/absl/base/port.h +25 -0
- data/third_party/abseil-cpp/absl/base/thread_annotations.h +335 -0
- data/third_party/abseil-cpp/absl/container/fixed_array.h +532 -0
- data/third_party/abseil-cpp/absl/container/flat_hash_map.h +606 -0
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +847 -0
- data/third_party/abseil-cpp/absl/container/internal/common.h +206 -0
- data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +290 -0
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +460 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +161 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +208 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtable_debug_hooks.h +85 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +274 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +322 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc +31 -0
- data/third_party/abseil-cpp/absl/container/internal/have_sse.h +50 -0
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +967 -0
- data/third_party/abseil-cpp/absl/container/internal/layout.h +743 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +197 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +61 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +1903 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +139 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.h +32 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +1949 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.h +71 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +382 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +134 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +199 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +134 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +80 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +108 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +253 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +24 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +93 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +346 -0
- data/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +147 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +173 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.h +158 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +140 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.h +231 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.cc +36 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.h +99 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_darwin.inc +101 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +1560 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_unimplemented.inc +40 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +81 -0
- data/third_party/abseil-cpp/absl/functional/bind_front.h +184 -0
- data/third_party/abseil-cpp/absl/functional/function_ref.h +139 -0
- data/third_party/abseil-cpp/absl/functional/internal/front_binder.h +95 -0
- data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +106 -0
- data/third_party/abseil-cpp/absl/hash/hash.h +325 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.cc +349 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.h +78 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +70 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +1045 -0
- data/third_party/abseil-cpp/absl/hash/internal/wyhash.cc +111 -0
- data/third_party/abseil-cpp/absl/hash/internal/wyhash.h +48 -0
- data/third_party/abseil-cpp/absl/memory/memory.h +699 -0
- data/third_party/abseil-cpp/absl/meta/type_traits.h +767 -0
- data/third_party/abseil-cpp/absl/numeric/bits.h +177 -0
- data/third_party/abseil-cpp/absl/numeric/int128.cc +390 -0
- data/third_party/abseil-cpp/absl/numeric/int128.h +1092 -0
- data/third_party/abseil-cpp/absl/numeric/int128_have_intrinsic.inc +302 -0
- data/third_party/abseil-cpp/absl/numeric/int128_no_intrinsic.inc +308 -0
- data/third_party/abseil-cpp/absl/numeric/internal/bits.h +358 -0
- data/third_party/abseil-cpp/absl/numeric/internal/representation.h +55 -0
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +69 -0
- data/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +396 -0
- data/third_party/abseil-cpp/absl/status/status.cc +452 -0
- data/third_party/abseil-cpp/absl/status/status.h +878 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.cc +38 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.h +51 -0
- data/third_party/abseil-cpp/absl/status/statusor.cc +71 -0
- data/third_party/abseil-cpp/absl/status/statusor.h +760 -0
- data/third_party/abseil-cpp/absl/strings/ascii.cc +200 -0
- data/third_party/abseil-cpp/absl/strings/ascii.h +242 -0
- data/third_party/abseil-cpp/absl/strings/charconv.cc +984 -0
- data/third_party/abseil-cpp/absl/strings/charconv.h +119 -0
- data/third_party/abseil-cpp/absl/strings/cord.cc +1953 -0
- data/third_party/abseil-cpp/absl/strings/cord.h +1394 -0
- data/third_party/abseil-cpp/absl/strings/escaping.cc +949 -0
- data/third_party/abseil-cpp/absl/strings/escaping.h +164 -0
- data/third_party/abseil-cpp/absl/strings/internal/char_map.h +156 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +359 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h +423 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +504 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.h +99 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.cc +83 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +543 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h +146 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.cc +897 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.h +589 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring_reader.h +114 -0
- data/third_party/abseil-cpp/absl/strings/internal/escaping.cc +180 -0
- data/third_party/abseil-cpp/absl/strings/internal/escaping.h +58 -0
- data/third_party/abseil-cpp/absl/strings/internal/memutil.cc +112 -0
- data/third_party/abseil-cpp/absl/strings/internal/memutil.h +148 -0
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.cc +36 -0
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.h +89 -0
- data/third_party/abseil-cpp/absl/strings/internal/resize_uninitialized.h +73 -0
- data/third_party/abseil-cpp/absl/strings/internal/stl_type_traits.h +248 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +488 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +518 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +259 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +217 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +333 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +75 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +427 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +1423 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +37 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.cc +72 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +96 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +350 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +349 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +314 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +430 -0
- data/third_party/abseil-cpp/absl/strings/internal/string_constant.h +64 -0
- data/third_party/abseil-cpp/absl/strings/internal/utf8.cc +53 -0
- data/third_party/abseil-cpp/absl/strings/internal/utf8.h +50 -0
- data/third_party/abseil-cpp/absl/strings/match.cc +43 -0
- data/third_party/abseil-cpp/absl/strings/match.h +100 -0
- data/third_party/abseil-cpp/absl/strings/numbers.cc +1093 -0
- data/third_party/abseil-cpp/absl/strings/numbers.h +266 -0
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +246 -0
- data/third_party/abseil-cpp/absl/strings/str_cat.h +408 -0
- data/third_party/abseil-cpp/absl/strings/str_format.h +813 -0
- data/third_party/abseil-cpp/absl/strings/str_join.h +293 -0
- data/third_party/abseil-cpp/absl/strings/str_replace.cc +82 -0
- data/third_party/abseil-cpp/absl/strings/str_replace.h +219 -0
- data/third_party/abseil-cpp/absl/strings/str_split.cc +139 -0
- data/third_party/abseil-cpp/absl/strings/str_split.h +548 -0
- data/third_party/abseil-cpp/absl/strings/string_view.cc +235 -0
- data/third_party/abseil-cpp/absl/strings/string_view.h +629 -0
- data/third_party/abseil-cpp/absl/strings/strip.h +91 -0
- data/third_party/abseil-cpp/absl/strings/substitute.cc +171 -0
- data/third_party/abseil-cpp/absl/strings/substitute.h +696 -0
- data/third_party/abseil-cpp/absl/synchronization/barrier.cc +52 -0
- data/third_party/abseil-cpp/absl/synchronization/barrier.h +79 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.cc +57 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.h +99 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +140 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.h +60 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/futex.h +154 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +698 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.h +141 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +156 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc +106 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +115 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc +428 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +155 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +2751 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +1082 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.cc +78 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.h +123 -0
- data/third_party/abseil-cpp/absl/time/civil_time.cc +175 -0
- data/third_party/abseil-cpp/absl/time/civil_time.h +538 -0
- data/third_party/abseil-cpp/absl/time/clock.cc +585 -0
- data/third_party/abseil-cpp/absl/time/clock.h +74 -0
- data/third_party/abseil-cpp/absl/time/duration.cc +954 -0
- data/third_party/abseil-cpp/absl/time/format.cc +160 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time.h +332 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h +628 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +386 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/zone_info_source.h +102 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc +94 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc +140 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.h +52 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +1029 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.cc +45 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.h +76 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc +113 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.h +93 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc +965 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.h +137 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc +315 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.h +55 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +187 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc +159 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.h +132 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h +122 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc +116 -0
- data/third_party/abseil-cpp/absl/time/internal/get_current_time_chrono.inc +31 -0
- data/third_party/abseil-cpp/absl/time/internal/get_current_time_posix.inc +24 -0
- data/third_party/abseil-cpp/absl/time/time.cc +500 -0
- data/third_party/abseil-cpp/absl/time/time.h +1585 -0
- data/third_party/abseil-cpp/absl/types/bad_optional_access.cc +48 -0
- data/third_party/abseil-cpp/absl/types/bad_optional_access.h +78 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.cc +64 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.h +82 -0
- data/third_party/abseil-cpp/absl/types/internal/optional.h +396 -0
- data/third_party/abseil-cpp/absl/types/internal/span.h +128 -0
- data/third_party/abseil-cpp/absl/types/internal/variant.h +1646 -0
- data/third_party/abseil-cpp/absl/types/optional.h +776 -0
- data/third_party/abseil-cpp/absl/types/span.h +726 -0
- data/third_party/abseil-cpp/absl/types/variant.h +866 -0
- data/third_party/abseil-cpp/absl/utility/utility.h +350 -0
- data/third_party/address_sorting/address_sorting.c +375 -0
- data/third_party/address_sorting/address_sorting_internal.h +70 -0
- data/third_party/address_sorting/address_sorting_posix.c +98 -0
- data/third_party/address_sorting/address_sorting_windows.c +95 -0
- data/third_party/address_sorting/include/address_sorting/address_sorting.h +115 -0
- data/third_party/boringssl-with-bazel/err_data.c +1489 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c +276 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.c +91 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_dup.c +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_enum.c +195 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.c +266 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_i2d_fp.c +88 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_int.c +420 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_mbstr.c +298 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c +288 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_octet.c +77 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_print.c +83 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strex.c +650 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_strnid.c +266 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_time.c +212 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_type.c +163 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c +264 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utf8.c +236 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c +440 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_par.c +80 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.c +105 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/charmap.h +15 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_enum.c +93 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_int.c +97 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_string.c +91 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/internal.h +196 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c +1193 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c +709 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c +233 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c +332 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c +129 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c +281 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/time_support.c +206 -0
- data/third_party/boringssl-with-bazel/src/crypto/base64/base64.c +469 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio.c +702 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.c +324 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/connect.c +541 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/fd.c +275 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/file.c +311 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/hexdump.c +192 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/internal.h +111 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/pair.c +483 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/printf.c +115 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket.c +192 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket_helper.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/blake2/blake2.c +156 -0
- data/third_party/boringssl-with-bazel/src/crypto/bn_extra/bn_asn1.c +57 -0
- data/third_party/boringssl-with-bazel/src/crypto/bn_extra/convert.c +470 -0
- data/third_party/boringssl-with-bazel/src/crypto/buf/buf.c +172 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/asn1_compat.c +52 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/ber.c +264 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbb.c +728 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c +711 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/internal.h +96 -0
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/unicode.c +155 -0
- data/third_party/boringssl-with-bazel/src/crypto/chacha/chacha.c +175 -0
- data/third_party/boringssl-with-bazel/src/crypto/chacha/internal.h +45 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.c +127 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/derive_key.c +152 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesccm.c +447 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesctrhmac.c +283 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesgcmsiv.c +891 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_chacha20poly1305.c +343 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_null.c +85 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc2.c +462 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc4.c +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_tls.c +601 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/internal.h +226 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/tls_cbc.c +338 -0
- data/third_party/boringssl-with-bazel/src/crypto/cmac/cmac.c +278 -0
- data/third_party/boringssl-with-bazel/src/crypto/conf/conf.c +821 -0
- data/third_party/boringssl-with-bazel/src/crypto/conf/conf_def.h +127 -0
- data/third_party/boringssl-with-bazel/src/crypto/conf/internal.h +31 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-fuchsia.c +55 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-linux.c +62 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-win.c +41 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux.c +229 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux.h +201 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-arm.c +38 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-intel.c +291 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-ppc64le.c +38 -0
- data/third_party/boringssl-with-bazel/src/crypto/crypto.c +226 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519.c +2159 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519_tables.h +7872 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/internal.h +146 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519.c +539 -0
- data/third_party/boringssl-with-bazel/src/crypto/dh_extra/dh_asn1.c +160 -0
- data/third_party/boringssl-with-bazel/src/crypto/dh_extra/params.c +272 -0
- data/third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c +268 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c +946 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c +390 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/internal.h +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_asn1.c +559 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_derive.c +95 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/hash_to_curve.c +385 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/internal.h +56 -0
- data/third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_extra.c +124 -0
- data/third_party/boringssl-with-bazel/src/crypto/ecdsa_extra/ecdsa_asn1.c +267 -0
- data/third_party/boringssl-with-bazel/src/crypto/engine/engine.c +99 -0
- data/third_party/boringssl-with-bazel/src/crypto/err/err.c +857 -0
- data/third_party/boringssl-with-bazel/src/crypto/err/internal.h +58 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/digestsign.c +231 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp.c +456 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c +547 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_ctx.c +484 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/internal.h +269 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_dsa_asn1.c +277 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ec.c +286 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ec_asn1.c +255 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519.c +104 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519_asn1.c +221 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_rsa.c +648 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_rsa_asn1.c +194 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_x25519.c +110 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_x25519_asn1.c +248 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/pbkdf.c +146 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/print.c +489 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/scrypt.c +211 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/sign.c +151 -0
- data/third_party/boringssl-with-bazel/src/crypto/ex_data.c +261 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes.c +108 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_nohw.c +1282 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/internal.h +238 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/key_wrap.c +236 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/mode_wrappers.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.c +266 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/add.c +316 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/asm/x86_64-gcc.c +541 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bn.c +438 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bytes.c +230 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/cmp.c +200 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/ctx.c +236 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div.c +902 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div_extra.c +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/exponentiation.c +1288 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd.c +378 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd_extra.c +326 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/generic.c +711 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h +715 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/jacobi.c +146 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery.c +502 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery_inv.c +186 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/mul.c +749 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/prime.c +1064 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/random.c +341 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/rsaz_exp.c +226 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/rsaz_exp.h +104 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/shift.c +364 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/sqrt.c +498 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/aead.c +284 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/cipher.c +636 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c +1473 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_des.c +237 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/internal.h +128 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/delocate.h +89 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/des/des.c +784 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/des/internal.h +238 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/check.c +217 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/dh.c +456 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c +282 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digests.c +304 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/internal.h +112 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/md32_common.h +195 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec.c +1268 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_key.c +472 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_montgomery.c +524 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/felem.c +100 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h +772 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/oct.c +328 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p224-64.c +1180 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64-table.h +9497 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64.c +633 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64.h +153 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256.c +740 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256_table.h +297 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/scalar.c +175 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple.c +357 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple_mul.c +270 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/util.c +255 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/wnaf.c +270 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdh/ecdh.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa.c +339 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/internal.h +39 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/fips_shared_support.c +32 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/hmac/hmac.c +228 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md4/md4.c +240 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/internal.h +37 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/md5.c +284 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cbc.c +178 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cfb.c +203 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ctr.c +201 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm.c +733 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c +304 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/internal.h +420 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ofb.c +97 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/polyval.c +91 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/ctrdrbg.c +202 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect.c +137 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect.h +49 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h +64 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/internal.h +184 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c +457 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/urandom.c +401 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/blinding.c +243 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/internal.h +131 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/padding.c +695 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +935 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +1416 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/fips.c +79 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c +874 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/internal.h +53 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha1-altivec.c +361 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha1.c +357 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha256.c +321 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha512.c +508 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/internal.h +39 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/kdf.c +165 -0
- data/third_party/boringssl-with-bazel/src/crypto/hkdf/hkdf.c +112 -0
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +618 -0
- data/third_party/boringssl-with-bazel/src/crypto/hrss/hrss.c +2198 -0
- data/third_party/boringssl-with-bazel/src/crypto/hrss/internal.h +68 -0
- data/third_party/boringssl-with-bazel/src/crypto/internal.h +959 -0
- data/third_party/boringssl-with-bazel/src/crypto/lhash/internal.h +253 -0
- data/third_party/boringssl-with-bazel/src/crypto/lhash/lhash.c +353 -0
- data/third_party/boringssl-with-bazel/src/crypto/mem.c +392 -0
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj.c +553 -0
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_dat.h +11585 -0
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_xref.c +122 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c +252 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_info.c +358 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_lib.c +769 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_oth.c +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pk8.c +255 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_pkey.c +214 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_x509.c +65 -0
- data/third_party/boringssl-with-bazel/src/crypto/pem/pem_xaux.c +65 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/internal.h +58 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7.c +164 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.c +526 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/internal.h +138 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/p5_pbev2.c +316 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8.c +530 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c +1383 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/internal.h +41 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305.c +321 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_arm.c +307 -0
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.c +860 -0
- data/third_party/boringssl-with-bazel/src/crypto/pool/internal.h +45 -0
- data/third_party/boringssl-with-bazel/src/crypto/pool/pool.c +221 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c +56 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/forkunsafe.c +46 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/fuchsia.c +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/passive.c +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c +74 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c +73 -0
- data/third_party/boringssl-with-bazel/src/crypto/rc4/rc4.c +98 -0
- data/third_party/boringssl-with-bazel/src/crypto/refcount_c11.c +67 -0
- data/third_party/boringssl-with-bazel/src/crypto/refcount_lock.c +53 -0
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_asn1.c +324 -0
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_print.c +22 -0
- data/third_party/boringssl-with-bazel/src/crypto/siphash/siphash.c +82 -0
- data/third_party/boringssl-with-bazel/src/crypto/stack/stack.c +425 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread.c +110 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread_none.c +59 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread_pthread.c +182 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread_win.c +260 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h +318 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c +1399 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c +858 -0
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/voprf.c +766 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_digest.c +96 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_sign.c +128 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_verify.c +118 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c +163 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.c +842 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/by_dir.c +459 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/by_file.c +277 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/i2d_pr.c +83 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/internal.h +398 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/name_print.c +246 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c +400 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +130 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_req.c +246 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +365 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c +116 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509.c +90 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_att.c +358 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c +461 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_d2.c +106 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_def.c +103 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.c +212 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_lu.c +830 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c +199 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_req.c +304 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c +240 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c +331 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_txt.c +204 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.c +281 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +2456 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c +651 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c +284 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +388 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509rset.c +84 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509spki.c +137 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_algor.c +153 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +386 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_attrib.c +98 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c +565 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_exten.c +77 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_info.c +98 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_name.c +544 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pkey.c +106 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pubkey.c +217 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_req.c +106 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c +94 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_spki.c +80 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_val.c +71 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +394 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.c +201 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/ext_dat.h +138 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +84 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_cache.c +287 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c +132 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_int.h +217 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_lib.c +155 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_map.c +131 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_node.c +189 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_tree.c +843 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akey.c +226 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akeya.c +72 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c +639 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bcons.c +133 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bitst.c +144 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c +468 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c +501 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_crld.c +563 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_enum.c +106 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_extku.c +148 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_genn.c +266 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ia5.c +121 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_info.c +218 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_int.c +91 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_lib.c +362 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ncons.c +558 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ocsp.c +68 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pci.c +289 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pcia.c +57 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pcons.c +139 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pmaps.c +154 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c +230 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +929 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_skey.c +156 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +1437 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +480 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/aes.h +207 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +240 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +1321 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1_mac.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1t.h +718 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +628 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/base64.h +190 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +939 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/blake2.h +62 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/blowfish.h +93 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/bn.h +1057 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/buf.h +137 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/buffer.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +586 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cast.h +96 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/chacha.h +41 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +661 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cmac.h +91 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/conf.h +183 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/cpu.h +202 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/crypto.h +169 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/curve25519.h +201 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/des.h +183 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +361 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +348 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dsa.h +457 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dtls1.h +16 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/e_os2.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ec.h +442 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ec_key.h +372 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdh.h +118 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdsa.h +238 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/engine.h +109 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/err.h +466 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +1109 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/evp_errors.h +99 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ex_data.h +203 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hkdf.h +68 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hmac.h +186 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hpke.h +350 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/hrss.h +102 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/is_boringssl.h +16 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/lhash.h +81 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/md4.h +108 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/md5.h +109 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/mem.h +184 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/nid.h +4259 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/obj.h +256 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/obj_mac.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/objects.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslconf.h +70 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslv.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ossl_typ.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +483 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs12.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs7.h +240 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs8.h +277 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/poly1305.h +49 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pool.h +102 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/rand.h +114 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/rc4.h +96 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ripemd.h +108 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +859 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/safestack.h +16 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/sha.h +294 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/siphash.h +37 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/span.h +222 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/srtp.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +5606 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl3.h +333 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/stack.h +542 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/thread.h +191 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +647 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +310 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/type_check.h +90 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +2450 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +18 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +1020 -0
- data/third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc +192 -0
- data/third_party/boringssl-with-bazel/src/ssl/d1_both.cc +835 -0
- data/third_party/boringssl-with-bazel/src/ssl/d1_lib.cc +268 -0
- data/third_party/boringssl-with-bazel/src/ssl/d1_pkt.cc +273 -0
- data/third_party/boringssl-with-bazel/src/ssl/d1_srtp.cc +232 -0
- data/third_party/boringssl-with-bazel/src/ssl/dtls_method.cc +200 -0
- data/third_party/boringssl-with-bazel/src/ssl/dtls_record.cc +353 -0
- data/third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc +1084 -0
- data/third_party/boringssl-with-bazel/src/ssl/extensions.cc +4325 -0
- data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +986 -0
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +758 -0
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +1986 -0
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +1956 -0
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +3953 -0
- data/third_party/boringssl-with-bazel/src/ssl/s3_both.cc +730 -0
- data/third_party/boringssl-with-bazel/src/ssl/s3_lib.cc +219 -0
- data/third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc +453 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_aead_ctx.cc +432 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc +896 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_buffer.cc +306 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc +1014 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +1717 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_file.cc +585 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc +400 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +3068 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc +837 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +1342 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc +233 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +272 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +398 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc +1363 -0
- data/third_party/boringssl-with-bazel/src/ssl/t1_enc.cc +384 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +733 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +1122 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +582 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +1349 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls_method.cc +319 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls_record.cc +705 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_32.h +981 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_64.h +619 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_32.h +3147 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_64.h +1226 -0
- data/third_party/cares/ares_build.h +223 -0
- data/third_party/cares/cares/ares.h +670 -0
- data/third_party/cares/cares/ares__close_sockets.c +61 -0
- data/third_party/cares/cares/ares__get_hostent.c +261 -0
- data/third_party/cares/cares/ares__read_line.c +73 -0
- data/third_party/cares/cares/ares__timeval.c +111 -0
- data/third_party/cares/cares/ares_cancel.c +63 -0
- data/third_party/cares/cares/ares_create_query.c +206 -0
- data/third_party/cares/cares/ares_data.c +222 -0
- data/third_party/cares/cares/ares_data.h +72 -0
- data/third_party/cares/cares/ares_destroy.c +113 -0
- data/third_party/cares/cares/ares_dns.h +103 -0
- data/third_party/cares/cares/ares_expand_name.c +209 -0
- data/third_party/cares/cares/ares_expand_string.c +70 -0
- data/third_party/cares/cares/ares_fds.c +59 -0
- data/third_party/cares/cares/ares_free_hostent.c +41 -0
- data/third_party/cares/cares/ares_free_string.c +25 -0
- data/third_party/cares/cares/ares_getenv.c +30 -0
- data/third_party/cares/cares/ares_getenv.h +26 -0
- data/third_party/cares/cares/ares_gethostbyaddr.c +294 -0
- data/third_party/cares/cares/ares_gethostbyname.c +529 -0
- data/third_party/cares/cares/ares_getnameinfo.c +453 -0
- data/third_party/cares/cares/ares_getopt.c +122 -0
- data/third_party/cares/cares/ares_getopt.h +53 -0
- data/third_party/cares/cares/ares_getsock.c +66 -0
- data/third_party/cares/cares/ares_inet_net_pton.h +25 -0
- data/third_party/cares/cares/ares_init.c +2615 -0
- data/third_party/cares/cares/ares_iphlpapi.h +221 -0
- data/third_party/cares/cares/ares_ipv6.h +78 -0
- data/third_party/cares/cares/ares_library_init.c +195 -0
- data/third_party/cares/cares/ares_library_init.h +43 -0
- data/third_party/cares/cares/ares_llist.c +63 -0
- data/third_party/cares/cares/ares_llist.h +39 -0
- data/third_party/cares/cares/ares_mkquery.c +24 -0
- data/third_party/cares/cares/ares_nowarn.c +260 -0
- data/third_party/cares/cares/ares_nowarn.h +61 -0
- data/third_party/cares/cares/ares_options.c +406 -0
- data/third_party/cares/cares/ares_parse_a_reply.c +264 -0
- data/third_party/cares/cares/ares_parse_aaaa_reply.c +264 -0
- data/third_party/cares/cares/ares_parse_mx_reply.c +170 -0
- data/third_party/cares/cares/ares_parse_naptr_reply.c +194 -0
- data/third_party/cares/cares/ares_parse_ns_reply.c +183 -0
- data/third_party/cares/cares/ares_parse_ptr_reply.c +221 -0
- data/third_party/cares/cares/ares_parse_soa_reply.c +133 -0
- data/third_party/cares/cares/ares_parse_srv_reply.c +179 -0
- data/third_party/cares/cares/ares_parse_txt_reply.c +220 -0
- data/third_party/cares/cares/ares_platform.c +11042 -0
- data/third_party/cares/cares/ares_platform.h +43 -0
- data/third_party/cares/cares/ares_private.h +382 -0
- data/third_party/cares/cares/ares_process.c +1473 -0
- data/third_party/cares/cares/ares_query.c +186 -0
- data/third_party/cares/cares/ares_rules.h +125 -0
- data/third_party/cares/cares/ares_search.c +323 -0
- data/third_party/cares/cares/ares_send.c +137 -0
- data/third_party/cares/cares/ares_setup.h +217 -0
- data/third_party/cares/cares/ares_strcasecmp.c +66 -0
- data/third_party/cares/cares/ares_strcasecmp.h +30 -0
- data/third_party/cares/cares/ares_strdup.c +49 -0
- data/third_party/cares/cares/ares_strdup.h +24 -0
- data/third_party/cares/cares/ares_strerror.c +56 -0
- data/third_party/cares/cares/ares_strsplit.c +174 -0
- data/third_party/cares/cares/ares_strsplit.h +43 -0
- data/third_party/cares/cares/ares_timeout.c +88 -0
- data/third_party/cares/cares/ares_version.c +11 -0
- data/third_party/cares/cares/ares_version.h +24 -0
- data/third_party/cares/cares/ares_writev.c +79 -0
- data/third_party/cares/cares/bitncmp.c +59 -0
- data/third_party/cares/cares/bitncmp.h +26 -0
- data/third_party/cares/cares/config-win32.h +351 -0
- data/third_party/cares/cares/inet_net_pton.c +450 -0
- data/third_party/cares/cares/inet_ntop.c +207 -0
- data/third_party/cares/cares/setup_once.h +554 -0
- data/third_party/cares/cares/windows_port.c +22 -0
- data/third_party/cares/config_darwin/ares_config.h +428 -0
- data/third_party/cares/config_freebsd/ares_config.h +505 -0
- data/third_party/cares/config_linux/ares_config.h +461 -0
- data/third_party/cares/config_openbsd/ares_config.h +505 -0
- data/third_party/re2/re2/bitmap256.h +117 -0
- data/third_party/re2/re2/bitstate.cc +385 -0
- data/third_party/re2/re2/compile.cc +1261 -0
- data/third_party/re2/re2/dfa.cc +2118 -0
- data/third_party/re2/re2/filtered_re2.cc +137 -0
- data/third_party/re2/re2/filtered_re2.h +114 -0
- data/third_party/re2/re2/mimics_pcre.cc +197 -0
- data/third_party/re2/re2/nfa.cc +713 -0
- data/third_party/re2/re2/onepass.cc +623 -0
- data/third_party/re2/re2/parse.cc +2483 -0
- data/third_party/re2/re2/perl_groups.cc +119 -0
- data/third_party/re2/re2/pod_array.h +55 -0
- data/third_party/re2/re2/prefilter.cc +711 -0
- data/third_party/re2/re2/prefilter.h +108 -0
- data/third_party/re2/re2/prefilter_tree.cc +407 -0
- data/third_party/re2/re2/prefilter_tree.h +139 -0
- data/third_party/re2/re2/prog.cc +1166 -0
- data/third_party/re2/re2/prog.h +455 -0
- data/third_party/re2/re2/re2.cc +1331 -0
- data/third_party/re2/re2/re2.h +1017 -0
- data/third_party/re2/re2/regexp.cc +987 -0
- data/third_party/re2/re2/regexp.h +665 -0
- data/third_party/re2/re2/set.cc +176 -0
- data/third_party/re2/re2/set.h +85 -0
- data/third_party/re2/re2/simplify.cc +665 -0
- data/third_party/re2/re2/sparse_array.h +392 -0
- data/third_party/re2/re2/sparse_set.h +264 -0
- data/third_party/re2/re2/stringpiece.cc +65 -0
- data/third_party/re2/re2/stringpiece.h +210 -0
- data/third_party/re2/re2/tostring.cc +351 -0
- data/third_party/re2/re2/unicode_casefold.cc +582 -0
- data/third_party/re2/re2/unicode_casefold.h +78 -0
- data/third_party/re2/re2/unicode_groups.cc +6269 -0
- data/third_party/re2/re2/unicode_groups.h +67 -0
- data/third_party/re2/re2/walker-inl.h +246 -0
- data/third_party/re2/util/benchmark.h +156 -0
- data/third_party/re2/util/flags.h +26 -0
- data/third_party/re2/util/logging.h +109 -0
- data/third_party/re2/util/malloc_counter.h +19 -0
- data/third_party/re2/util/mix.h +41 -0
- data/third_party/re2/util/mutex.h +148 -0
- data/third_party/re2/util/pcre.cc +1025 -0
- data/third_party/re2/util/pcre.h +681 -0
- data/third_party/re2/util/rune.cc +260 -0
- data/third_party/re2/util/strutil.cc +149 -0
- data/third_party/re2/util/strutil.h +21 -0
- data/third_party/re2/util/test.h +50 -0
- data/third_party/re2/util/utf.h +44 -0
- data/third_party/re2/util/util.h +42 -0
- data/third_party/upb/upb/decode.c +771 -0
- data/third_party/upb/upb/decode.h +68 -0
- data/third_party/upb/upb/decode_fast.c +1053 -0
- data/third_party/upb/upb/decode_fast.h +153 -0
- data/third_party/upb/upb/decode_internal.h +193 -0
- data/third_party/upb/upb/def.c +2168 -0
- data/third_party/upb/upb/def.h +337 -0
- data/third_party/upb/upb/def.hpp +468 -0
- data/third_party/upb/upb/encode.c +511 -0
- data/third_party/upb/upb/encode.h +73 -0
- data/third_party/upb/upb/msg.c +397 -0
- data/third_party/upb/upb/msg.h +108 -0
- data/third_party/upb/upb/msg_internal.h +687 -0
- data/third_party/upb/upb/port_def.inc +253 -0
- data/third_party/upb/upb/port_undef.inc +61 -0
- data/third_party/upb/upb/reflection.c +400 -0
- data/third_party/upb/upb/reflection.h +196 -0
- data/third_party/upb/upb/reflection.hpp +37 -0
- data/third_party/upb/upb/table.c +842 -0
- data/third_party/upb/upb/table_internal.h +351 -0
- data/third_party/upb/upb/text_encode.c +449 -0
- data/third_party/upb/upb/text_encode.h +64 -0
- data/third_party/upb/upb/upb.c +315 -0
- data/third_party/upb/upb/upb.h +367 -0
- data/third_party/upb/upb/upb.hpp +112 -0
- data/third_party/upb/upb/upb_internal.h +58 -0
- data/third_party/xxhash/xxhash.h +5325 -0
- data/third_party/zlib/adler32.c +186 -0
- data/third_party/zlib/compress.c +86 -0
- data/third_party/zlib/crc32.c +442 -0
- data/third_party/zlib/crc32.h +441 -0
- data/third_party/zlib/deflate.c +2163 -0
- data/third_party/zlib/deflate.h +349 -0
- data/third_party/zlib/gzclose.c +25 -0
- data/third_party/zlib/gzguts.h +218 -0
- data/third_party/zlib/gzlib.c +637 -0
- data/third_party/zlib/gzread.c +654 -0
- data/third_party/zlib/gzwrite.c +665 -0
- data/third_party/zlib/infback.c +640 -0
- data/third_party/zlib/inffast.c +323 -0
- data/third_party/zlib/inffast.h +11 -0
- data/third_party/zlib/inffixed.h +94 -0
- data/third_party/zlib/inflate.c +1561 -0
- data/third_party/zlib/inflate.h +125 -0
- data/third_party/zlib/inftrees.c +304 -0
- data/third_party/zlib/inftrees.h +62 -0
- data/third_party/zlib/trees.c +1203 -0
- data/third_party/zlib/trees.h +128 -0
- data/third_party/zlib/uncompr.c +93 -0
- data/third_party/zlib/zconf.h +534 -0
- data/third_party/zlib/zlib.h +1912 -0
- data/third_party/zlib/zutil.c +325 -0
- data/third_party/zlib/zutil.h +271 -0
- metadata +2563 -0
@@ -0,0 +1,1953 @@
|
|
1
|
+
// Copyright 2020 The Abseil Authors.
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
#include "absl/strings/cord.h"
|
16
|
+
|
17
|
+
#include <algorithm>
|
18
|
+
#include <atomic>
|
19
|
+
#include <cstddef>
|
20
|
+
#include <cstdio>
|
21
|
+
#include <cstdlib>
|
22
|
+
#include <iomanip>
|
23
|
+
#include <iostream>
|
24
|
+
#include <limits>
|
25
|
+
#include <ostream>
|
26
|
+
#include <sstream>
|
27
|
+
#include <type_traits>
|
28
|
+
#include <unordered_set>
|
29
|
+
#include <vector>
|
30
|
+
|
31
|
+
#include "absl/base/casts.h"
|
32
|
+
#include "absl/base/internal/raw_logging.h"
|
33
|
+
#include "absl/base/macros.h"
|
34
|
+
#include "absl/base/port.h"
|
35
|
+
#include "absl/container/fixed_array.h"
|
36
|
+
#include "absl/container/inlined_vector.h"
|
37
|
+
#include "absl/strings/escaping.h"
|
38
|
+
#include "absl/strings/internal/cord_internal.h"
|
39
|
+
#include "absl/strings/internal/cord_rep_flat.h"
|
40
|
+
#include "absl/strings/internal/cord_rep_ring.h"
|
41
|
+
#include "absl/strings/internal/resize_uninitialized.h"
|
42
|
+
#include "absl/strings/str_cat.h"
|
43
|
+
#include "absl/strings/str_format.h"
|
44
|
+
#include "absl/strings/str_join.h"
|
45
|
+
#include "absl/strings/string_view.h"
|
46
|
+
|
47
|
+
namespace absl {
|
48
|
+
ABSL_NAMESPACE_BEGIN
|
49
|
+
|
50
|
+
using ::absl::cord_internal::CordRep;
|
51
|
+
using ::absl::cord_internal::CordRepConcat;
|
52
|
+
using ::absl::cord_internal::CordRepExternal;
|
53
|
+
using ::absl::cord_internal::CordRepFlat;
|
54
|
+
using ::absl::cord_internal::CordRepRing;
|
55
|
+
using ::absl::cord_internal::CordRepSubstring;
|
56
|
+
using ::absl::cord_internal::kMinFlatLength;
|
57
|
+
using ::absl::cord_internal::kMaxFlatLength;
|
58
|
+
|
59
|
+
using ::absl::cord_internal::CONCAT;
|
60
|
+
using ::absl::cord_internal::EXTERNAL;
|
61
|
+
using ::absl::cord_internal::FLAT;
|
62
|
+
using ::absl::cord_internal::RING;
|
63
|
+
using ::absl::cord_internal::SUBSTRING;
|
64
|
+
|
65
|
+
using ::absl::cord_internal::kInlinedVectorSize;
|
66
|
+
using ::absl::cord_internal::kMaxBytesToCopy;
|
67
|
+
|
68
|
+
constexpr uint64_t Fibonacci(unsigned char n, uint64_t a = 0, uint64_t b = 1) {
|
69
|
+
return n == 0 ? a : Fibonacci(n - 1, b, a + b);
|
70
|
+
}
|
71
|
+
|
72
|
+
static_assert(Fibonacci(63) == 6557470319842,
|
73
|
+
"Fibonacci values computed incorrectly");
|
74
|
+
|
75
|
+
// Minimum length required for a given depth tree -- a tree is considered
|
76
|
+
// balanced if
|
77
|
+
// length(t) >= min_length[depth(t)]
|
78
|
+
// The root node depth is allowed to become twice as large to reduce rebalancing
|
79
|
+
// for larger strings (see IsRootBalanced).
|
80
|
+
static constexpr uint64_t min_length[] = {
|
81
|
+
Fibonacci(2), Fibonacci(3), Fibonacci(4), Fibonacci(5),
|
82
|
+
Fibonacci(6), Fibonacci(7), Fibonacci(8), Fibonacci(9),
|
83
|
+
Fibonacci(10), Fibonacci(11), Fibonacci(12), Fibonacci(13),
|
84
|
+
Fibonacci(14), Fibonacci(15), Fibonacci(16), Fibonacci(17),
|
85
|
+
Fibonacci(18), Fibonacci(19), Fibonacci(20), Fibonacci(21),
|
86
|
+
Fibonacci(22), Fibonacci(23), Fibonacci(24), Fibonacci(25),
|
87
|
+
Fibonacci(26), Fibonacci(27), Fibonacci(28), Fibonacci(29),
|
88
|
+
Fibonacci(30), Fibonacci(31), Fibonacci(32), Fibonacci(33),
|
89
|
+
Fibonacci(34), Fibonacci(35), Fibonacci(36), Fibonacci(37),
|
90
|
+
Fibonacci(38), Fibonacci(39), Fibonacci(40), Fibonacci(41),
|
91
|
+
Fibonacci(42), Fibonacci(43), Fibonacci(44), Fibonacci(45),
|
92
|
+
Fibonacci(46), Fibonacci(47),
|
93
|
+
0xffffffffffffffffull, // Avoid overflow
|
94
|
+
};
|
95
|
+
|
96
|
+
static const int kMinLengthSize = ABSL_ARRAYSIZE(min_length);
|
97
|
+
|
98
|
+
static inline bool cord_ring_enabled() {
|
99
|
+
return cord_internal::cord_ring_buffer_enabled.load(
|
100
|
+
std::memory_order_relaxed);
|
101
|
+
}
|
102
|
+
|
103
|
+
static inline bool IsRootBalanced(CordRep* node) {
|
104
|
+
if (node->tag != CONCAT) {
|
105
|
+
return true;
|
106
|
+
} else if (node->concat()->depth() <= 15) {
|
107
|
+
return true;
|
108
|
+
} else if (node->concat()->depth() > kMinLengthSize) {
|
109
|
+
return false;
|
110
|
+
} else {
|
111
|
+
// Allow depth to become twice as large as implied by fibonacci rule to
|
112
|
+
// reduce rebalancing for larger strings.
|
113
|
+
return (node->length >= min_length[node->concat()->depth() / 2]);
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
static CordRep* Rebalance(CordRep* node);
|
118
|
+
static void DumpNode(CordRep* rep, bool include_data, std::ostream* os,
|
119
|
+
int indent = 0);
|
120
|
+
static bool VerifyNode(CordRep* root, CordRep* start_node,
|
121
|
+
bool full_validation);
|
122
|
+
|
123
|
+
static inline CordRep* VerifyTree(CordRep* node) {
|
124
|
+
// Verification is expensive, so only do it in debug mode.
|
125
|
+
// Even in debug mode we normally do only light validation.
|
126
|
+
// If you are debugging Cord itself, you should define the
|
127
|
+
// macro EXTRA_CORD_VALIDATION, e.g. by adding
|
128
|
+
// --copt=-DEXTRA_CORD_VALIDATION to the blaze line.
|
129
|
+
#ifdef EXTRA_CORD_VALIDATION
|
130
|
+
assert(node == nullptr || VerifyNode(node, node, /*full_validation=*/true));
|
131
|
+
#else // EXTRA_CORD_VALIDATION
|
132
|
+
assert(node == nullptr || VerifyNode(node, node, /*full_validation=*/false));
|
133
|
+
#endif // EXTRA_CORD_VALIDATION
|
134
|
+
static_cast<void>(&VerifyNode);
|
135
|
+
|
136
|
+
return node;
|
137
|
+
}
|
138
|
+
|
139
|
+
// Return the depth of a node
|
140
|
+
static int Depth(const CordRep* rep) {
|
141
|
+
if (rep->tag == CONCAT) {
|
142
|
+
return rep->concat()->depth();
|
143
|
+
} else {
|
144
|
+
return 0;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
static void SetConcatChildren(CordRepConcat* concat, CordRep* left,
|
149
|
+
CordRep* right) {
|
150
|
+
concat->left = left;
|
151
|
+
concat->right = right;
|
152
|
+
|
153
|
+
concat->length = left->length + right->length;
|
154
|
+
concat->set_depth(1 + std::max(Depth(left), Depth(right)));
|
155
|
+
}
|
156
|
+
|
157
|
+
// Create a concatenation of the specified nodes.
|
158
|
+
// Does not change the refcounts of "left" and "right".
|
159
|
+
// The returned node has a refcount of 1.
|
160
|
+
static CordRep* RawConcat(CordRep* left, CordRep* right) {
|
161
|
+
// Avoid making degenerate concat nodes (one child is empty)
|
162
|
+
if (left == nullptr) return right;
|
163
|
+
if (right == nullptr) return left;
|
164
|
+
if (left->length == 0) {
|
165
|
+
CordRep::Unref(left);
|
166
|
+
return right;
|
167
|
+
}
|
168
|
+
if (right->length == 0) {
|
169
|
+
CordRep::Unref(right);
|
170
|
+
return left;
|
171
|
+
}
|
172
|
+
|
173
|
+
CordRepConcat* rep = new CordRepConcat();
|
174
|
+
rep->tag = CONCAT;
|
175
|
+
SetConcatChildren(rep, left, right);
|
176
|
+
|
177
|
+
return rep;
|
178
|
+
}
|
179
|
+
|
180
|
+
static CordRep* Concat(CordRep* left, CordRep* right) {
|
181
|
+
CordRep* rep = RawConcat(left, right);
|
182
|
+
if (rep != nullptr && !IsRootBalanced(rep)) {
|
183
|
+
rep = Rebalance(rep);
|
184
|
+
}
|
185
|
+
return VerifyTree(rep);
|
186
|
+
}
|
187
|
+
|
188
|
+
// Make a balanced tree out of an array of leaf nodes.
|
189
|
+
static CordRep* MakeBalancedTree(CordRep** reps, size_t n) {
|
190
|
+
// Make repeated passes over the array, merging adjacent pairs
|
191
|
+
// until we are left with just a single node.
|
192
|
+
while (n > 1) {
|
193
|
+
size_t dst = 0;
|
194
|
+
for (size_t src = 0; src < n; src += 2) {
|
195
|
+
if (src + 1 < n) {
|
196
|
+
reps[dst] = Concat(reps[src], reps[src + 1]);
|
197
|
+
} else {
|
198
|
+
reps[dst] = reps[src];
|
199
|
+
}
|
200
|
+
dst++;
|
201
|
+
}
|
202
|
+
n = dst;
|
203
|
+
}
|
204
|
+
|
205
|
+
return reps[0];
|
206
|
+
}
|
207
|
+
|
208
|
+
static CordRepFlat* CreateFlat(const char* data, size_t length,
|
209
|
+
size_t alloc_hint) {
|
210
|
+
CordRepFlat* flat = CordRepFlat::New(length + alloc_hint);
|
211
|
+
flat->length = length;
|
212
|
+
memcpy(flat->Data(), data, length);
|
213
|
+
return flat;
|
214
|
+
}
|
215
|
+
|
216
|
+
// Creates a new flat or ringbuffer out of the specified array.
|
217
|
+
// The returned node has a refcount of 1.
|
218
|
+
static CordRep* RingNewTree(const char* data, size_t length,
|
219
|
+
size_t alloc_hint) {
|
220
|
+
if (length <= kMaxFlatLength) {
|
221
|
+
return CreateFlat(data, length, alloc_hint);
|
222
|
+
}
|
223
|
+
CordRepFlat* flat = CreateFlat(data, kMaxFlatLength, 0);
|
224
|
+
data += kMaxFlatLength;
|
225
|
+
length -= kMaxFlatLength;
|
226
|
+
size_t extra = (length - 1) / kMaxFlatLength + 1;
|
227
|
+
auto* root = CordRepRing::Create(flat, extra);
|
228
|
+
return CordRepRing::Append(root, {data, length}, alloc_hint);
|
229
|
+
}
|
230
|
+
|
231
|
+
// Create a new tree out of the specified array.
|
232
|
+
// The returned node has a refcount of 1.
|
233
|
+
static CordRep* NewTree(const char* data,
|
234
|
+
size_t length,
|
235
|
+
size_t alloc_hint) {
|
236
|
+
if (length == 0) return nullptr;
|
237
|
+
if (cord_ring_enabled()) {
|
238
|
+
return RingNewTree(data, length, alloc_hint);
|
239
|
+
}
|
240
|
+
absl::FixedArray<CordRep*> reps((length - 1) / kMaxFlatLength + 1);
|
241
|
+
size_t n = 0;
|
242
|
+
do {
|
243
|
+
const size_t len = std::min(length, kMaxFlatLength);
|
244
|
+
CordRepFlat* rep = CordRepFlat::New(len + alloc_hint);
|
245
|
+
rep->length = len;
|
246
|
+
memcpy(rep->Data(), data, len);
|
247
|
+
reps[n++] = VerifyTree(rep);
|
248
|
+
data += len;
|
249
|
+
length -= len;
|
250
|
+
} while (length != 0);
|
251
|
+
return MakeBalancedTree(reps.data(), n);
|
252
|
+
}
|
253
|
+
|
254
|
+
namespace cord_internal {
|
255
|
+
|
256
|
+
void InitializeCordRepExternal(absl::string_view data, CordRepExternal* rep) {
|
257
|
+
assert(!data.empty());
|
258
|
+
rep->length = data.size();
|
259
|
+
rep->tag = EXTERNAL;
|
260
|
+
rep->base = data.data();
|
261
|
+
VerifyTree(rep);
|
262
|
+
}
|
263
|
+
|
264
|
+
} // namespace cord_internal
|
265
|
+
|
266
|
+
static CordRep* NewSubstring(CordRep* child, size_t offset, size_t length) {
|
267
|
+
// Never create empty substring nodes
|
268
|
+
if (length == 0) {
|
269
|
+
CordRep::Unref(child);
|
270
|
+
return nullptr;
|
271
|
+
} else {
|
272
|
+
CordRepSubstring* rep = new CordRepSubstring();
|
273
|
+
assert((offset + length) <= child->length);
|
274
|
+
rep->length = length;
|
275
|
+
rep->tag = SUBSTRING;
|
276
|
+
rep->start = offset;
|
277
|
+
rep->child = child;
|
278
|
+
return VerifyTree(rep);
|
279
|
+
}
|
280
|
+
}
|
281
|
+
|
282
|
+
// --------------------------------------------------------------------
|
283
|
+
// Cord::InlineRep functions
|
284
|
+
|
285
|
+
constexpr unsigned char Cord::InlineRep::kMaxInline;
|
286
|
+
|
287
|
+
inline void Cord::InlineRep::set_data(const char* data, size_t n,
|
288
|
+
bool nullify_tail) {
|
289
|
+
static_assert(kMaxInline == 15, "set_data is hard-coded for a length of 15");
|
290
|
+
|
291
|
+
cord_internal::SmallMemmove(data_.as_chars(), data, n, nullify_tail);
|
292
|
+
set_inline_size(n);
|
293
|
+
}
|
294
|
+
|
295
|
+
inline char* Cord::InlineRep::set_data(size_t n) {
|
296
|
+
assert(n <= kMaxInline);
|
297
|
+
ResetToEmpty();
|
298
|
+
set_inline_size(n);
|
299
|
+
return data_.as_chars();
|
300
|
+
}
|
301
|
+
|
302
|
+
inline CordRep* Cord::InlineRep::force_tree(size_t extra_hint) {
|
303
|
+
if (data_.is_tree()) {
|
304
|
+
return data_.as_tree();
|
305
|
+
}
|
306
|
+
|
307
|
+
size_t len = inline_size();
|
308
|
+
CordRepFlat* result = CordRepFlat::New(len + extra_hint);
|
309
|
+
result->length = len;
|
310
|
+
static_assert(kMinFlatLength >= sizeof(data_), "");
|
311
|
+
memcpy(result->Data(), data_.as_chars(), sizeof(data_));
|
312
|
+
set_tree(result);
|
313
|
+
return result;
|
314
|
+
}
|
315
|
+
|
316
|
+
inline void Cord::InlineRep::reduce_size(size_t n) {
|
317
|
+
size_t tag = inline_size();
|
318
|
+
assert(tag <= kMaxInline);
|
319
|
+
assert(tag >= n);
|
320
|
+
tag -= n;
|
321
|
+
memset(data_.as_chars() + tag, 0, n);
|
322
|
+
set_inline_size(static_cast<char>(tag));
|
323
|
+
}
|
324
|
+
|
325
|
+
inline void Cord::InlineRep::remove_prefix(size_t n) {
|
326
|
+
cord_internal::SmallMemmove(data_.as_chars(), data_.as_chars() + n,
|
327
|
+
inline_size() - n);
|
328
|
+
reduce_size(n);
|
329
|
+
}
|
330
|
+
|
331
|
+
// Returns `rep` converted into a CordRepRing.
|
332
|
+
// Directly returns `rep` if `rep` is already a CordRepRing.
|
333
|
+
static CordRepRing* ForceRing(CordRep* rep, size_t extra) {
|
334
|
+
return (rep->tag == RING) ? rep->ring() : CordRepRing::Create(rep, extra);
|
335
|
+
}
|
336
|
+
|
337
|
+
void Cord::InlineRep::AppendTree(CordRep* tree) {
|
338
|
+
if (tree == nullptr) return;
|
339
|
+
if (data_.is_empty()) {
|
340
|
+
set_tree(tree);
|
341
|
+
} else if (cord_ring_enabled()) {
|
342
|
+
set_tree(CordRepRing::Append(ForceRing(force_tree(0), 1), tree));
|
343
|
+
} else {
|
344
|
+
set_tree(Concat(force_tree(0), tree));
|
345
|
+
}
|
346
|
+
}
|
347
|
+
|
348
|
+
void Cord::InlineRep::PrependTree(CordRep* tree) {
|
349
|
+
assert(tree != nullptr);
|
350
|
+
if (data_.is_empty()) {
|
351
|
+
set_tree(tree);
|
352
|
+
} else if (cord_ring_enabled()) {
|
353
|
+
set_tree(CordRepRing::Prepend(ForceRing(force_tree(0), 1), tree));
|
354
|
+
} else {
|
355
|
+
set_tree(Concat(tree, force_tree(0)));
|
356
|
+
}
|
357
|
+
}
|
358
|
+
|
359
|
+
// Searches for a non-full flat node at the rightmost leaf of the tree. If a
|
360
|
+
// suitable leaf is found, the function will update the length field for all
|
361
|
+
// nodes to account for the size increase. The append region address will be
|
362
|
+
// written to region and the actual size increase will be written to size.
|
363
|
+
static inline bool PrepareAppendRegion(CordRep* root, char** region,
|
364
|
+
size_t* size, size_t max_length) {
|
365
|
+
if (root->tag == RING && root->refcount.IsOne()) {
|
366
|
+
Span<char> span = root->ring()->GetAppendBuffer(max_length);
|
367
|
+
if (!span.empty()) {
|
368
|
+
*region = span.data();
|
369
|
+
*size = span.size();
|
370
|
+
return true;
|
371
|
+
}
|
372
|
+
}
|
373
|
+
|
374
|
+
// Search down the right-hand path for a non-full FLAT node.
|
375
|
+
CordRep* dst = root;
|
376
|
+
while (dst->tag == CONCAT && dst->refcount.IsOne()) {
|
377
|
+
dst = dst->concat()->right;
|
378
|
+
}
|
379
|
+
|
380
|
+
if (dst->tag < FLAT || !dst->refcount.IsOne()) {
|
381
|
+
*region = nullptr;
|
382
|
+
*size = 0;
|
383
|
+
return false;
|
384
|
+
}
|
385
|
+
|
386
|
+
const size_t in_use = dst->length;
|
387
|
+
const size_t capacity = dst->flat()->Capacity();
|
388
|
+
if (in_use == capacity) {
|
389
|
+
*region = nullptr;
|
390
|
+
*size = 0;
|
391
|
+
return false;
|
392
|
+
}
|
393
|
+
|
394
|
+
size_t size_increase = std::min(capacity - in_use, max_length);
|
395
|
+
|
396
|
+
// We need to update the length fields for all nodes, including the leaf node.
|
397
|
+
for (CordRep* rep = root; rep != dst; rep = rep->concat()->right) {
|
398
|
+
rep->length += size_increase;
|
399
|
+
}
|
400
|
+
dst->length += size_increase;
|
401
|
+
|
402
|
+
*region = dst->flat()->Data() + in_use;
|
403
|
+
*size = size_increase;
|
404
|
+
return true;
|
405
|
+
}
|
406
|
+
|
407
|
+
void Cord::InlineRep::GetAppendRegion(char** region, size_t* size,
|
408
|
+
size_t max_length) {
|
409
|
+
if (max_length == 0) {
|
410
|
+
*region = nullptr;
|
411
|
+
*size = 0;
|
412
|
+
return;
|
413
|
+
}
|
414
|
+
|
415
|
+
// Try to fit in the inline buffer if possible.
|
416
|
+
if (!is_tree()) {
|
417
|
+
size_t inline_length = inline_size();
|
418
|
+
if (max_length <= kMaxInline - inline_length) {
|
419
|
+
*region = data_.as_chars() + inline_length;
|
420
|
+
*size = max_length;
|
421
|
+
set_inline_size(inline_length + max_length);
|
422
|
+
return;
|
423
|
+
}
|
424
|
+
}
|
425
|
+
|
426
|
+
CordRep* root = force_tree(max_length);
|
427
|
+
|
428
|
+
if (PrepareAppendRegion(root, region, size, max_length)) {
|
429
|
+
return;
|
430
|
+
}
|
431
|
+
|
432
|
+
// Allocate new node.
|
433
|
+
CordRepFlat* new_node =
|
434
|
+
CordRepFlat::New(std::max(static_cast<size_t>(root->length), max_length));
|
435
|
+
new_node->length = std::min(new_node->Capacity(), max_length);
|
436
|
+
*region = new_node->Data();
|
437
|
+
*size = new_node->length;
|
438
|
+
|
439
|
+
if (cord_ring_enabled()) {
|
440
|
+
replace_tree(CordRepRing::Append(ForceRing(root, 1), new_node));
|
441
|
+
return;
|
442
|
+
}
|
443
|
+
replace_tree(Concat(root, new_node));
|
444
|
+
}
|
445
|
+
|
446
|
+
void Cord::InlineRep::GetAppendRegion(char** region, size_t* size) {
|
447
|
+
const size_t max_length = std::numeric_limits<size_t>::max();
|
448
|
+
|
449
|
+
// Try to fit in the inline buffer if possible.
|
450
|
+
if (!data_.is_tree()) {
|
451
|
+
size_t inline_length = inline_size();
|
452
|
+
if (inline_length < kMaxInline) {
|
453
|
+
*region = data_.as_chars() + inline_length;
|
454
|
+
*size = kMaxInline - inline_length;
|
455
|
+
set_inline_size(kMaxInline);
|
456
|
+
return;
|
457
|
+
}
|
458
|
+
}
|
459
|
+
|
460
|
+
CordRep* root = force_tree(max_length);
|
461
|
+
|
462
|
+
if (PrepareAppendRegion(root, region, size, max_length)) {
|
463
|
+
return;
|
464
|
+
}
|
465
|
+
|
466
|
+
// Allocate new node.
|
467
|
+
CordRepFlat* new_node = CordRepFlat::New(root->length);
|
468
|
+
new_node->length = new_node->Capacity();
|
469
|
+
*region = new_node->Data();
|
470
|
+
*size = new_node->length;
|
471
|
+
|
472
|
+
if (cord_ring_enabled()) {
|
473
|
+
replace_tree(CordRepRing::Append(ForceRing(root, 1), new_node));
|
474
|
+
return;
|
475
|
+
}
|
476
|
+
replace_tree(Concat(root, new_node));
|
477
|
+
}
|
478
|
+
|
479
|
+
// If the rep is a leaf, this will increment the value at total_mem_usage and
|
480
|
+
// will return true.
|
481
|
+
static bool RepMemoryUsageLeaf(const CordRep* rep, size_t* total_mem_usage) {
|
482
|
+
if (rep->tag >= FLAT) {
|
483
|
+
*total_mem_usage += rep->flat()->AllocatedSize();
|
484
|
+
return true;
|
485
|
+
}
|
486
|
+
if (rep->tag == EXTERNAL) {
|
487
|
+
*total_mem_usage += sizeof(CordRepConcat) + rep->length;
|
488
|
+
return true;
|
489
|
+
}
|
490
|
+
return false;
|
491
|
+
}
|
492
|
+
|
493
|
+
void Cord::InlineRep::AssignSlow(const Cord::InlineRep& src) {
|
494
|
+
ClearSlow();
|
495
|
+
|
496
|
+
data_ = src.data_;
|
497
|
+
if (is_tree()) {
|
498
|
+
data_.set_profiled(false);
|
499
|
+
CordRep::Ref(tree());
|
500
|
+
clear_cordz_info();
|
501
|
+
}
|
502
|
+
}
|
503
|
+
|
504
|
+
void Cord::InlineRep::ClearSlow() {
|
505
|
+
if (is_tree()) {
|
506
|
+
CordRep::Unref(tree());
|
507
|
+
}
|
508
|
+
ResetToEmpty();
|
509
|
+
}
|
510
|
+
|
511
|
+
// --------------------------------------------------------------------
|
512
|
+
// Constructors and destructors
|
513
|
+
|
514
|
+
Cord::Cord(absl::string_view src) {
|
515
|
+
const size_t n = src.size();
|
516
|
+
if (n <= InlineRep::kMaxInline) {
|
517
|
+
contents_.set_data(src.data(), n, false);
|
518
|
+
} else {
|
519
|
+
contents_.set_tree(NewTree(src.data(), n, 0));
|
520
|
+
}
|
521
|
+
}
|
522
|
+
|
523
|
+
template <typename T, Cord::EnableIfString<T>>
|
524
|
+
Cord::Cord(T&& src) {
|
525
|
+
if (
|
526
|
+
// String is short: copy data to avoid external block overhead.
|
527
|
+
src.size() <= kMaxBytesToCopy ||
|
528
|
+
// String is wasteful: copy data to avoid pinning too much unused memory.
|
529
|
+
src.size() < src.capacity() / 2
|
530
|
+
) {
|
531
|
+
if (src.size() <= InlineRep::kMaxInline) {
|
532
|
+
contents_.set_data(src.data(), src.size(), false);
|
533
|
+
} else {
|
534
|
+
contents_.set_tree(NewTree(src.data(), src.size(), 0));
|
535
|
+
}
|
536
|
+
} else {
|
537
|
+
struct StringReleaser {
|
538
|
+
void operator()(absl::string_view /* data */) {}
|
539
|
+
std::string data;
|
540
|
+
};
|
541
|
+
const absl::string_view original_data = src;
|
542
|
+
auto* rep = static_cast<
|
543
|
+
::absl::cord_internal::CordRepExternalImpl<StringReleaser>*>(
|
544
|
+
absl::cord_internal::NewExternalRep(
|
545
|
+
original_data, StringReleaser{std::forward<T>(src)}));
|
546
|
+
// Moving src may have invalidated its data pointer, so adjust it.
|
547
|
+
rep->base = rep->template get<0>().data.data();
|
548
|
+
contents_.set_tree(rep);
|
549
|
+
}
|
550
|
+
}
|
551
|
+
|
552
|
+
template Cord::Cord(std::string&& src);
|
553
|
+
|
554
|
+
// The destruction code is separate so that the compiler can determine
|
555
|
+
// that it does not need to call the destructor on a moved-from Cord.
|
556
|
+
void Cord::DestroyCordSlow() {
|
557
|
+
if (CordRep* tree = contents_.tree()) {
|
558
|
+
CordRep::Unref(VerifyTree(tree));
|
559
|
+
}
|
560
|
+
}
|
561
|
+
|
562
|
+
// --------------------------------------------------------------------
|
563
|
+
// Mutators
|
564
|
+
|
565
|
+
void Cord::Clear() {
|
566
|
+
if (CordRep* tree = contents_.clear()) {
|
567
|
+
CordRep::Unref(tree);
|
568
|
+
}
|
569
|
+
}
|
570
|
+
|
571
|
+
Cord& Cord::operator=(absl::string_view src) {
|
572
|
+
|
573
|
+
const char* data = src.data();
|
574
|
+
size_t length = src.size();
|
575
|
+
CordRep* tree = contents_.tree();
|
576
|
+
if (length <= InlineRep::kMaxInline) {
|
577
|
+
// Embed into this->contents_
|
578
|
+
contents_.set_data(data, length, true);
|
579
|
+
if (tree) CordRep::Unref(tree);
|
580
|
+
return *this;
|
581
|
+
}
|
582
|
+
if (tree != nullptr && tree->tag >= FLAT &&
|
583
|
+
tree->flat()->Capacity() >= length &&
|
584
|
+
tree->refcount.IsOne()) {
|
585
|
+
// Copy in place if the existing FLAT node is reusable.
|
586
|
+
memmove(tree->flat()->Data(), data, length);
|
587
|
+
tree->length = length;
|
588
|
+
VerifyTree(tree);
|
589
|
+
return *this;
|
590
|
+
}
|
591
|
+
contents_.set_tree(NewTree(data, length, 0));
|
592
|
+
if (tree) CordRep::Unref(tree);
|
593
|
+
return *this;
|
594
|
+
}
|
595
|
+
|
596
|
+
template <typename T, Cord::EnableIfString<T>>
|
597
|
+
Cord& Cord::operator=(T&& src) {
|
598
|
+
if (src.size() <= kMaxBytesToCopy) {
|
599
|
+
*this = absl::string_view(src);
|
600
|
+
} else {
|
601
|
+
*this = Cord(std::forward<T>(src));
|
602
|
+
}
|
603
|
+
return *this;
|
604
|
+
}
|
605
|
+
|
606
|
+
template Cord& Cord::operator=(std::string&& src);
|
607
|
+
|
608
|
+
// TODO(sanjay): Move to Cord::InlineRep section of file. For now,
|
609
|
+
// we keep it here to make diffs easier.
|
610
|
+
void Cord::InlineRep::AppendArray(const char* src_data, size_t src_size) {
|
611
|
+
if (src_size == 0) return; // memcpy(_, nullptr, 0) is undefined.
|
612
|
+
|
613
|
+
size_t appended = 0;
|
614
|
+
CordRep* root = nullptr;
|
615
|
+
if (is_tree()) {
|
616
|
+
root = data_.as_tree();
|
617
|
+
char* region;
|
618
|
+
if (PrepareAppendRegion(root, ®ion, &appended, src_size)) {
|
619
|
+
memcpy(region, src_data, appended);
|
620
|
+
}
|
621
|
+
} else {
|
622
|
+
// Try to fit in the inline buffer if possible.
|
623
|
+
size_t inline_length = inline_size();
|
624
|
+
if (src_size <= kMaxInline - inline_length) {
|
625
|
+
// Append new data to embedded array
|
626
|
+
memcpy(data_.as_chars() + inline_length, src_data, src_size);
|
627
|
+
set_inline_size(inline_length + src_size);
|
628
|
+
return;
|
629
|
+
}
|
630
|
+
|
631
|
+
// It is possible that src_data == data_, but when we transition from an
|
632
|
+
// InlineRep to a tree we need to assign data_ = root via set_tree. To
|
633
|
+
// avoid corrupting the source data before we copy it, delay calling
|
634
|
+
// set_tree until after we've copied data.
|
635
|
+
// We are going from an inline size to beyond inline size. Make the new size
|
636
|
+
// either double the inlined size, or the added size + 10%.
|
637
|
+
const size_t size1 = inline_length * 2 + src_size;
|
638
|
+
const size_t size2 = inline_length + src_size / 10;
|
639
|
+
root = CordRepFlat::New(std::max<size_t>(size1, size2));
|
640
|
+
appended = std::min(
|
641
|
+
src_size, root->flat()->Capacity() - inline_length);
|
642
|
+
memcpy(root->flat()->Data(), data_.as_chars(), inline_length);
|
643
|
+
memcpy(root->flat()->Data() + inline_length, src_data, appended);
|
644
|
+
root->length = inline_length + appended;
|
645
|
+
set_tree(root);
|
646
|
+
}
|
647
|
+
|
648
|
+
src_data += appended;
|
649
|
+
src_size -= appended;
|
650
|
+
if (src_size == 0) {
|
651
|
+
return;
|
652
|
+
}
|
653
|
+
|
654
|
+
if (cord_ring_enabled()) {
|
655
|
+
absl::string_view data(src_data, src_size);
|
656
|
+
root = ForceRing(root, (data.size() - 1) / kMaxFlatLength + 1);
|
657
|
+
replace_tree(CordRepRing::Append(root->ring(), data));
|
658
|
+
return;
|
659
|
+
}
|
660
|
+
|
661
|
+
// Use new block(s) for any remaining bytes that were not handled above.
|
662
|
+
// Alloc extra memory only if the right child of the root of the new tree is
|
663
|
+
// going to be a FLAT node, which will permit further inplace appends.
|
664
|
+
size_t length = src_size;
|
665
|
+
if (src_size < kMaxFlatLength) {
|
666
|
+
// The new length is either
|
667
|
+
// - old size + 10%
|
668
|
+
// - old_size + src_size
|
669
|
+
// This will cause a reasonable conservative step-up in size that is still
|
670
|
+
// large enough to avoid excessive amounts of small fragments being added.
|
671
|
+
length = std::max<size_t>(root->length / 10, src_size);
|
672
|
+
}
|
673
|
+
set_tree(Concat(root, NewTree(src_data, src_size, length - src_size)));
|
674
|
+
}
|
675
|
+
|
676
|
+
inline CordRep* Cord::TakeRep() const& {
|
677
|
+
return CordRep::Ref(contents_.tree());
|
678
|
+
}
|
679
|
+
|
680
|
+
inline CordRep* Cord::TakeRep() && {
|
681
|
+
CordRep* rep = contents_.tree();
|
682
|
+
contents_.clear();
|
683
|
+
return rep;
|
684
|
+
}
|
685
|
+
|
686
|
+
template <typename C>
|
687
|
+
inline void Cord::AppendImpl(C&& src) {
|
688
|
+
if (empty()) {
|
689
|
+
// In case of an empty destination avoid allocating a new node, do not copy
|
690
|
+
// data.
|
691
|
+
*this = std::forward<C>(src);
|
692
|
+
return;
|
693
|
+
}
|
694
|
+
|
695
|
+
// For short cords, it is faster to copy data if there is room in dst.
|
696
|
+
const size_t src_size = src.contents_.size();
|
697
|
+
if (src_size <= kMaxBytesToCopy) {
|
698
|
+
CordRep* src_tree = src.contents_.tree();
|
699
|
+
if (src_tree == nullptr) {
|
700
|
+
// src has embedded data.
|
701
|
+
contents_.AppendArray(src.contents_.data(), src_size);
|
702
|
+
return;
|
703
|
+
}
|
704
|
+
if (src_tree->tag >= FLAT) {
|
705
|
+
// src tree just has one flat node.
|
706
|
+
contents_.AppendArray(src_tree->flat()->Data(), src_size);
|
707
|
+
return;
|
708
|
+
}
|
709
|
+
if (&src == this) {
|
710
|
+
// ChunkIterator below assumes that src is not modified during traversal.
|
711
|
+
Append(Cord(src));
|
712
|
+
return;
|
713
|
+
}
|
714
|
+
// TODO(mec): Should we only do this if "dst" has space?
|
715
|
+
for (absl::string_view chunk : src.Chunks()) {
|
716
|
+
Append(chunk);
|
717
|
+
}
|
718
|
+
return;
|
719
|
+
}
|
720
|
+
|
721
|
+
// Guaranteed to be a tree (kMaxBytesToCopy > kInlinedSize)
|
722
|
+
contents_.AppendTree(std::forward<C>(src).TakeRep());
|
723
|
+
}
|
724
|
+
|
725
|
+
void Cord::Append(const Cord& src) { AppendImpl(src); }
|
726
|
+
|
727
|
+
void Cord::Append(Cord&& src) { AppendImpl(std::move(src)); }
|
728
|
+
|
729
|
+
template <typename T, Cord::EnableIfString<T>>
|
730
|
+
void Cord::Append(T&& src) {
|
731
|
+
if (src.size() <= kMaxBytesToCopy) {
|
732
|
+
Append(absl::string_view(src));
|
733
|
+
} else {
|
734
|
+
Append(Cord(std::forward<T>(src)));
|
735
|
+
}
|
736
|
+
}
|
737
|
+
|
738
|
+
template void Cord::Append(std::string&& src);
|
739
|
+
|
740
|
+
void Cord::Prepend(const Cord& src) {
|
741
|
+
CordRep* src_tree = src.contents_.tree();
|
742
|
+
if (src_tree != nullptr) {
|
743
|
+
CordRep::Ref(src_tree);
|
744
|
+
contents_.PrependTree(src_tree);
|
745
|
+
return;
|
746
|
+
}
|
747
|
+
|
748
|
+
// `src` cord is inlined.
|
749
|
+
absl::string_view src_contents(src.contents_.data(), src.contents_.size());
|
750
|
+
return Prepend(src_contents);
|
751
|
+
}
|
752
|
+
|
753
|
+
void Cord::Prepend(absl::string_view src) {
|
754
|
+
if (src.empty()) return; // memcpy(_, nullptr, 0) is undefined.
|
755
|
+
if (!contents_.is_tree()) {
|
756
|
+
size_t cur_size = contents_.inline_size();
|
757
|
+
if (cur_size + src.size() <= InlineRep::kMaxInline) {
|
758
|
+
// Use embedded storage.
|
759
|
+
char data[InlineRep::kMaxInline + 1] = {0};
|
760
|
+
memcpy(data, src.data(), src.size());
|
761
|
+
memcpy(data + src.size(), contents_.data(), cur_size);
|
762
|
+
memcpy(contents_.data_.as_chars(), data, InlineRep::kMaxInline + 1);
|
763
|
+
contents_.set_inline_size(cur_size + src.size());
|
764
|
+
return;
|
765
|
+
}
|
766
|
+
}
|
767
|
+
contents_.PrependTree(NewTree(src.data(), src.size(), 0));
|
768
|
+
}
|
769
|
+
|
770
|
+
template <typename T, Cord::EnableIfString<T>>
|
771
|
+
inline void Cord::Prepend(T&& src) {
|
772
|
+
if (src.size() <= kMaxBytesToCopy) {
|
773
|
+
Prepend(absl::string_view(src));
|
774
|
+
} else {
|
775
|
+
Prepend(Cord(std::forward<T>(src)));
|
776
|
+
}
|
777
|
+
}
|
778
|
+
|
779
|
+
template void Cord::Prepend(std::string&& src);
|
780
|
+
|
781
|
+
static CordRep* RemovePrefixFrom(CordRep* node, size_t n) {
|
782
|
+
if (n >= node->length) return nullptr;
|
783
|
+
if (n == 0) return CordRep::Ref(node);
|
784
|
+
absl::InlinedVector<CordRep*, kInlinedVectorSize> rhs_stack;
|
785
|
+
|
786
|
+
while (node->tag == CONCAT) {
|
787
|
+
assert(n <= node->length);
|
788
|
+
if (n < node->concat()->left->length) {
|
789
|
+
// Push right to stack, descend left.
|
790
|
+
rhs_stack.push_back(node->concat()->right);
|
791
|
+
node = node->concat()->left;
|
792
|
+
} else {
|
793
|
+
// Drop left, descend right.
|
794
|
+
n -= node->concat()->left->length;
|
795
|
+
node = node->concat()->right;
|
796
|
+
}
|
797
|
+
}
|
798
|
+
assert(n <= node->length);
|
799
|
+
|
800
|
+
if (n == 0) {
|
801
|
+
CordRep::Ref(node);
|
802
|
+
} else {
|
803
|
+
size_t start = n;
|
804
|
+
size_t len = node->length - n;
|
805
|
+
if (node->tag == SUBSTRING) {
|
806
|
+
// Consider in-place update of node, similar to in RemoveSuffixFrom().
|
807
|
+
start += node->substring()->start;
|
808
|
+
node = node->substring()->child;
|
809
|
+
}
|
810
|
+
node = NewSubstring(CordRep::Ref(node), start, len);
|
811
|
+
}
|
812
|
+
while (!rhs_stack.empty()) {
|
813
|
+
node = Concat(node, CordRep::Ref(rhs_stack.back()));
|
814
|
+
rhs_stack.pop_back();
|
815
|
+
}
|
816
|
+
return node;
|
817
|
+
}
|
818
|
+
|
819
|
+
// RemoveSuffixFrom() is very similar to RemovePrefixFrom(), with the
|
820
|
+
// exception that removing a suffix has an optimization where a node may be
|
821
|
+
// edited in place iff that node and all its ancestors have a refcount of 1.
|
822
|
+
static CordRep* RemoveSuffixFrom(CordRep* node, size_t n) {
|
823
|
+
if (n >= node->length) return nullptr;
|
824
|
+
if (n == 0) return CordRep::Ref(node);
|
825
|
+
absl::InlinedVector<CordRep*, kInlinedVectorSize> lhs_stack;
|
826
|
+
bool inplace_ok = node->refcount.IsOne();
|
827
|
+
|
828
|
+
while (node->tag == CONCAT) {
|
829
|
+
assert(n <= node->length);
|
830
|
+
if (n < node->concat()->right->length) {
|
831
|
+
// Push left to stack, descend right.
|
832
|
+
lhs_stack.push_back(node->concat()->left);
|
833
|
+
node = node->concat()->right;
|
834
|
+
} else {
|
835
|
+
// Drop right, descend left.
|
836
|
+
n -= node->concat()->right->length;
|
837
|
+
node = node->concat()->left;
|
838
|
+
}
|
839
|
+
inplace_ok = inplace_ok && node->refcount.IsOne();
|
840
|
+
}
|
841
|
+
assert(n <= node->length);
|
842
|
+
|
843
|
+
if (n == 0) {
|
844
|
+
CordRep::Ref(node);
|
845
|
+
} else if (inplace_ok && node->tag != EXTERNAL) {
|
846
|
+
// Consider making a new buffer if the current node capacity is much
|
847
|
+
// larger than the new length.
|
848
|
+
CordRep::Ref(node);
|
849
|
+
node->length -= n;
|
850
|
+
} else {
|
851
|
+
size_t start = 0;
|
852
|
+
size_t len = node->length - n;
|
853
|
+
if (node->tag == SUBSTRING) {
|
854
|
+
start = node->substring()->start;
|
855
|
+
node = node->substring()->child;
|
856
|
+
}
|
857
|
+
node = NewSubstring(CordRep::Ref(node), start, len);
|
858
|
+
}
|
859
|
+
while (!lhs_stack.empty()) {
|
860
|
+
node = Concat(CordRep::Ref(lhs_stack.back()), node);
|
861
|
+
lhs_stack.pop_back();
|
862
|
+
}
|
863
|
+
return node;
|
864
|
+
}
|
865
|
+
|
866
|
+
void Cord::RemovePrefix(size_t n) {
|
867
|
+
ABSL_INTERNAL_CHECK(n <= size(),
|
868
|
+
absl::StrCat("Requested prefix size ", n,
|
869
|
+
" exceeds Cord's size ", size()));
|
870
|
+
CordRep* tree = contents_.tree();
|
871
|
+
if (tree == nullptr) {
|
872
|
+
contents_.remove_prefix(n);
|
873
|
+
} else if (tree->tag == RING) {
|
874
|
+
contents_.replace_tree(CordRepRing::RemovePrefix(tree->ring(), n));
|
875
|
+
} else {
|
876
|
+
CordRep* newrep = RemovePrefixFrom(tree, n);
|
877
|
+
CordRep::Unref(tree);
|
878
|
+
contents_.replace_tree(VerifyTree(newrep));
|
879
|
+
}
|
880
|
+
}
|
881
|
+
|
882
|
+
void Cord::RemoveSuffix(size_t n) {
|
883
|
+
ABSL_INTERNAL_CHECK(n <= size(),
|
884
|
+
absl::StrCat("Requested suffix size ", n,
|
885
|
+
" exceeds Cord's size ", size()));
|
886
|
+
CordRep* tree = contents_.tree();
|
887
|
+
if (tree == nullptr) {
|
888
|
+
contents_.reduce_size(n);
|
889
|
+
} else if (tree->tag == RING) {
|
890
|
+
contents_.replace_tree(CordRepRing::RemoveSuffix(tree->ring(), n));
|
891
|
+
} else {
|
892
|
+
CordRep* newrep = RemoveSuffixFrom(tree, n);
|
893
|
+
CordRep::Unref(tree);
|
894
|
+
contents_.replace_tree(VerifyTree(newrep));
|
895
|
+
}
|
896
|
+
}
|
897
|
+
|
898
|
+
// Work item for NewSubRange().
|
899
|
+
struct SubRange {
|
900
|
+
SubRange(CordRep* a_node, size_t a_pos, size_t a_n)
|
901
|
+
: node(a_node), pos(a_pos), n(a_n) {}
|
902
|
+
CordRep* node; // nullptr means concat last 2 results.
|
903
|
+
size_t pos;
|
904
|
+
size_t n;
|
905
|
+
};
|
906
|
+
|
907
|
+
static CordRep* NewSubRange(CordRep* node, size_t pos, size_t n) {
|
908
|
+
absl::InlinedVector<CordRep*, kInlinedVectorSize> results;
|
909
|
+
absl::InlinedVector<SubRange, kInlinedVectorSize> todo;
|
910
|
+
todo.push_back(SubRange(node, pos, n));
|
911
|
+
do {
|
912
|
+
const SubRange& sr = todo.back();
|
913
|
+
node = sr.node;
|
914
|
+
pos = sr.pos;
|
915
|
+
n = sr.n;
|
916
|
+
todo.pop_back();
|
917
|
+
|
918
|
+
if (node == nullptr) {
|
919
|
+
assert(results.size() >= 2);
|
920
|
+
CordRep* right = results.back();
|
921
|
+
results.pop_back();
|
922
|
+
CordRep* left = results.back();
|
923
|
+
results.pop_back();
|
924
|
+
results.push_back(Concat(left, right));
|
925
|
+
} else if (pos == 0 && n == node->length) {
|
926
|
+
results.push_back(CordRep::Ref(node));
|
927
|
+
} else if (node->tag != CONCAT) {
|
928
|
+
if (node->tag == SUBSTRING) {
|
929
|
+
pos += node->substring()->start;
|
930
|
+
node = node->substring()->child;
|
931
|
+
}
|
932
|
+
results.push_back(NewSubstring(CordRep::Ref(node), pos, n));
|
933
|
+
} else if (pos + n <= node->concat()->left->length) {
|
934
|
+
todo.push_back(SubRange(node->concat()->left, pos, n));
|
935
|
+
} else if (pos >= node->concat()->left->length) {
|
936
|
+
pos -= node->concat()->left->length;
|
937
|
+
todo.push_back(SubRange(node->concat()->right, pos, n));
|
938
|
+
} else {
|
939
|
+
size_t left_n = node->concat()->left->length - pos;
|
940
|
+
todo.push_back(SubRange(nullptr, 0, 0)); // Concat()
|
941
|
+
todo.push_back(SubRange(node->concat()->right, 0, n - left_n));
|
942
|
+
todo.push_back(SubRange(node->concat()->left, pos, left_n));
|
943
|
+
}
|
944
|
+
} while (!todo.empty());
|
945
|
+
assert(results.size() == 1);
|
946
|
+
return results[0];
|
947
|
+
}
|
948
|
+
|
949
|
+
Cord Cord::Subcord(size_t pos, size_t new_size) const {
|
950
|
+
Cord sub_cord;
|
951
|
+
size_t length = size();
|
952
|
+
if (pos > length) pos = length;
|
953
|
+
if (new_size > length - pos) new_size = length - pos;
|
954
|
+
CordRep* tree = contents_.tree();
|
955
|
+
if (tree == nullptr) {
|
956
|
+
// sub_cord is newly constructed, no need to re-zero-out the tail of
|
957
|
+
// contents_ memory.
|
958
|
+
sub_cord.contents_.set_data(contents_.data() + pos, new_size, false);
|
959
|
+
} else if (new_size == 0) {
|
960
|
+
// We want to return empty subcord, so nothing to do.
|
961
|
+
} else if (new_size <= InlineRep::kMaxInline) {
|
962
|
+
Cord::ChunkIterator it = chunk_begin();
|
963
|
+
it.AdvanceBytes(pos);
|
964
|
+
char* dest = sub_cord.contents_.data_.as_chars();
|
965
|
+
size_t remaining_size = new_size;
|
966
|
+
while (remaining_size > it->size()) {
|
967
|
+
cord_internal::SmallMemmove(dest, it->data(), it->size());
|
968
|
+
remaining_size -= it->size();
|
969
|
+
dest += it->size();
|
970
|
+
++it;
|
971
|
+
}
|
972
|
+
cord_internal::SmallMemmove(dest, it->data(), remaining_size);
|
973
|
+
sub_cord.contents_.set_inline_size(new_size);
|
974
|
+
} else if (tree->tag == RING) {
|
975
|
+
tree = CordRepRing::SubRing(CordRep::Ref(tree)->ring(), pos, new_size);
|
976
|
+
sub_cord.contents_.set_tree(tree);
|
977
|
+
} else {
|
978
|
+
sub_cord.contents_.set_tree(NewSubRange(tree, pos, new_size));
|
979
|
+
}
|
980
|
+
return sub_cord;
|
981
|
+
}
|
982
|
+
|
983
|
+
// --------------------------------------------------------------------
|
984
|
+
// Balancing
|
985
|
+
|
986
|
+
class CordForest {
|
987
|
+
public:
|
988
|
+
explicit CordForest(size_t length)
|
989
|
+
: root_length_(length), trees_(kMinLengthSize, nullptr) {}
|
990
|
+
|
991
|
+
void Build(CordRep* cord_root) {
|
992
|
+
std::vector<CordRep*> pending = {cord_root};
|
993
|
+
|
994
|
+
while (!pending.empty()) {
|
995
|
+
CordRep* node = pending.back();
|
996
|
+
pending.pop_back();
|
997
|
+
CheckNode(node);
|
998
|
+
if (ABSL_PREDICT_FALSE(node->tag != CONCAT)) {
|
999
|
+
AddNode(node);
|
1000
|
+
continue;
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
CordRepConcat* concat_node = node->concat();
|
1004
|
+
if (concat_node->depth() >= kMinLengthSize ||
|
1005
|
+
concat_node->length < min_length[concat_node->depth()]) {
|
1006
|
+
pending.push_back(concat_node->right);
|
1007
|
+
pending.push_back(concat_node->left);
|
1008
|
+
|
1009
|
+
if (concat_node->refcount.IsOne()) {
|
1010
|
+
concat_node->left = concat_freelist_;
|
1011
|
+
concat_freelist_ = concat_node;
|
1012
|
+
} else {
|
1013
|
+
CordRep::Ref(concat_node->right);
|
1014
|
+
CordRep::Ref(concat_node->left);
|
1015
|
+
CordRep::Unref(concat_node);
|
1016
|
+
}
|
1017
|
+
} else {
|
1018
|
+
AddNode(node);
|
1019
|
+
}
|
1020
|
+
}
|
1021
|
+
}
|
1022
|
+
|
1023
|
+
CordRep* ConcatNodes() {
|
1024
|
+
CordRep* sum = nullptr;
|
1025
|
+
for (auto* node : trees_) {
|
1026
|
+
if (node == nullptr) continue;
|
1027
|
+
|
1028
|
+
sum = PrependNode(node, sum);
|
1029
|
+
root_length_ -= node->length;
|
1030
|
+
if (root_length_ == 0) break;
|
1031
|
+
}
|
1032
|
+
ABSL_INTERNAL_CHECK(sum != nullptr, "Failed to locate sum node");
|
1033
|
+
return VerifyTree(sum);
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
private:
|
1037
|
+
CordRep* AppendNode(CordRep* node, CordRep* sum) {
|
1038
|
+
return (sum == nullptr) ? node : MakeConcat(sum, node);
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
CordRep* PrependNode(CordRep* node, CordRep* sum) {
|
1042
|
+
return (sum == nullptr) ? node : MakeConcat(node, sum);
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
void AddNode(CordRep* node) {
|
1046
|
+
CordRep* sum = nullptr;
|
1047
|
+
|
1048
|
+
// Collect together everything with which we will merge with node
|
1049
|
+
int i = 0;
|
1050
|
+
for (; node->length > min_length[i + 1]; ++i) {
|
1051
|
+
auto& tree_at_i = trees_[i];
|
1052
|
+
|
1053
|
+
if (tree_at_i == nullptr) continue;
|
1054
|
+
sum = PrependNode(tree_at_i, sum);
|
1055
|
+
tree_at_i = nullptr;
|
1056
|
+
}
|
1057
|
+
|
1058
|
+
sum = AppendNode(node, sum);
|
1059
|
+
|
1060
|
+
// Insert sum into appropriate place in the forest
|
1061
|
+
for (; sum->length >= min_length[i]; ++i) {
|
1062
|
+
auto& tree_at_i = trees_[i];
|
1063
|
+
if (tree_at_i == nullptr) continue;
|
1064
|
+
|
1065
|
+
sum = MakeConcat(tree_at_i, sum);
|
1066
|
+
tree_at_i = nullptr;
|
1067
|
+
}
|
1068
|
+
|
1069
|
+
// min_length[0] == 1, which means sum->length >= min_length[0]
|
1070
|
+
assert(i > 0);
|
1071
|
+
trees_[i - 1] = sum;
|
1072
|
+
}
|
1073
|
+
|
1074
|
+
// Make concat node trying to resue existing CordRepConcat nodes we
|
1075
|
+
// already collected in the concat_freelist_.
|
1076
|
+
CordRep* MakeConcat(CordRep* left, CordRep* right) {
|
1077
|
+
if (concat_freelist_ == nullptr) return RawConcat(left, right);
|
1078
|
+
|
1079
|
+
CordRepConcat* rep = concat_freelist_;
|
1080
|
+
if (concat_freelist_->left == nullptr) {
|
1081
|
+
concat_freelist_ = nullptr;
|
1082
|
+
} else {
|
1083
|
+
concat_freelist_ = concat_freelist_->left->concat();
|
1084
|
+
}
|
1085
|
+
SetConcatChildren(rep, left, right);
|
1086
|
+
|
1087
|
+
return rep;
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
static void CheckNode(CordRep* node) {
|
1091
|
+
ABSL_INTERNAL_CHECK(node->length != 0u, "");
|
1092
|
+
if (node->tag == CONCAT) {
|
1093
|
+
ABSL_INTERNAL_CHECK(node->concat()->left != nullptr, "");
|
1094
|
+
ABSL_INTERNAL_CHECK(node->concat()->right != nullptr, "");
|
1095
|
+
ABSL_INTERNAL_CHECK(node->length == (node->concat()->left->length +
|
1096
|
+
node->concat()->right->length),
|
1097
|
+
"");
|
1098
|
+
}
|
1099
|
+
}
|
1100
|
+
|
1101
|
+
size_t root_length_;
|
1102
|
+
|
1103
|
+
// use an inlined vector instead of a flat array to get bounds checking
|
1104
|
+
absl::InlinedVector<CordRep*, kInlinedVectorSize> trees_;
|
1105
|
+
|
1106
|
+
// List of concat nodes we can re-use for Cord balancing.
|
1107
|
+
CordRepConcat* concat_freelist_ = nullptr;
|
1108
|
+
};
|
1109
|
+
|
1110
|
+
static CordRep* Rebalance(CordRep* node) {
|
1111
|
+
VerifyTree(node);
|
1112
|
+
assert(node->tag == CONCAT);
|
1113
|
+
|
1114
|
+
if (node->length == 0) {
|
1115
|
+
return nullptr;
|
1116
|
+
}
|
1117
|
+
|
1118
|
+
CordForest forest(node->length);
|
1119
|
+
forest.Build(node);
|
1120
|
+
return forest.ConcatNodes();
|
1121
|
+
}
|
1122
|
+
|
1123
|
+
// --------------------------------------------------------------------
|
1124
|
+
// Comparators
|
1125
|
+
|
1126
|
+
namespace {
|
1127
|
+
|
1128
|
+
int ClampResult(int memcmp_res) {
|
1129
|
+
return static_cast<int>(memcmp_res > 0) - static_cast<int>(memcmp_res < 0);
|
1130
|
+
}
|
1131
|
+
|
1132
|
+
int CompareChunks(absl::string_view* lhs, absl::string_view* rhs,
|
1133
|
+
size_t* size_to_compare) {
|
1134
|
+
size_t compared_size = std::min(lhs->size(), rhs->size());
|
1135
|
+
assert(*size_to_compare >= compared_size);
|
1136
|
+
*size_to_compare -= compared_size;
|
1137
|
+
|
1138
|
+
int memcmp_res = ::memcmp(lhs->data(), rhs->data(), compared_size);
|
1139
|
+
if (memcmp_res != 0) return memcmp_res;
|
1140
|
+
|
1141
|
+
lhs->remove_prefix(compared_size);
|
1142
|
+
rhs->remove_prefix(compared_size);
|
1143
|
+
|
1144
|
+
return 0;
|
1145
|
+
}
|
1146
|
+
|
1147
|
+
// This overload set computes comparison results from memcmp result. This
|
1148
|
+
// interface is used inside GenericCompare below. Differet implementations
|
1149
|
+
// are specialized for int and bool. For int we clamp result to {-1, 0, 1}
|
1150
|
+
// set. For bool we just interested in "value == 0".
|
1151
|
+
template <typename ResultType>
|
1152
|
+
ResultType ComputeCompareResult(int memcmp_res) {
|
1153
|
+
return ClampResult(memcmp_res);
|
1154
|
+
}
|
1155
|
+
template <>
|
1156
|
+
bool ComputeCompareResult<bool>(int memcmp_res) {
|
1157
|
+
return memcmp_res == 0;
|
1158
|
+
}
|
1159
|
+
|
1160
|
+
} // namespace
|
1161
|
+
|
1162
|
+
// Helper routine. Locates the first flat chunk of the Cord without
|
1163
|
+
// initializing the iterator.
|
1164
|
+
inline absl::string_view Cord::InlineRep::FindFlatStartPiece() const {
|
1165
|
+
if (!is_tree()) {
|
1166
|
+
return absl::string_view(data_.as_chars(), data_.inline_size());
|
1167
|
+
}
|
1168
|
+
|
1169
|
+
CordRep* node = tree();
|
1170
|
+
if (node->tag >= FLAT) {
|
1171
|
+
return absl::string_view(node->flat()->Data(), node->length);
|
1172
|
+
}
|
1173
|
+
|
1174
|
+
if (node->tag == EXTERNAL) {
|
1175
|
+
return absl::string_view(node->external()->base, node->length);
|
1176
|
+
}
|
1177
|
+
|
1178
|
+
if (node->tag == RING) {
|
1179
|
+
return node->ring()->entry_data(node->ring()->head());
|
1180
|
+
}
|
1181
|
+
|
1182
|
+
// Walk down the left branches until we hit a non-CONCAT node.
|
1183
|
+
while (node->tag == CONCAT) {
|
1184
|
+
node = node->concat()->left;
|
1185
|
+
}
|
1186
|
+
|
1187
|
+
// Get the child node if we encounter a SUBSTRING.
|
1188
|
+
size_t offset = 0;
|
1189
|
+
size_t length = node->length;
|
1190
|
+
assert(length != 0);
|
1191
|
+
|
1192
|
+
if (node->tag == SUBSTRING) {
|
1193
|
+
offset = node->substring()->start;
|
1194
|
+
node = node->substring()->child;
|
1195
|
+
}
|
1196
|
+
|
1197
|
+
if (node->tag >= FLAT) {
|
1198
|
+
return absl::string_view(node->flat()->Data() + offset, length);
|
1199
|
+
}
|
1200
|
+
|
1201
|
+
assert((node->tag == EXTERNAL) && "Expect FLAT or EXTERNAL node here");
|
1202
|
+
|
1203
|
+
return absl::string_view(node->external()->base + offset, length);
|
1204
|
+
}
|
1205
|
+
|
1206
|
+
inline int Cord::CompareSlowPath(absl::string_view rhs, size_t compared_size,
|
1207
|
+
size_t size_to_compare) const {
|
1208
|
+
auto advance = [](Cord::ChunkIterator* it, absl::string_view* chunk) {
|
1209
|
+
if (!chunk->empty()) return true;
|
1210
|
+
++*it;
|
1211
|
+
if (it->bytes_remaining_ == 0) return false;
|
1212
|
+
*chunk = **it;
|
1213
|
+
return true;
|
1214
|
+
};
|
1215
|
+
|
1216
|
+
Cord::ChunkIterator lhs_it = chunk_begin();
|
1217
|
+
|
1218
|
+
// compared_size is inside first chunk.
|
1219
|
+
absl::string_view lhs_chunk =
|
1220
|
+
(lhs_it.bytes_remaining_ != 0) ? *lhs_it : absl::string_view();
|
1221
|
+
assert(compared_size <= lhs_chunk.size());
|
1222
|
+
assert(compared_size <= rhs.size());
|
1223
|
+
lhs_chunk.remove_prefix(compared_size);
|
1224
|
+
rhs.remove_prefix(compared_size);
|
1225
|
+
size_to_compare -= compared_size; // skip already compared size.
|
1226
|
+
|
1227
|
+
while (advance(&lhs_it, &lhs_chunk) && !rhs.empty()) {
|
1228
|
+
int comparison_result = CompareChunks(&lhs_chunk, &rhs, &size_to_compare);
|
1229
|
+
if (comparison_result != 0) return comparison_result;
|
1230
|
+
if (size_to_compare == 0) return 0;
|
1231
|
+
}
|
1232
|
+
|
1233
|
+
return static_cast<int>(rhs.empty()) - static_cast<int>(lhs_chunk.empty());
|
1234
|
+
}
|
1235
|
+
|
1236
|
+
inline int Cord::CompareSlowPath(const Cord& rhs, size_t compared_size,
|
1237
|
+
size_t size_to_compare) const {
|
1238
|
+
auto advance = [](Cord::ChunkIterator* it, absl::string_view* chunk) {
|
1239
|
+
if (!chunk->empty()) return true;
|
1240
|
+
++*it;
|
1241
|
+
if (it->bytes_remaining_ == 0) return false;
|
1242
|
+
*chunk = **it;
|
1243
|
+
return true;
|
1244
|
+
};
|
1245
|
+
|
1246
|
+
Cord::ChunkIterator lhs_it = chunk_begin();
|
1247
|
+
Cord::ChunkIterator rhs_it = rhs.chunk_begin();
|
1248
|
+
|
1249
|
+
// compared_size is inside both first chunks.
|
1250
|
+
absl::string_view lhs_chunk =
|
1251
|
+
(lhs_it.bytes_remaining_ != 0) ? *lhs_it : absl::string_view();
|
1252
|
+
absl::string_view rhs_chunk =
|
1253
|
+
(rhs_it.bytes_remaining_ != 0) ? *rhs_it : absl::string_view();
|
1254
|
+
assert(compared_size <= lhs_chunk.size());
|
1255
|
+
assert(compared_size <= rhs_chunk.size());
|
1256
|
+
lhs_chunk.remove_prefix(compared_size);
|
1257
|
+
rhs_chunk.remove_prefix(compared_size);
|
1258
|
+
size_to_compare -= compared_size; // skip already compared size.
|
1259
|
+
|
1260
|
+
while (advance(&lhs_it, &lhs_chunk) && advance(&rhs_it, &rhs_chunk)) {
|
1261
|
+
int memcmp_res = CompareChunks(&lhs_chunk, &rhs_chunk, &size_to_compare);
|
1262
|
+
if (memcmp_res != 0) return memcmp_res;
|
1263
|
+
if (size_to_compare == 0) return 0;
|
1264
|
+
}
|
1265
|
+
|
1266
|
+
return static_cast<int>(rhs_chunk.empty()) -
|
1267
|
+
static_cast<int>(lhs_chunk.empty());
|
1268
|
+
}
|
1269
|
+
|
1270
|
+
inline absl::string_view Cord::GetFirstChunk(const Cord& c) {
|
1271
|
+
return c.contents_.FindFlatStartPiece();
|
1272
|
+
}
|
1273
|
+
inline absl::string_view Cord::GetFirstChunk(absl::string_view sv) {
|
1274
|
+
return sv;
|
1275
|
+
}
|
1276
|
+
|
1277
|
+
// Compares up to 'size_to_compare' bytes of 'lhs' with 'rhs'. It is assumed
|
1278
|
+
// that 'size_to_compare' is greater that size of smallest of first chunks.
|
1279
|
+
template <typename ResultType, typename RHS>
|
1280
|
+
ResultType GenericCompare(const Cord& lhs, const RHS& rhs,
|
1281
|
+
size_t size_to_compare) {
|
1282
|
+
absl::string_view lhs_chunk = Cord::GetFirstChunk(lhs);
|
1283
|
+
absl::string_view rhs_chunk = Cord::GetFirstChunk(rhs);
|
1284
|
+
|
1285
|
+
size_t compared_size = std::min(lhs_chunk.size(), rhs_chunk.size());
|
1286
|
+
assert(size_to_compare >= compared_size);
|
1287
|
+
int memcmp_res = ::memcmp(lhs_chunk.data(), rhs_chunk.data(), compared_size);
|
1288
|
+
if (compared_size == size_to_compare || memcmp_res != 0) {
|
1289
|
+
return ComputeCompareResult<ResultType>(memcmp_res);
|
1290
|
+
}
|
1291
|
+
|
1292
|
+
return ComputeCompareResult<ResultType>(
|
1293
|
+
lhs.CompareSlowPath(rhs, compared_size, size_to_compare));
|
1294
|
+
}
|
1295
|
+
|
1296
|
+
bool Cord::EqualsImpl(absl::string_view rhs, size_t size_to_compare) const {
|
1297
|
+
return GenericCompare<bool>(*this, rhs, size_to_compare);
|
1298
|
+
}
|
1299
|
+
|
1300
|
+
bool Cord::EqualsImpl(const Cord& rhs, size_t size_to_compare) const {
|
1301
|
+
return GenericCompare<bool>(*this, rhs, size_to_compare);
|
1302
|
+
}
|
1303
|
+
|
1304
|
+
template <typename RHS>
|
1305
|
+
inline int SharedCompareImpl(const Cord& lhs, const RHS& rhs) {
|
1306
|
+
size_t lhs_size = lhs.size();
|
1307
|
+
size_t rhs_size = rhs.size();
|
1308
|
+
if (lhs_size == rhs_size) {
|
1309
|
+
return GenericCompare<int>(lhs, rhs, lhs_size);
|
1310
|
+
}
|
1311
|
+
if (lhs_size < rhs_size) {
|
1312
|
+
auto data_comp_res = GenericCompare<int>(lhs, rhs, lhs_size);
|
1313
|
+
return data_comp_res == 0 ? -1 : data_comp_res;
|
1314
|
+
}
|
1315
|
+
|
1316
|
+
auto data_comp_res = GenericCompare<int>(lhs, rhs, rhs_size);
|
1317
|
+
return data_comp_res == 0 ? +1 : data_comp_res;
|
1318
|
+
}
|
1319
|
+
|
1320
|
+
int Cord::Compare(absl::string_view rhs) const {
|
1321
|
+
return SharedCompareImpl(*this, rhs);
|
1322
|
+
}
|
1323
|
+
|
1324
|
+
int Cord::CompareImpl(const Cord& rhs) const {
|
1325
|
+
return SharedCompareImpl(*this, rhs);
|
1326
|
+
}
|
1327
|
+
|
1328
|
+
bool Cord::EndsWith(absl::string_view rhs) const {
|
1329
|
+
size_t my_size = size();
|
1330
|
+
size_t rhs_size = rhs.size();
|
1331
|
+
|
1332
|
+
if (my_size < rhs_size) return false;
|
1333
|
+
|
1334
|
+
Cord tmp(*this);
|
1335
|
+
tmp.RemovePrefix(my_size - rhs_size);
|
1336
|
+
return tmp.EqualsImpl(rhs, rhs_size);
|
1337
|
+
}
|
1338
|
+
|
1339
|
+
bool Cord::EndsWith(const Cord& rhs) const {
|
1340
|
+
size_t my_size = size();
|
1341
|
+
size_t rhs_size = rhs.size();
|
1342
|
+
|
1343
|
+
if (my_size < rhs_size) return false;
|
1344
|
+
|
1345
|
+
Cord tmp(*this);
|
1346
|
+
tmp.RemovePrefix(my_size - rhs_size);
|
1347
|
+
return tmp.EqualsImpl(rhs, rhs_size);
|
1348
|
+
}
|
1349
|
+
|
1350
|
+
// --------------------------------------------------------------------
|
1351
|
+
// Misc.
|
1352
|
+
|
1353
|
+
Cord::operator std::string() const {
|
1354
|
+
std::string s;
|
1355
|
+
absl::CopyCordToString(*this, &s);
|
1356
|
+
return s;
|
1357
|
+
}
|
1358
|
+
|
1359
|
+
void CopyCordToString(const Cord& src, std::string* dst) {
|
1360
|
+
if (!src.contents_.is_tree()) {
|
1361
|
+
src.contents_.CopyTo(dst);
|
1362
|
+
} else {
|
1363
|
+
absl::strings_internal::STLStringResizeUninitialized(dst, src.size());
|
1364
|
+
src.CopyToArraySlowPath(&(*dst)[0]);
|
1365
|
+
}
|
1366
|
+
}
|
1367
|
+
|
1368
|
+
void Cord::CopyToArraySlowPath(char* dst) const {
|
1369
|
+
assert(contents_.is_tree());
|
1370
|
+
absl::string_view fragment;
|
1371
|
+
if (GetFlatAux(contents_.tree(), &fragment)) {
|
1372
|
+
memcpy(dst, fragment.data(), fragment.size());
|
1373
|
+
return;
|
1374
|
+
}
|
1375
|
+
for (absl::string_view chunk : Chunks()) {
|
1376
|
+
memcpy(dst, chunk.data(), chunk.size());
|
1377
|
+
dst += chunk.size();
|
1378
|
+
}
|
1379
|
+
}
|
1380
|
+
|
1381
|
+
Cord::ChunkIterator& Cord::ChunkIterator::AdvanceStack() {
|
1382
|
+
auto& stack_of_right_children = stack_of_right_children_;
|
1383
|
+
if (stack_of_right_children.empty()) {
|
1384
|
+
assert(!current_chunk_.empty()); // Called on invalid iterator.
|
1385
|
+
// We have reached the end of the Cord.
|
1386
|
+
return *this;
|
1387
|
+
}
|
1388
|
+
|
1389
|
+
// Process the next node on the stack.
|
1390
|
+
CordRep* node = stack_of_right_children.back();
|
1391
|
+
stack_of_right_children.pop_back();
|
1392
|
+
|
1393
|
+
// Walk down the left branches until we hit a non-CONCAT node. Save the
|
1394
|
+
// right children to the stack for subsequent traversal.
|
1395
|
+
while (node->tag == CONCAT) {
|
1396
|
+
stack_of_right_children.push_back(node->concat()->right);
|
1397
|
+
node = node->concat()->left;
|
1398
|
+
}
|
1399
|
+
|
1400
|
+
// Get the child node if we encounter a SUBSTRING.
|
1401
|
+
size_t offset = 0;
|
1402
|
+
size_t length = node->length;
|
1403
|
+
if (node->tag == SUBSTRING) {
|
1404
|
+
offset = node->substring()->start;
|
1405
|
+
node = node->substring()->child;
|
1406
|
+
}
|
1407
|
+
|
1408
|
+
assert(node->tag == EXTERNAL || node->tag >= FLAT);
|
1409
|
+
assert(length != 0);
|
1410
|
+
const char* data =
|
1411
|
+
node->tag == EXTERNAL ? node->external()->base : node->flat()->Data();
|
1412
|
+
current_chunk_ = absl::string_view(data + offset, length);
|
1413
|
+
current_leaf_ = node;
|
1414
|
+
return *this;
|
1415
|
+
}
|
1416
|
+
|
1417
|
+
Cord Cord::ChunkIterator::AdvanceAndReadBytes(size_t n) {
|
1418
|
+
ABSL_HARDENING_ASSERT(bytes_remaining_ >= n &&
|
1419
|
+
"Attempted to iterate past `end()`");
|
1420
|
+
Cord subcord;
|
1421
|
+
|
1422
|
+
if (n <= InlineRep::kMaxInline) {
|
1423
|
+
// Range to read fits in inline data. Flatten it.
|
1424
|
+
char* data = subcord.contents_.set_data(n);
|
1425
|
+
while (n > current_chunk_.size()) {
|
1426
|
+
memcpy(data, current_chunk_.data(), current_chunk_.size());
|
1427
|
+
data += current_chunk_.size();
|
1428
|
+
n -= current_chunk_.size();
|
1429
|
+
++*this;
|
1430
|
+
}
|
1431
|
+
memcpy(data, current_chunk_.data(), n);
|
1432
|
+
if (n < current_chunk_.size()) {
|
1433
|
+
RemoveChunkPrefix(n);
|
1434
|
+
} else if (n > 0) {
|
1435
|
+
++*this;
|
1436
|
+
}
|
1437
|
+
return subcord;
|
1438
|
+
}
|
1439
|
+
|
1440
|
+
if (ring_reader_) {
|
1441
|
+
size_t chunk_size = current_chunk_.size();
|
1442
|
+
if (n <= chunk_size && n <= kMaxBytesToCopy) {
|
1443
|
+
subcord = Cord(current_chunk_.substr(0, n));
|
1444
|
+
} else {
|
1445
|
+
auto* ring = CordRep::Ref(ring_reader_.ring())->ring();
|
1446
|
+
size_t offset = ring_reader_.length() - bytes_remaining_;
|
1447
|
+
subcord.contents_.set_tree(CordRepRing::SubRing(ring, offset, n));
|
1448
|
+
}
|
1449
|
+
if (n < chunk_size) {
|
1450
|
+
bytes_remaining_ -= n;
|
1451
|
+
current_chunk_.remove_prefix(n);
|
1452
|
+
} else {
|
1453
|
+
AdvanceBytesRing(n);
|
1454
|
+
}
|
1455
|
+
return subcord;
|
1456
|
+
}
|
1457
|
+
|
1458
|
+
auto& stack_of_right_children = stack_of_right_children_;
|
1459
|
+
if (n < current_chunk_.size()) {
|
1460
|
+
// Range to read is a proper subrange of the current chunk.
|
1461
|
+
assert(current_leaf_ != nullptr);
|
1462
|
+
CordRep* subnode = CordRep::Ref(current_leaf_);
|
1463
|
+
const char* data = subnode->tag == EXTERNAL ? subnode->external()->base
|
1464
|
+
: subnode->flat()->Data();
|
1465
|
+
subnode = NewSubstring(subnode, current_chunk_.data() - data, n);
|
1466
|
+
subcord.contents_.set_tree(VerifyTree(subnode));
|
1467
|
+
RemoveChunkPrefix(n);
|
1468
|
+
return subcord;
|
1469
|
+
}
|
1470
|
+
|
1471
|
+
// Range to read begins with a proper subrange of the current chunk.
|
1472
|
+
assert(!current_chunk_.empty());
|
1473
|
+
assert(current_leaf_ != nullptr);
|
1474
|
+
CordRep* subnode = CordRep::Ref(current_leaf_);
|
1475
|
+
if (current_chunk_.size() < subnode->length) {
|
1476
|
+
const char* data = subnode->tag == EXTERNAL ? subnode->external()->base
|
1477
|
+
: subnode->flat()->Data();
|
1478
|
+
subnode = NewSubstring(subnode, current_chunk_.data() - data,
|
1479
|
+
current_chunk_.size());
|
1480
|
+
}
|
1481
|
+
n -= current_chunk_.size();
|
1482
|
+
bytes_remaining_ -= current_chunk_.size();
|
1483
|
+
|
1484
|
+
// Process the next node(s) on the stack, reading whole subtrees depending on
|
1485
|
+
// their length and how many bytes we are advancing.
|
1486
|
+
CordRep* node = nullptr;
|
1487
|
+
while (!stack_of_right_children.empty()) {
|
1488
|
+
node = stack_of_right_children.back();
|
1489
|
+
stack_of_right_children.pop_back();
|
1490
|
+
if (node->length > n) break;
|
1491
|
+
// TODO(qrczak): This might unnecessarily recreate existing concat nodes.
|
1492
|
+
// Avoiding that would need pretty complicated logic (instead of
|
1493
|
+
// current_leaf, keep current_subtree_ which points to the highest node
|
1494
|
+
// such that the current leaf can be found on the path of left children
|
1495
|
+
// starting from current_subtree_; delay creating subnode while node is
|
1496
|
+
// below current_subtree_; find the proper node along the path of left
|
1497
|
+
// children starting from current_subtree_ if this loop exits while staying
|
1498
|
+
// below current_subtree_; etc.; alternatively, push parents instead of
|
1499
|
+
// right children on the stack).
|
1500
|
+
subnode = Concat(subnode, CordRep::Ref(node));
|
1501
|
+
n -= node->length;
|
1502
|
+
bytes_remaining_ -= node->length;
|
1503
|
+
node = nullptr;
|
1504
|
+
}
|
1505
|
+
|
1506
|
+
if (node == nullptr) {
|
1507
|
+
// We have reached the end of the Cord.
|
1508
|
+
assert(bytes_remaining_ == 0);
|
1509
|
+
subcord.contents_.set_tree(VerifyTree(subnode));
|
1510
|
+
return subcord;
|
1511
|
+
}
|
1512
|
+
|
1513
|
+
// Walk down the appropriate branches until we hit a non-CONCAT node. Save the
|
1514
|
+
// right children to the stack for subsequent traversal.
|
1515
|
+
while (node->tag == CONCAT) {
|
1516
|
+
if (node->concat()->left->length > n) {
|
1517
|
+
// Push right, descend left.
|
1518
|
+
stack_of_right_children.push_back(node->concat()->right);
|
1519
|
+
node = node->concat()->left;
|
1520
|
+
} else {
|
1521
|
+
// Read left, descend right.
|
1522
|
+
subnode = Concat(subnode, CordRep::Ref(node->concat()->left));
|
1523
|
+
n -= node->concat()->left->length;
|
1524
|
+
bytes_remaining_ -= node->concat()->left->length;
|
1525
|
+
node = node->concat()->right;
|
1526
|
+
}
|
1527
|
+
}
|
1528
|
+
|
1529
|
+
// Get the child node if we encounter a SUBSTRING.
|
1530
|
+
size_t offset = 0;
|
1531
|
+
size_t length = node->length;
|
1532
|
+
if (node->tag == SUBSTRING) {
|
1533
|
+
offset = node->substring()->start;
|
1534
|
+
node = node->substring()->child;
|
1535
|
+
}
|
1536
|
+
|
1537
|
+
// Range to read ends with a proper (possibly empty) subrange of the current
|
1538
|
+
// chunk.
|
1539
|
+
assert(node->tag == EXTERNAL || node->tag >= FLAT);
|
1540
|
+
assert(length > n);
|
1541
|
+
if (n > 0) {
|
1542
|
+
subnode = Concat(subnode, NewSubstring(CordRep::Ref(node), offset, n));
|
1543
|
+
}
|
1544
|
+
const char* data =
|
1545
|
+
node->tag == EXTERNAL ? node->external()->base : node->flat()->Data();
|
1546
|
+
current_chunk_ = absl::string_view(data + offset + n, length - n);
|
1547
|
+
current_leaf_ = node;
|
1548
|
+
bytes_remaining_ -= n;
|
1549
|
+
subcord.contents_.set_tree(VerifyTree(subnode));
|
1550
|
+
return subcord;
|
1551
|
+
}
|
1552
|
+
|
1553
|
+
void Cord::ChunkIterator::AdvanceBytesSlowPath(size_t n) {
|
1554
|
+
assert(bytes_remaining_ >= n && "Attempted to iterate past `end()`");
|
1555
|
+
assert(n >= current_chunk_.size()); // This should only be called when
|
1556
|
+
// iterating to a new node.
|
1557
|
+
|
1558
|
+
n -= current_chunk_.size();
|
1559
|
+
bytes_remaining_ -= current_chunk_.size();
|
1560
|
+
|
1561
|
+
if (stack_of_right_children_.empty()) {
|
1562
|
+
// We have reached the end of the Cord.
|
1563
|
+
assert(bytes_remaining_ == 0);
|
1564
|
+
return;
|
1565
|
+
}
|
1566
|
+
|
1567
|
+
// Process the next node(s) on the stack, skipping whole subtrees depending on
|
1568
|
+
// their length and how many bytes we are advancing.
|
1569
|
+
CordRep* node = nullptr;
|
1570
|
+
auto& stack_of_right_children = stack_of_right_children_;
|
1571
|
+
while (!stack_of_right_children.empty()) {
|
1572
|
+
node = stack_of_right_children.back();
|
1573
|
+
stack_of_right_children.pop_back();
|
1574
|
+
if (node->length > n) break;
|
1575
|
+
n -= node->length;
|
1576
|
+
bytes_remaining_ -= node->length;
|
1577
|
+
node = nullptr;
|
1578
|
+
}
|
1579
|
+
|
1580
|
+
if (node == nullptr) {
|
1581
|
+
// We have reached the end of the Cord.
|
1582
|
+
assert(bytes_remaining_ == 0);
|
1583
|
+
return;
|
1584
|
+
}
|
1585
|
+
|
1586
|
+
// Walk down the appropriate branches until we hit a non-CONCAT node. Save the
|
1587
|
+
// right children to the stack for subsequent traversal.
|
1588
|
+
while (node->tag == CONCAT) {
|
1589
|
+
if (node->concat()->left->length > n) {
|
1590
|
+
// Push right, descend left.
|
1591
|
+
stack_of_right_children.push_back(node->concat()->right);
|
1592
|
+
node = node->concat()->left;
|
1593
|
+
} else {
|
1594
|
+
// Skip left, descend right.
|
1595
|
+
n -= node->concat()->left->length;
|
1596
|
+
bytes_remaining_ -= node->concat()->left->length;
|
1597
|
+
node = node->concat()->right;
|
1598
|
+
}
|
1599
|
+
}
|
1600
|
+
|
1601
|
+
// Get the child node if we encounter a SUBSTRING.
|
1602
|
+
size_t offset = 0;
|
1603
|
+
size_t length = node->length;
|
1604
|
+
if (node->tag == SUBSTRING) {
|
1605
|
+
offset = node->substring()->start;
|
1606
|
+
node = node->substring()->child;
|
1607
|
+
}
|
1608
|
+
|
1609
|
+
assert(node->tag == EXTERNAL || node->tag >= FLAT);
|
1610
|
+
assert(length > n);
|
1611
|
+
const char* data =
|
1612
|
+
node->tag == EXTERNAL ? node->external()->base : node->flat()->Data();
|
1613
|
+
current_chunk_ = absl::string_view(data + offset + n, length - n);
|
1614
|
+
current_leaf_ = node;
|
1615
|
+
bytes_remaining_ -= n;
|
1616
|
+
}
|
1617
|
+
|
1618
|
+
char Cord::operator[](size_t i) const {
|
1619
|
+
ABSL_HARDENING_ASSERT(i < size());
|
1620
|
+
size_t offset = i;
|
1621
|
+
const CordRep* rep = contents_.tree();
|
1622
|
+
if (rep == nullptr) {
|
1623
|
+
return contents_.data()[i];
|
1624
|
+
}
|
1625
|
+
while (true) {
|
1626
|
+
assert(rep != nullptr);
|
1627
|
+
assert(offset < rep->length);
|
1628
|
+
if (rep->tag >= FLAT) {
|
1629
|
+
// Get the "i"th character directly from the flat array.
|
1630
|
+
return rep->flat()->Data()[offset];
|
1631
|
+
} else if (rep->tag == RING) {
|
1632
|
+
return rep->ring()->GetCharacter(offset);
|
1633
|
+
} else if (rep->tag == EXTERNAL) {
|
1634
|
+
// Get the "i"th character from the external array.
|
1635
|
+
return rep->external()->base[offset];
|
1636
|
+
} else if (rep->tag == CONCAT) {
|
1637
|
+
// Recursively branch to the side of the concatenation that the "i"th
|
1638
|
+
// character is on.
|
1639
|
+
size_t left_length = rep->concat()->left->length;
|
1640
|
+
if (offset < left_length) {
|
1641
|
+
rep = rep->concat()->left;
|
1642
|
+
} else {
|
1643
|
+
offset -= left_length;
|
1644
|
+
rep = rep->concat()->right;
|
1645
|
+
}
|
1646
|
+
} else {
|
1647
|
+
// This must be a substring a node, so bypass it to get to the child.
|
1648
|
+
assert(rep->tag == SUBSTRING);
|
1649
|
+
offset += rep->substring()->start;
|
1650
|
+
rep = rep->substring()->child;
|
1651
|
+
}
|
1652
|
+
}
|
1653
|
+
}
|
1654
|
+
|
1655
|
+
absl::string_view Cord::FlattenSlowPath() {
|
1656
|
+
size_t total_size = size();
|
1657
|
+
CordRep* new_rep;
|
1658
|
+
char* new_buffer;
|
1659
|
+
|
1660
|
+
// Try to put the contents into a new flat rep. If they won't fit in the
|
1661
|
+
// biggest possible flat node, use an external rep instead.
|
1662
|
+
if (total_size <= kMaxFlatLength) {
|
1663
|
+
new_rep = CordRepFlat::New(total_size);
|
1664
|
+
new_rep->length = total_size;
|
1665
|
+
new_buffer = new_rep->flat()->Data();
|
1666
|
+
CopyToArraySlowPath(new_buffer);
|
1667
|
+
} else {
|
1668
|
+
new_buffer = std::allocator<char>().allocate(total_size);
|
1669
|
+
CopyToArraySlowPath(new_buffer);
|
1670
|
+
new_rep = absl::cord_internal::NewExternalRep(
|
1671
|
+
absl::string_view(new_buffer, total_size), [](absl::string_view s) {
|
1672
|
+
std::allocator<char>().deallocate(const_cast<char*>(s.data()),
|
1673
|
+
s.size());
|
1674
|
+
});
|
1675
|
+
}
|
1676
|
+
if (CordRep* tree = contents_.tree()) {
|
1677
|
+
CordRep::Unref(tree);
|
1678
|
+
}
|
1679
|
+
contents_.set_tree(new_rep);
|
1680
|
+
return absl::string_view(new_buffer, total_size);
|
1681
|
+
}
|
1682
|
+
|
1683
|
+
/* static */ bool Cord::GetFlatAux(CordRep* rep, absl::string_view* fragment) {
|
1684
|
+
assert(rep != nullptr);
|
1685
|
+
if (rep->tag >= FLAT) {
|
1686
|
+
*fragment = absl::string_view(rep->flat()->Data(), rep->length);
|
1687
|
+
return true;
|
1688
|
+
} else if (rep->tag == EXTERNAL) {
|
1689
|
+
*fragment = absl::string_view(rep->external()->base, rep->length);
|
1690
|
+
return true;
|
1691
|
+
} else if (rep->tag == SUBSTRING) {
|
1692
|
+
CordRep* child = rep->substring()->child;
|
1693
|
+
if (child->tag >= FLAT) {
|
1694
|
+
*fragment = absl::string_view(
|
1695
|
+
child->flat()->Data() + rep->substring()->start, rep->length);
|
1696
|
+
return true;
|
1697
|
+
} else if (child->tag == EXTERNAL) {
|
1698
|
+
*fragment = absl::string_view(
|
1699
|
+
child->external()->base + rep->substring()->start, rep->length);
|
1700
|
+
return true;
|
1701
|
+
}
|
1702
|
+
}
|
1703
|
+
return false;
|
1704
|
+
}
|
1705
|
+
|
1706
|
+
/* static */ void Cord::ForEachChunkAux(
|
1707
|
+
absl::cord_internal::CordRep* rep,
|
1708
|
+
absl::FunctionRef<void(absl::string_view)> callback) {
|
1709
|
+
if (rep->tag == RING) {
|
1710
|
+
ChunkIterator it(rep), end;
|
1711
|
+
while (it != end) {
|
1712
|
+
callback(*it);
|
1713
|
+
++it;
|
1714
|
+
}
|
1715
|
+
return;
|
1716
|
+
}
|
1717
|
+
|
1718
|
+
assert(rep != nullptr);
|
1719
|
+
int stack_pos = 0;
|
1720
|
+
constexpr int stack_max = 128;
|
1721
|
+
// Stack of right branches for tree traversal
|
1722
|
+
absl::cord_internal::CordRep* stack[stack_max];
|
1723
|
+
absl::cord_internal::CordRep* current_node = rep;
|
1724
|
+
while (true) {
|
1725
|
+
if (current_node->tag == CONCAT) {
|
1726
|
+
if (stack_pos == stack_max) {
|
1727
|
+
// There's no more room on our stack array to add another right branch,
|
1728
|
+
// and the idea is to avoid allocations, so call this function
|
1729
|
+
// recursively to navigate this subtree further. (This is not something
|
1730
|
+
// we expect to happen in practice).
|
1731
|
+
ForEachChunkAux(current_node, callback);
|
1732
|
+
|
1733
|
+
// Pop the next right branch and iterate.
|
1734
|
+
current_node = stack[--stack_pos];
|
1735
|
+
continue;
|
1736
|
+
} else {
|
1737
|
+
// Save the right branch for later traversal and continue down the left
|
1738
|
+
// branch.
|
1739
|
+
stack[stack_pos++] = current_node->concat()->right;
|
1740
|
+
current_node = current_node->concat()->left;
|
1741
|
+
continue;
|
1742
|
+
}
|
1743
|
+
}
|
1744
|
+
// This is a leaf node, so invoke our callback.
|
1745
|
+
absl::string_view chunk;
|
1746
|
+
bool success = GetFlatAux(current_node, &chunk);
|
1747
|
+
assert(success);
|
1748
|
+
if (success) {
|
1749
|
+
callback(chunk);
|
1750
|
+
}
|
1751
|
+
if (stack_pos == 0) {
|
1752
|
+
// end of traversal
|
1753
|
+
return;
|
1754
|
+
}
|
1755
|
+
current_node = stack[--stack_pos];
|
1756
|
+
}
|
1757
|
+
}
|
1758
|
+
|
1759
|
+
static void DumpNode(CordRep* rep, bool include_data, std::ostream* os,
|
1760
|
+
int indent) {
|
1761
|
+
const int kIndentStep = 1;
|
1762
|
+
absl::InlinedVector<CordRep*, kInlinedVectorSize> stack;
|
1763
|
+
absl::InlinedVector<int, kInlinedVectorSize> indents;
|
1764
|
+
for (;;) {
|
1765
|
+
*os << std::setw(3) << rep->refcount.Get();
|
1766
|
+
*os << " " << std::setw(7) << rep->length;
|
1767
|
+
*os << " [";
|
1768
|
+
if (include_data) *os << static_cast<void*>(rep);
|
1769
|
+
*os << "]";
|
1770
|
+
*os << " " << (IsRootBalanced(rep) ? 'b' : 'u');
|
1771
|
+
*os << " " << std::setw(indent) << "";
|
1772
|
+
if (rep->tag == CONCAT) {
|
1773
|
+
*os << "CONCAT depth=" << Depth(rep) << "\n";
|
1774
|
+
indent += kIndentStep;
|
1775
|
+
indents.push_back(indent);
|
1776
|
+
stack.push_back(rep->concat()->right);
|
1777
|
+
rep = rep->concat()->left;
|
1778
|
+
} else if (rep->tag == SUBSTRING) {
|
1779
|
+
*os << "SUBSTRING @ " << rep->substring()->start << "\n";
|
1780
|
+
indent += kIndentStep;
|
1781
|
+
rep = rep->substring()->child;
|
1782
|
+
} else { // Leaf or ring
|
1783
|
+
if (rep->tag == EXTERNAL) {
|
1784
|
+
*os << "EXTERNAL [";
|
1785
|
+
if (include_data)
|
1786
|
+
*os << absl::CEscape(std::string(rep->external()->base, rep->length));
|
1787
|
+
*os << "]\n";
|
1788
|
+
} else if (rep->tag >= FLAT) {
|
1789
|
+
*os << "FLAT cap=" << rep->flat()->Capacity()
|
1790
|
+
<< " [";
|
1791
|
+
if (include_data)
|
1792
|
+
*os << absl::CEscape(std::string(rep->flat()->Data(), rep->length));
|
1793
|
+
*os << "]\n";
|
1794
|
+
} else {
|
1795
|
+
assert(rep->tag == RING);
|
1796
|
+
auto* ring = rep->ring();
|
1797
|
+
*os << "RING, entries = " << ring->entries() << "\n";
|
1798
|
+
CordRepRing::index_type head = ring->head();
|
1799
|
+
do {
|
1800
|
+
DumpNode(ring->entry_child(head), include_data, os,
|
1801
|
+
indent + kIndentStep);
|
1802
|
+
head = ring->advance(head);;
|
1803
|
+
} while (head != ring->tail());
|
1804
|
+
}
|
1805
|
+
if (stack.empty()) break;
|
1806
|
+
rep = stack.back();
|
1807
|
+
stack.pop_back();
|
1808
|
+
indent = indents.back();
|
1809
|
+
indents.pop_back();
|
1810
|
+
}
|
1811
|
+
}
|
1812
|
+
ABSL_INTERNAL_CHECK(indents.empty(), "");
|
1813
|
+
}
|
1814
|
+
|
1815
|
+
static std::string ReportError(CordRep* root, CordRep* node) {
|
1816
|
+
std::ostringstream buf;
|
1817
|
+
buf << "Error at node " << node << " in:";
|
1818
|
+
DumpNode(root, true, &buf);
|
1819
|
+
return buf.str();
|
1820
|
+
}
|
1821
|
+
|
1822
|
+
static bool VerifyNode(CordRep* root, CordRep* start_node,
|
1823
|
+
bool full_validation) {
|
1824
|
+
absl::InlinedVector<CordRep*, 2> worklist;
|
1825
|
+
worklist.push_back(start_node);
|
1826
|
+
do {
|
1827
|
+
CordRep* node = worklist.back();
|
1828
|
+
worklist.pop_back();
|
1829
|
+
|
1830
|
+
ABSL_INTERNAL_CHECK(node != nullptr, ReportError(root, node));
|
1831
|
+
if (node != root) {
|
1832
|
+
ABSL_INTERNAL_CHECK(node->length != 0, ReportError(root, node));
|
1833
|
+
}
|
1834
|
+
|
1835
|
+
if (node->tag == CONCAT) {
|
1836
|
+
ABSL_INTERNAL_CHECK(node->concat()->left != nullptr,
|
1837
|
+
ReportError(root, node));
|
1838
|
+
ABSL_INTERNAL_CHECK(node->concat()->right != nullptr,
|
1839
|
+
ReportError(root, node));
|
1840
|
+
ABSL_INTERNAL_CHECK((node->length == node->concat()->left->length +
|
1841
|
+
node->concat()->right->length),
|
1842
|
+
ReportError(root, node));
|
1843
|
+
if (full_validation) {
|
1844
|
+
worklist.push_back(node->concat()->right);
|
1845
|
+
worklist.push_back(node->concat()->left);
|
1846
|
+
}
|
1847
|
+
} else if (node->tag >= FLAT) {
|
1848
|
+
ABSL_INTERNAL_CHECK(
|
1849
|
+
node->length <= node->flat()->Capacity(),
|
1850
|
+
ReportError(root, node));
|
1851
|
+
} else if (node->tag == EXTERNAL) {
|
1852
|
+
ABSL_INTERNAL_CHECK(node->external()->base != nullptr,
|
1853
|
+
ReportError(root, node));
|
1854
|
+
} else if (node->tag == SUBSTRING) {
|
1855
|
+
ABSL_INTERNAL_CHECK(
|
1856
|
+
node->substring()->start < node->substring()->child->length,
|
1857
|
+
ReportError(root, node));
|
1858
|
+
ABSL_INTERNAL_CHECK(node->substring()->start + node->length <=
|
1859
|
+
node->substring()->child->length,
|
1860
|
+
ReportError(root, node));
|
1861
|
+
}
|
1862
|
+
} while (!worklist.empty());
|
1863
|
+
return true;
|
1864
|
+
}
|
1865
|
+
|
1866
|
+
// Traverses the tree and computes the total memory allocated.
|
1867
|
+
/* static */ size_t Cord::MemoryUsageAux(const CordRep* rep) {
|
1868
|
+
size_t total_mem_usage = 0;
|
1869
|
+
|
1870
|
+
// Allow a quick exit for the common case that the root is a leaf.
|
1871
|
+
if (RepMemoryUsageLeaf(rep, &total_mem_usage)) {
|
1872
|
+
return total_mem_usage;
|
1873
|
+
}
|
1874
|
+
|
1875
|
+
// Iterate over the tree. cur_node is never a leaf node and leaf nodes will
|
1876
|
+
// never be appended to tree_stack. This reduces overhead from manipulating
|
1877
|
+
// tree_stack.
|
1878
|
+
absl::InlinedVector<const CordRep*, kInlinedVectorSize> tree_stack;
|
1879
|
+
const CordRep* cur_node = rep;
|
1880
|
+
while (true) {
|
1881
|
+
const CordRep* next_node = nullptr;
|
1882
|
+
|
1883
|
+
if (cur_node->tag == CONCAT) {
|
1884
|
+
total_mem_usage += sizeof(CordRepConcat);
|
1885
|
+
const CordRep* left = cur_node->concat()->left;
|
1886
|
+
if (!RepMemoryUsageLeaf(left, &total_mem_usage)) {
|
1887
|
+
next_node = left;
|
1888
|
+
}
|
1889
|
+
|
1890
|
+
const CordRep* right = cur_node->concat()->right;
|
1891
|
+
if (!RepMemoryUsageLeaf(right, &total_mem_usage)) {
|
1892
|
+
if (next_node) {
|
1893
|
+
tree_stack.push_back(next_node);
|
1894
|
+
}
|
1895
|
+
next_node = right;
|
1896
|
+
}
|
1897
|
+
} else if (cur_node->tag == RING) {
|
1898
|
+
total_mem_usage += CordRepRing::AllocSize(cur_node->ring()->capacity());
|
1899
|
+
const CordRepRing* ring = cur_node->ring();
|
1900
|
+
CordRepRing::index_type pos = ring->head(), tail = ring->tail();
|
1901
|
+
do {
|
1902
|
+
CordRep* node = ring->entry_child(pos);
|
1903
|
+
assert(node->tag >= FLAT || node->tag == EXTERNAL);
|
1904
|
+
RepMemoryUsageLeaf(node, &total_mem_usage);
|
1905
|
+
} while ((pos = ring->advance(pos)) != tail);
|
1906
|
+
} else {
|
1907
|
+
// Since cur_node is not a leaf or a concat node it must be a substring.
|
1908
|
+
assert(cur_node->tag == SUBSTRING);
|
1909
|
+
total_mem_usage += sizeof(CordRepSubstring);
|
1910
|
+
next_node = cur_node->substring()->child;
|
1911
|
+
if (RepMemoryUsageLeaf(next_node, &total_mem_usage)) {
|
1912
|
+
next_node = nullptr;
|
1913
|
+
}
|
1914
|
+
}
|
1915
|
+
|
1916
|
+
if (!next_node) {
|
1917
|
+
if (tree_stack.empty()) {
|
1918
|
+
return total_mem_usage;
|
1919
|
+
}
|
1920
|
+
next_node = tree_stack.back();
|
1921
|
+
tree_stack.pop_back();
|
1922
|
+
}
|
1923
|
+
cur_node = next_node;
|
1924
|
+
}
|
1925
|
+
}
|
1926
|
+
|
1927
|
+
std::ostream& operator<<(std::ostream& out, const Cord& cord) {
|
1928
|
+
for (absl::string_view chunk : cord.Chunks()) {
|
1929
|
+
out.write(chunk.data(), chunk.size());
|
1930
|
+
}
|
1931
|
+
return out;
|
1932
|
+
}
|
1933
|
+
|
1934
|
+
namespace strings_internal {
|
1935
|
+
size_t CordTestAccess::FlatOverhead() { return cord_internal::kFlatOverhead; }
|
1936
|
+
size_t CordTestAccess::MaxFlatLength() { return cord_internal::kMaxFlatLength; }
|
1937
|
+
size_t CordTestAccess::FlatTagToLength(uint8_t tag) {
|
1938
|
+
return cord_internal::TagToLength(tag);
|
1939
|
+
}
|
1940
|
+
uint8_t CordTestAccess::LengthToTag(size_t s) {
|
1941
|
+
ABSL_INTERNAL_CHECK(s <= kMaxFlatLength, absl::StrCat("Invalid length ", s));
|
1942
|
+
return cord_internal::AllocatedSizeToTag(s + cord_internal::kFlatOverhead);
|
1943
|
+
}
|
1944
|
+
size_t CordTestAccess::SizeofCordRepConcat() { return sizeof(CordRepConcat); }
|
1945
|
+
size_t CordTestAccess::SizeofCordRepExternal() {
|
1946
|
+
return sizeof(CordRepExternal);
|
1947
|
+
}
|
1948
|
+
size_t CordTestAccess::SizeofCordRepSubstring() {
|
1949
|
+
return sizeof(CordRepSubstring);
|
1950
|
+
}
|
1951
|
+
} // namespace strings_internal
|
1952
|
+
ABSL_NAMESPACE_END
|
1953
|
+
} // namespace absl
|