grpc 1.28.0 → 1.36.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Makefile +1692 -22343
- data/etc/roots.pem +257 -573
- data/include/grpc/compression.h +1 -1
- data/include/grpc/grpc.h +17 -9
- data/include/grpc/grpc_security.h +274 -180
- data/include/grpc/grpc_security_constants.h +4 -0
- data/include/grpc/impl/codegen/README.md +22 -0
- data/include/grpc/impl/codegen/atm_windows.h +4 -0
- data/include/grpc/impl/codegen/byte_buffer.h +1 -1
- data/include/grpc/impl/codegen/grpc_types.h +32 -30
- data/include/grpc/impl/codegen/log.h +0 -2
- data/include/grpc/impl/codegen/port_platform.h +34 -90
- data/include/grpc/impl/codegen/sync_windows.h +4 -0
- data/include/grpc/module.modulemap +24 -39
- data/include/grpc/slice_buffer.h +3 -3
- data/include/grpc/support/sync.h +3 -3
- data/include/grpc/support/time.h +7 -7
- data/src/core/ext/filters/client_channel/backend_metric.cc +16 -12
- data/src/core/ext/filters/client_channel/backup_poller.cc +3 -2
- data/src/core/ext/filters/client_channel/client_channel.cc +3750 -2341
- data/src/core/ext/filters/client_channel/client_channel.h +1 -7
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +0 -3
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +4 -3
- data/src/core/ext/filters/client_channel/config_selector.cc +58 -0
- data/src/core/ext/filters/client_channel/config_selector.h +125 -0
- data/src/core/ext/filters/client_channel/dynamic_filters.cc +186 -0
- data/src/core/ext/filters/client_channel/dynamic_filters.h +99 -0
- data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +24 -2
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +25 -30
- data/src/core/ext/filters/client_channel/health/health_check_client.h +7 -7
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +15 -16
- data/src/core/ext/filters/client_channel/http_proxy.cc +44 -34
- data/src/core/ext/filters/client_channel/lb_policy.cc +25 -20
- data/src/core/ext/filters/client_channel/lb_policy.h +50 -38
- 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 +20 -11
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +481 -510
- 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 +1 -2
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +6 -41
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +3 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +3 -2
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +24 -18
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +922 -0
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +11 -10
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +18 -46
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +744 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +520 -134
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.h +53 -26
- 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 +810 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +722 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +1384 -0
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +18 -8
- data/src/core/ext/filters/client_channel/local_subchannel_pool.h +2 -1
- data/src/core/ext/filters/client_channel/resolver.cc +6 -10
- data/src/core/ext/filters/client_channel/resolver.h +10 -20
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +111 -110
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +4 -34
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +22 -24
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +13 -11
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +79 -122
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +642 -180
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +10 -3
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +61 -61
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +102 -108
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +1 -5
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +362 -0
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +38 -31
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +625 -46
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h +28 -0
- data/src/core/ext/filters/client_channel/resolver_factory.h +8 -8
- data/src/core/ext/filters/client_channel/resolver_registry.cc +55 -52
- data/src/core/ext/filters/client_channel/resolver_registry.h +10 -10
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +47 -93
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +30 -26
- data/src/core/ext/filters/client_channel/retry_throttle.cc +5 -3
- data/src/core/ext/filters/client_channel/retry_throttle.h +4 -2
- data/src/core/ext/filters/client_channel/server_address.cc +129 -13
- data/src/core/ext/filters/client_channel/server_address.h +80 -32
- data/src/core/ext/filters/client_channel/service_config.cc +114 -149
- data/src/core/ext/filters/client_channel/service_config.h +33 -100
- data/src/core/ext/filters/client_channel/service_config_call_data.h +86 -0
- data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +142 -0
- data/src/core/ext/filters/client_channel/service_config_parser.cc +89 -0
- data/src/core/ext/filters/client_channel/service_config_parser.h +92 -0
- data/src/core/ext/filters/client_channel/subchannel.cc +156 -98
- data/src/core/ext/filters/client_channel/subchannel.h +65 -35
- data/src/core/ext/filters/client_channel/subchannel_interface.h +41 -5
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +6 -2
- data/src/core/ext/filters/deadline/deadline_filter.cc +87 -79
- data/src/core/ext/filters/deadline/deadline_filter.h +7 -11
- data/src/core/ext/filters/http/client/http_client_filter.cc +29 -34
- data/src/core/ext/filters/http/client_authority_filter.cc +10 -10
- data/src/core/ext/filters/http/http_filters_plugin.cc +34 -15
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +258 -221
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +399 -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 +3 -3
- data/src/core/ext/filters/max_age/max_age_filter.cc +38 -34
- data/src/core/ext/filters/message_size/message_size_filter.cc +64 -90
- data/src/core/ext/filters/message_size/message_size_filter.h +12 -5
- data/src/core/ext/filters/workarounds/workaround_utils.cc +1 -1
- data/src/core/ext/transport/chttp2/client/authority.cc +3 -3
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +87 -31
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +19 -2
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +20 -8
- data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +21 -10
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +34 -47
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +505 -344
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +16 -2
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +13 -3
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +19 -18
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +65 -21
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +7 -7
- data/src/core/ext/transport/chttp2/transport/bin_encoder.cc +4 -6
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +307 -343
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +1 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +36 -33
- data/src/core/ext/transport/chttp2/transport/flow_control.h +27 -19
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +9 -12
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +6 -7
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +2 -3
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +5 -6
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +2 -3
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +12 -13
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +2 -3
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +8 -9
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +4 -4
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +15 -18
- data/src/core/ext/transport/chttp2/transport/frame_window_update.h +2 -3
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +29 -16
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +2 -3
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +37 -37
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +2 -3
- data/src/core/ext/transport/chttp2/transport/hpack_table.cc +13 -17
- data/src/core/ext/transport/chttp2/transport/hpack_table.h +2 -2
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +4 -5
- data/src/core/ext/transport/chttp2/transport/huffsyms.h +2 -3
- data/src/core/ext/transport/chttp2/transport/internal.h +37 -23
- data/src/core/ext/transport/chttp2/transport/parsing.cc +52 -74
- data/src/core/ext/transport/chttp2/transport/stream_map.h +2 -3
- data/src/core/ext/transport/chttp2/transport/writing.cc +30 -28
- data/src/core/ext/transport/inproc/inproc_transport.cc +106 -33
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +1 -1
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +1 -1
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +10 -4
- 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 +865 -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 +253 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +453 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +1801 -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 +77 -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 +364 -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 +428 -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 +88 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +334 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +1066 -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 +388 -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 +78 -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 +149 -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 +839 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +170 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +767 -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 +88 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +176 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +730 -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 +65 -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 +95 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +42 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h +126 -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 +243 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +91 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +305 -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 +367 -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 +73 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +130 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +557 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +159 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +623 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +40 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +107 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +178 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +662 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +65 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +237 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +926 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +3746 -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 +159 -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 +122 -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 +67 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +361 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +1484 -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 +113 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +458 -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 +219 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +146 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +621 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/rds.upb.c → service/cluster/v3/cds.upb.c} +7 -9
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h +56 -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 +56 -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 +499 -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 +56 -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 +56 -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 +151 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/srds.upb.c → service/route/v3/rds.upb.c} +7 -7
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/cds.upb.c → service/route/v3/srds.upb.c} +7 -7
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +128 -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 +84 -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 +78 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +64 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +166 -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 +146 -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 +207 -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 +301 -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 +283 -0
- data/src/core/ext/upb-generated/envoy/type/{http.upb.c → v3/http.upb.c} +3 -2
- data/src/core/ext/upb-generated/envoy/type/{http.upb.h → v3/http.upb.h} +9 -9
- 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 +99 -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 +130 -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 +68 -0
- data/src/core/ext/upb-generated/google/api/annotations.upb.h +1 -1
- 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 +830 -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 +871 -0
- data/src/core/ext/upb-generated/google/api/http.upb.c +3 -3
- data/src/core/ext/upb-generated/google/api/http.upb.h +52 -32
- data/src/core/ext/upb-generated/google/protobuf/any.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/any.upb.h +12 -6
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +107 -106
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +691 -496
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +12 -6
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +8 -2
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +5 -5
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +55 -57
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +12 -6
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +9 -9
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +82 -28
- data/src/core/ext/upb-generated/google/rpc/status.upb.c +1 -1
- data/src/core/ext/upb-generated/google/rpc/status.upb.h +17 -10
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +5 -5
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +40 -45
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +43 -43
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +236 -184
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +5 -5
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +29 -13
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +2 -2
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +19 -7
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +17 -17
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +122 -62
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +3 -3
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +30 -12
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.c +31 -0
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.h +64 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +1 -1
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.c +28 -0
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.h +71 -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 +60 -0
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c +9 -9
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h +48 -68
- data/src/core/ext/upb-generated/validate/validate.upb.c +71 -70
- data/src/core/ext/upb-generated/validate/validate.upb.h +732 -586
- 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 +60 -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 +143 -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 +84 -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 +94 -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 +166 -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 +85 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c +38 -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 +251 -0
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h +105 -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 +543 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +145 -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 +272 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h +135 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c +143 -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 +233 -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 +228 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h +80 -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/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 +68 -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/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 +113 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h +50 -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 +195 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c +193 -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/udp_listener_config.upbdefs.c +59 -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/route/v3/route.upbdefs.c +101 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +938 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +285 -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/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +504 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +115 -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 +170 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h +55 -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 +246 -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/type/matcher/v3/metadata.upbdefs.c +64 -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/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 +73 -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/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/{upb-generated/gogoproto/gogo.upb.h → upbdefs-generated/envoy/type/v3/http.upbdefs.h} +10 -10
- 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 +70 -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 +56 -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 +33 -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 +49 -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 +43 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c +310 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h +145 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c +42 -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 +62 -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 +45 -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 +49 -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 +67 -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 +50 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.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 +2479 -0
- data/src/core/ext/xds/xds_api.h +431 -0
- data/src/core/ext/xds/xds_bootstrap.cc +539 -0
- data/src/core/ext/xds/xds_bootstrap.h +116 -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/{filters/client_channel/xds → xds}/xds_channel_args.h +9 -6
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client.cc +839 -774
- data/src/core/ext/xds/xds_client.h +339 -0
- data/src/core/ext/xds/xds_client_stats.cc +159 -0
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client_stats.h +78 -38
- data/src/core/ext/xds/xds_server_config_fetcher.cc +267 -0
- data/src/core/lib/channel/channel_args.cc +24 -22
- data/src/core/lib/channel/channel_args.h +3 -2
- data/src/core/lib/channel/channel_stack.h +20 -13
- data/src/core/lib/channel/channel_trace.cc +6 -8
- data/src/core/lib/channel/channel_trace.h +1 -1
- data/src/core/lib/channel/channelz.cc +46 -94
- data/src/core/lib/channel/channelz.h +17 -25
- data/src/core/lib/channel/channelz_registry.cc +20 -15
- data/src/core/lib/channel/channelz_registry.h +3 -1
- data/src/core/lib/channel/connected_channel.cc +7 -5
- data/src/core/lib/channel/context.h +1 -1
- data/src/core/lib/channel/handshaker.cc +15 -20
- data/src/core/lib/channel/handshaker.h +7 -5
- data/src/core/lib/channel/handshaker_registry.cc +5 -17
- data/src/core/lib/channel/status_util.cc +2 -3
- data/src/core/lib/compression/compression.cc +8 -4
- data/src/core/lib/compression/compression_args.cc +3 -2
- data/src/core/lib/compression/compression_internal.cc +10 -5
- data/src/core/lib/compression/compression_internal.h +2 -1
- data/src/core/lib/compression/message_compress.cc +5 -1
- data/src/core/lib/compression/stream_compression_identity.cc +1 -3
- data/src/core/lib/debug/stats.cc +21 -27
- data/src/core/lib/debug/stats.h +5 -3
- data/src/core/lib/debug/stats_data.cc +1 -0
- data/src/core/lib/debug/stats_data.h +13 -13
- data/src/core/lib/gpr/alloc.cc +3 -2
- data/src/core/lib/gpr/cpu_iphone.cc +10 -2
- data/src/core/lib/gpr/log.cc +59 -17
- data/src/core/lib/gpr/log_linux.cc +23 -9
- data/src/core/lib/gpr/log_posix.cc +19 -7
- data/src/core/lib/gpr/log_windows.cc +18 -4
- data/src/core/lib/gpr/murmur_hash.cc +1 -1
- data/src/core/lib/gpr/spinlock.h +12 -5
- data/src/core/lib/gpr/string.cc +33 -55
- data/src/core/lib/gpr/string.h +9 -24
- data/src/core/lib/gpr/sync.cc +4 -4
- data/src/core/lib/gpr/sync_abseil.cc +2 -0
- data/src/core/lib/gpr/sync_posix.cc +2 -8
- data/src/core/lib/gpr/time.cc +16 -12
- data/src/core/lib/gpr/time_posix.cc +1 -1
- data/src/core/lib/gpr/time_precise.cc +5 -2
- data/src/core/lib/gpr/time_precise.h +6 -2
- data/src/core/lib/gpr/tls.h +4 -0
- data/src/core/lib/gpr/tls_msvc.h +2 -0
- data/src/core/lib/gpr/tls_stdcpp.h +48 -0
- data/src/core/lib/gpr/useful.h +5 -4
- data/src/core/lib/gprpp/arena.h +3 -2
- data/src/core/lib/gprpp/atomic.h +6 -6
- data/src/core/lib/gprpp/dual_ref_counted.h +331 -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 +3 -3
- data/src/core/lib/gprpp/global_config_env.cc +8 -6
- data/src/core/lib/gprpp/host_port.cc +29 -35
- data/src/core/lib/gprpp/host_port.h +14 -17
- data/src/core/lib/gprpp/manual_constructor.h +1 -1
- data/src/core/lib/gprpp/mpscq.cc +2 -2
- data/src/core/lib/gprpp/orphanable.h +4 -8
- data/src/core/lib/gprpp/ref_counted.h +91 -68
- data/src/core/lib/gprpp/ref_counted_ptr.h +171 -7
- 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/sync.h +129 -40
- data/src/core/lib/gprpp/thd.h +2 -2
- data/src/core/lib/gprpp/thd_posix.cc +42 -37
- data/src/core/lib/gprpp/thd_windows.cc +3 -1
- 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 +46 -65
- data/src/core/lib/http/httpcli.cc +16 -14
- data/src/core/lib/http/httpcli.h +4 -6
- data/src/core/lib/http/httpcli_security_connector.cc +13 -13
- data/src/core/lib/http/parser.cc +47 -27
- data/src/core/lib/http/parser.h +2 -3
- data/src/core/lib/iomgr/buffer_list.h +22 -21
- data/src/core/lib/iomgr/call_combiner.cc +8 -5
- data/src/core/lib/iomgr/call_combiner.h +3 -2
- data/src/core/lib/iomgr/cfstream_handle.cc +4 -2
- data/src/core/lib/iomgr/closure.h +2 -3
- data/src/core/lib/iomgr/combiner.cc +2 -1
- data/src/core/lib/iomgr/dualstack_socket_posix.cc +47 -0
- data/src/core/lib/iomgr/endpoint.cc +5 -1
- data/src/core/lib/iomgr/endpoint.h +8 -4
- data/src/core/lib/iomgr/endpoint_cfstream.cc +38 -14
- data/src/core/lib/iomgr/endpoint_pair.h +2 -3
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +10 -10
- data/src/core/lib/iomgr/error.cc +23 -21
- data/src/core/lib/iomgr/error.h +0 -1
- data/src/core/lib/iomgr/error_cfstream.cc +9 -8
- data/src/core/lib/iomgr/error_internal.h +1 -1
- 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 +43 -40
- data/src/core/lib/iomgr/ev_epollex_linux.cc +46 -45
- data/src/core/lib/iomgr/ev_poll_posix.cc +18 -15
- data/src/core/lib/iomgr/ev_posix.cc +2 -3
- data/src/core/lib/iomgr/exec_ctx.cc +1 -1
- data/src/core/lib/iomgr/exec_ctx.h +26 -10
- data/src/core/lib/iomgr/executor.cc +2 -1
- data/src/core/lib/iomgr/executor.h +1 -1
- data/src/core/lib/iomgr/executor/mpmcqueue.h +5 -5
- data/src/core/lib/iomgr/executor/threadpool.h +4 -4
- data/src/core/lib/iomgr/iomgr.cc +1 -1
- data/src/core/lib/iomgr/iomgr_posix.cc +0 -1
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +84 -21
- data/src/core/lib/iomgr/is_epollexclusive_available.cc +14 -0
- data/src/core/lib/iomgr/load_file.h +1 -1
- data/src/core/lib/iomgr/lockfree_event.cc +19 -14
- data/src/core/lib/iomgr/lockfree_event.h +2 -2
- data/src/core/lib/iomgr/parse_address.cc +322 -0
- data/src/core/lib/iomgr/parse_address.h +77 -0
- data/src/core/lib/iomgr/poller/eventmanager_libuv.cc +2 -1
- data/src/core/lib/iomgr/poller/eventmanager_libuv.h +1 -1
- data/src/core/lib/iomgr/pollset_set_custom.cc +11 -11
- data/src/core/lib/{gprpp/optional.h → iomgr/pollset_uv.h} +11 -12
- data/src/core/lib/iomgr/port.h +2 -21
- data/src/core/lib/iomgr/python_util.h +46 -0
- data/src/core/lib/iomgr/resolve_address.cc +4 -4
- data/src/core/lib/iomgr/resolve_address.h +4 -6
- data/src/core/lib/iomgr/resolve_address_custom.cc +42 -57
- data/src/core/lib/iomgr/resolve_address_custom.h +4 -2
- data/src/core/lib/iomgr/resolve_address_posix.cc +11 -16
- data/src/core/lib/iomgr/resolve_address_windows.cc +16 -25
- data/src/core/lib/iomgr/resource_quota.cc +38 -37
- data/src/core/lib/iomgr/sockaddr_utils.cc +41 -44
- data/src/core/lib/iomgr/sockaddr_utils.h +13 -17
- data/src/core/lib/iomgr/socket_factory_posix.cc +3 -2
- data/src/core/lib/iomgr/socket_factory_posix.h +2 -3
- data/src/core/lib/iomgr/socket_mutator.cc +3 -2
- data/src/core/lib/iomgr/socket_mutator.h +2 -3
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +103 -81
- data/src/core/lib/iomgr/socket_utils_posix.h +3 -0
- data/src/core/lib/iomgr/socket_windows.cc +4 -5
- data/src/core/lib/iomgr/tcp_client.cc +3 -3
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +14 -18
- data/src/core/lib/iomgr/tcp_client_custom.cc +13 -15
- data/src/core/lib/iomgr/tcp_client_posix.cc +31 -37
- data/src/core/lib/iomgr/tcp_client_windows.cc +10 -11
- data/src/core/lib/iomgr/tcp_custom.cc +56 -36
- data/src/core/lib/iomgr/tcp_custom.h +1 -1
- data/src/core/lib/iomgr/tcp_posix.cc +47 -25
- data/src/core/lib/iomgr/tcp_server.cc +3 -4
- data/src/core/lib/iomgr/tcp_server.h +7 -5
- data/src/core/lib/iomgr/tcp_server_custom.cc +39 -45
- data/src/core/lib/iomgr/tcp_server_posix.cc +38 -44
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +3 -4
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +7 -8
- data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +10 -18
- data/src/core/lib/iomgr/tcp_server_windows.cc +16 -16
- data/src/core/lib/iomgr/tcp_uv.cc +3 -2
- data/src/core/lib/iomgr/tcp_windows.cc +26 -10
- data/src/core/lib/iomgr/time_averaged_stats.h +2 -3
- data/src/core/lib/iomgr/timer_custom.cc +5 -5
- data/src/core/lib/iomgr/timer_generic.cc +18 -18
- data/src/core/lib/{gprpp/inlined_vector.h → iomgr/timer_generic.h} +19 -17
- data/src/core/lib/iomgr/timer_heap.h +2 -3
- data/src/core/lib/iomgr/timer_manager.cc +2 -2
- data/src/core/lib/iomgr/udp_server.cc +33 -38
- data/src/core/lib/iomgr/udp_server.h +6 -4
- data/src/core/lib/iomgr/unix_sockets_posix.cc +36 -30
- data/src/core/lib/iomgr/unix_sockets_posix.h +8 -1
- data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +12 -2
- data/src/core/lib/iomgr/wakeup_fd_pipe.cc +2 -2
- data/src/core/lib/json/json.h +15 -4
- data/src/core/lib/json/json_reader.cc +33 -30
- data/src/core/lib/json/json_util.cc +58 -0
- data/src/core/lib/json/json_util.h +204 -0
- data/src/core/lib/json/json_writer.cc +15 -13
- data/src/core/lib/security/authorization/authorization_engine.cc +177 -0
- data/src/core/lib/security/authorization/authorization_engine.h +84 -0
- data/src/core/lib/security/authorization/evaluate_args.cc +148 -0
- data/src/core/lib/security/authorization/evaluate_args.h +59 -0
- data/src/core/lib/security/authorization/matchers.cc +339 -0
- data/src/core/lib/security/authorization/matchers.h +158 -0
- data/src/core/lib/security/authorization/mock_cel/activation.h +57 -0
- data/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h +44 -0
- data/src/core/lib/security/authorization/mock_cel/cel_expression.h +69 -0
- data/src/core/lib/security/authorization/mock_cel/cel_value.h +99 -0
- data/src/core/lib/security/authorization/mock_cel/evaluator_core.h +67 -0
- data/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h +57 -0
- data/src/core/lib/security/context/security_context.cc +4 -3
- data/src/core/lib/security/context/security_context.h +3 -1
- data/src/core/lib/security/credentials/alts/alts_credentials.cc +2 -1
- data/src/core/lib/security/credentials/alts/alts_credentials.h +1 -1
- data/src/core/lib/security/credentials/alts/check_gcp_environment.cc +1 -1
- data/src/core/lib/security/credentials/composite/composite_credentials.cc +12 -0
- data/src/core/lib/security/credentials/composite/composite_credentials.h +6 -3
- data/src/core/lib/security/credentials/credentials.cc +7 -91
- data/src/core/lib/security/credentials/credentials.h +18 -66
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +413 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.h +80 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.cc +213 -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 +497 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.h +120 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +135 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.h +48 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +213 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.h +58 -0
- data/src/core/lib/security/credentials/fake/fake_credentials.cc +3 -2
- data/src/core/lib/security/credentials/fake/fake_credentials.h +4 -0
- data/src/core/lib/security/credentials/google_default/credentials_generic.cc +8 -6
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +90 -67
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +8 -6
- data/src/core/lib/security/credentials/iam/iam_credentials.h +4 -0
- data/src/core/lib/security/credentials/insecure/insecure_credentials.cc +64 -0
- data/src/core/lib/security/credentials/jwt/json_token.cc +4 -4
- data/src/core/lib/security/credentials/jwt/json_token.h +2 -5
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +7 -4
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +13 -0
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +13 -19
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +2 -3
- data/src/core/lib/security/credentials/local/local_credentials.cc +2 -1
- data/src/core/lib/security/credentials/local/local_credentials.h +1 -1
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +109 -97
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +14 -7
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +20 -7
- data/src/core/lib/security/credentials/plugin/plugin_credentials.h +2 -0
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +27 -6
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +12 -2
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +346 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +213 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +399 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +138 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +78 -140
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +74 -167
- data/src/core/lib/security/credentials/tls/tls_credentials.cc +18 -13
- data/src/core/lib/security/credentials/tls/tls_credentials.h +3 -3
- data/src/core/lib/security/credentials/tls/tls_utils.cc +91 -0
- data/src/core/lib/security/credentials/tls/tls_utils.h +38 -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 +22 -7
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +27 -32
- 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 +87 -0
- data/src/core/lib/security/security_connector/load_system_roots.h +4 -0
- data/src/core/lib/security/security_connector/load_system_roots_linux.cc +3 -2
- data/src/core/lib/security/security_connector/load_system_roots_linux.h +2 -0
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +4 -4
- data/src/core/lib/security/security_connector/security_connector.cc +6 -3
- data/src/core/lib/security/security_connector/security_connector.h +6 -4
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +42 -40
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +8 -5
- data/src/core/lib/security/security_connector/ssl_utils.cc +94 -23
- data/src/core/lib/security/security_connector/ssl_utils.h +37 -31
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +388 -284
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +108 -42
- data/src/core/lib/security/transport/auth_filters.h +0 -5
- data/src/core/lib/security/transport/client_auth_filter.cc +11 -11
- data/src/core/lib/security/transport/secure_endpoint.cc +9 -3
- data/src/core/lib/security/transport/security_handshaker.cc +4 -6
- data/src/core/lib/security/transport/server_auth_filter.cc +2 -1
- data/src/core/lib/security/util/json_util.cc +12 -13
- data/src/core/lib/security/util/json_util.h +1 -0
- data/src/core/lib/slice/slice.cc +45 -5
- data/src/core/lib/slice/slice_buffer.cc +2 -1
- data/src/core/lib/slice/slice_intern.cc +9 -11
- data/src/core/lib/slice/slice_internal.h +17 -2
- data/src/core/lib/slice/slice_utils.h +9 -0
- data/src/core/lib/surface/byte_buffer_reader.cc +2 -47
- data/src/core/lib/surface/call.cc +95 -88
- data/src/core/lib/surface/call.h +2 -1
- data/src/core/lib/surface/call_details.cc +8 -8
- data/src/core/lib/surface/call_log_batch.cc +50 -58
- data/src/core/lib/surface/channel.cc +86 -72
- data/src/core/lib/surface/channel.h +54 -7
- data/src/core/lib/surface/channel_init.cc +1 -1
- data/src/core/lib/surface/channel_ping.cc +2 -3
- data/src/core/lib/surface/completion_queue.cc +63 -62
- data/src/core/lib/surface/completion_queue.h +16 -16
- data/src/core/lib/surface/event_string.cc +18 -25
- data/src/core/lib/surface/event_string.h +3 -1
- data/src/core/lib/surface/init.cc +45 -29
- data/src/core/lib/surface/init_secure.cc +1 -4
- data/src/core/lib/surface/lame_client.cc +20 -46
- data/src/core/lib/surface/lame_client.h +4 -0
- data/src/core/lib/surface/server.cc +1311 -1309
- data/src/core/lib/surface/server.h +410 -45
- data/src/core/lib/surface/validate_metadata.h +3 -0
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/authority_override.cc +40 -0
- data/src/core/lib/transport/authority_override.h +37 -0
- data/src/core/lib/transport/bdp_estimator.cc +1 -1
- data/src/core/lib/transport/bdp_estimator.h +2 -1
- data/src/core/lib/transport/byte_stream.h +10 -5
- data/src/core/lib/transport/connectivity_state.cc +23 -17
- data/src/core/lib/transport/connectivity_state.h +31 -15
- data/src/core/lib/transport/error_utils.cc +13 -0
- data/src/core/lib/transport/error_utils.h +7 -1
- data/src/core/lib/transport/metadata.cc +19 -5
- data/src/core/lib/transport/metadata.h +2 -2
- data/src/core/lib/transport/metadata_batch.h +6 -7
- data/src/core/lib/transport/static_metadata.cc +296 -277
- data/src/core/lib/transport/static_metadata.h +81 -74
- data/src/core/lib/transport/status_conversion.cc +6 -14
- data/src/core/lib/transport/status_metadata.cc +4 -3
- data/src/core/lib/transport/timeout_encoding.cc +4 -4
- data/src/core/lib/transport/transport.cc +7 -6
- data/src/core/lib/transport/transport.h +24 -10
- data/src/core/lib/transport/transport_op_string.cc +61 -102
- data/src/core/lib/uri/uri_parser.cc +135 -258
- data/src/core/lib/uri/uri_parser.h +60 -23
- data/src/core/plugin_registry/grpc_plugin_registry.cc +59 -12
- data/src/core/tsi/alts/crypt/aes_gcm.cc +0 -2
- data/src/core/tsi/alts/crypt/gsec.cc +5 -4
- data/src/core/tsi/alts/frame_protector/frame_handler.cc +8 -6
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +48 -34
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.h +8 -4
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +98 -48
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +9 -1
- data/src/core/tsi/alts/handshaker/transport_security_common_api.cc +2 -0
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h +2 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc +8 -6
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +4 -4
- data/src/core/tsi/fake_transport_security.cc +17 -19
- data/src/core/tsi/local_transport_security.cc +5 -1
- data/src/core/tsi/local_transport_security.h +6 -7
- data/src/core/tsi/ssl/session_cache/ssl_session.h +0 -2
- data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +0 -2
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +3 -4
- data/src/core/tsi/ssl_transport_security.cc +226 -105
- data/src/core/tsi/ssl_transport_security.h +28 -16
- data/src/core/tsi/ssl_types.h +0 -2
- data/src/core/tsi/transport_security.cc +10 -8
- data/src/core/tsi/transport_security.h +6 -9
- data/src/core/tsi/transport_security_grpc.h +2 -3
- data/src/core/tsi/transport_security_interface.h +9 -4
- data/src/ruby/bin/math_services_pb.rb +4 -4
- data/src/ruby/ext/grpc/extconf.rb +6 -3
- data/src/ruby/ext/grpc/rb_call.c +12 -3
- data/src/ruby/ext/grpc/rb_call.h +4 -0
- data/src/ruby/ext/grpc/rb_call_credentials.c +57 -12
- data/src/ruby/ext/grpc/rb_channel_credentials.c +9 -0
- data/src/ruby/ext/grpc/rb_event_thread.c +2 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +42 -18
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +80 -44
- data/src/ruby/lib/grpc/errors.rb +103 -42
- data/src/ruby/lib/grpc/generic/active_call.rb +2 -3
- data/src/ruby/lib/grpc/generic/client_stub.rb +1 -1
- data/src/ruby/lib/grpc/generic/interceptors.rb +5 -5
- data/src/ruby/lib/grpc/generic/rpc_server.rb +9 -10
- data/src/ruby/lib/grpc/generic/service.rb +5 -4
- data/src/ruby/lib/grpc/structs.rb +1 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/generate_proto_ruby.sh +5 -3
- data/src/ruby/pb/grpc/health/v1/health_services_pb.rb +2 -2
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +51 -0
- data/src/ruby/pb/src/proto/grpc/testing/test_services_pb.rb +61 -11
- data/src/ruby/spec/channel_credentials_spec.rb +10 -0
- data/src/ruby/spec/debug_message_spec.rb +134 -0
- data/src/ruby/spec/generic/active_call_spec.rb +19 -8
- data/src/ruby/spec/generic/service_spec.rb +2 -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 +7 -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 +29 -7
- data/src/ruby/spec/support/services.rb +10 -4
- data/src/ruby/spec/testdata/ca.pem +18 -13
- data/src/ruby/spec/testdata/client.key +26 -14
- data/src/ruby/spec/testdata/client.pem +18 -12
- data/src/ruby/spec/testdata/server1.key +26 -14
- data/src/ruby/spec/testdata/server1.pem +20 -14
- data/src/ruby/spec/user_agent_spec.rb +74 -0
- data/third_party/abseil-cpp/absl/algorithm/container.h +1764 -0
- data/third_party/abseil-cpp/absl/base/attributes.h +99 -38
- data/third_party/abseil-cpp/absl/base/call_once.h +1 -1
- data/third_party/abseil-cpp/absl/base/casts.h +9 -6
- data/third_party/abseil-cpp/absl/base/config.h +60 -17
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +428 -335
- data/third_party/abseil-cpp/absl/base/internal/bits.h +17 -16
- data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +166 -0
- data/third_party/abseil-cpp/absl/base/internal/dynamic_annotations.h +398 -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/invoke.h +4 -4
- 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 +29 -1
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +2 -2
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +7 -5
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +25 -38
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +19 -25
- data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +8 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +28 -5
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.h +8 -0
- data/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h +3 -1
- data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +2 -2
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +3 -3
- data/third_party/abseil-cpp/absl/base/macros.h +36 -109
- data/third_party/abseil-cpp/absl/base/optimization.h +61 -1
- data/third_party/abseil-cpp/absl/base/options.h +31 -4
- data/third_party/abseil-cpp/absl/base/policy_checks.h +1 -1
- data/third_party/abseil-cpp/absl/base/thread_annotations.h +94 -39
- 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/flat_hash_set.h +504 -0
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +33 -36
- data/third_party/abseil-cpp/absl/container/internal/common.h +206 -0
- data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +33 -8
- 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 +270 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +321 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc +30 -0
- data/third_party/abseil-cpp/absl/container/internal/have_sse.h +50 -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 +48 -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 +1945 -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 +196 -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 +89 -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 +248 -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 +149 -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 +346 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.h +96 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +55 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +996 -0
- data/third_party/abseil-cpp/absl/memory/memory.h +4 -0
- data/third_party/abseil-cpp/absl/meta/type_traits.h +2 -8
- data/third_party/abseil-cpp/absl/numeric/int128.cc +13 -27
- data/third_party/abseil-cpp/absl/numeric/int128.h +16 -15
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +51 -0
- data/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +399 -0
- data/third_party/abseil-cpp/absl/status/status.cc +445 -0
- data/third_party/abseil-cpp/absl/status/status.h +817 -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/charconv.cc +2 -2
- data/third_party/abseil-cpp/absl/strings/cord.cc +1998 -0
- data/third_party/abseil-cpp/absl/strings/cord.h +1276 -0
- data/third_party/abseil-cpp/absl/strings/escaping.cc +9 -9
- data/third_party/abseil-cpp/absl/strings/internal/char_map.h +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h +2 -2
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +2 -2
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +173 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +222 -136
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +136 -64
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +14 -21
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +7 -14
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +31 -7
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +147 -135
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +999 -87
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +3 -3
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +4 -12
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +8 -6
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +13 -11
- data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +2 -2
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +4 -4
- data/third_party/abseil-cpp/absl/strings/str_cat.h +1 -1
- data/third_party/abseil-cpp/absl/strings/str_format.h +289 -13
- data/third_party/abseil-cpp/absl/strings/str_split.cc +2 -2
- data/third_party/abseil-cpp/absl/strings/str_split.h +1 -0
- data/third_party/abseil-cpp/absl/strings/string_view.h +26 -19
- data/third_party/abseil-cpp/absl/strings/substitute.cc +5 -5
- data/third_party/abseil-cpp/absl/strings/substitute.h +32 -29
- 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/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 +155 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.inc +249 -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 +492 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +159 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +2739 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +1065 -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 +569 -0
- data/third_party/abseil-cpp/absl/time/clock.h +74 -0
- data/third_party/abseil-cpp/absl/time/duration.cc +953 -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 +632 -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 +309 -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 +499 -0
- data/third_party/abseil-cpp/absl/time/time.h +1583 -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/variant.h +1646 -0
- data/third_party/abseil-cpp/absl/types/optional.h +9 -9
- data/third_party/abseil-cpp/absl/types/span.h +49 -36
- data/third_party/abseil-cpp/absl/types/variant.h +861 -0
- data/third_party/abseil-cpp/absl/utility/utility.h +2 -2
- data/third_party/address_sorting/include/address_sorting/address_sorting.h +2 -0
- data/third_party/boringssl-with-bazel/err_data.c +759 -707
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c +6 -6
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_enum.c +5 -5
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_int.c +6 -6
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c +6 -13
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_octet.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_time.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_type.c +5 -3
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c +15 -20
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_locl.h +30 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_enum.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_int.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_string.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c +28 -79
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c +39 -85
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c +5 -16
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c +10 -61
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket_helper.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/blake2/blake2.c +158 -0
- data/third_party/boringssl-with-bazel/src/crypto/bn_extra/bn_asn1.c +3 -10
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/ber.c +8 -9
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c +60 -45
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/derive_key.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_chacha20poly1305.c +6 -81
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/internal.h +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/tls_cbc.c +1 -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 +7 -5
- data/third_party/boringssl-with-bazel/src/crypto/cpu-intel.c +13 -4
- data/third_party/boringssl-with-bazel/src/crypto/crypto.c +11 -0
- data/third_party/boringssl-with-bazel/src/{third_party/fiat → crypto/curve25519}/curve25519.c +18 -26
- data/third_party/boringssl-with-bazel/src/{third_party/fiat → crypto/curve25519}/curve25519_tables.h +13 -21
- data/third_party/boringssl-with-bazel/src/{third_party/fiat → crypto/curve25519}/internal.h +14 -22
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/{dh → dh_extra}/dh_asn1.c +0 -0
- data/third_party/boringssl-with-bazel/src/crypto/{dh → dh_extra}/params.c +179 -0
- data/third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c +25 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c +19 -43
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c +55 -4
- 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 +2 -17
- 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 +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/err/err.c +33 -32
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c +159 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_dsa_asn1.c +6 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_nohw.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/mode_wrappers.c +17 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.c +5 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bn.c +13 -20
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div.c +2 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/exponentiation.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h +34 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery.c +8 -8
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/mul.c +30 -154
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c +173 -35
- data/third_party/boringssl-with-bazel/src/crypto/{dh → fipsmodule/dh}/check.c +0 -0
- data/third_party/boringssl-with-bazel/src/crypto/{dh → fipsmodule/dh}/dh.c +149 -211
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digests.c +16 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec.c +301 -117
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_key.c +22 -28
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_montgomery.c +96 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/felem.c +25 -7
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h +434 -161
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/oct.c +63 -71
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p224-64.c +18 -25
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64-table.h +9481 -9485
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64.c +104 -122
- 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 +90 -11
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple.c +125 -148
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple_mul.c +189 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/util.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/wnaf.c +61 -18
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdh/ecdh.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa.c +20 -5
- 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 +69 -5
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c +155 -50
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/urandom.c +24 -121
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/blinding.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/internal.h +5 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +73 -40
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +122 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c +217 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha512.c +44 -35
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +532 -0
- data/third_party/boringssl-with-bazel/src/crypto/hpke/internal.h +246 -0
- data/third_party/boringssl-with-bazel/src/crypto/mem.c +47 -16
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj_dat.h +15 -1
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/internal.h +7 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c +36 -5
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305.c +10 -7
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_arm.c +13 -11
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c +6 -10
- 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 +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c +16 -0
- data/third_party/boringssl-with-bazel/src/crypto/stack/stack.c +7 -13
- data/third_party/boringssl-with-bazel/src/crypto/thread_pthread.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/thread_win.c +4 -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_strex.c +7 -7
- data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c +10 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.c +4 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c +5 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509.c +0 -67
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c +21 -9
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.c +27 -21
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_r2x.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_req.c +10 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c +89 -11
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c +7 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_txt.c +67 -67
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.c +4 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +62 -44
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c +67 -25
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +13 -11
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +10 -10
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c +38 -17
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_name.c +28 -40
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pkey.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pubkey.c +0 -154
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c +20 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +66 -9
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/ext_dat.h +1 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +5 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c +5 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akey.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c +25 -24
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bitst.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c +32 -28
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_enum.c +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_genn.c +42 -22
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ia5.c +3 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_info.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_lib.c +25 -36
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +126 -40
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_skey.c +7 -7
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +6 -6
- data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +24 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/aes.h +16 -4
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +54 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +662 -556
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1t.h +0 -167
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +19 -7
- data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +4 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/blake2.h +62 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +22 -7
- data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +21 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/crypto.h +10 -5
- data/third_party/boringssl-with-bazel/src/include/openssl/des.h +6 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +82 -20
- data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +11 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dsa.h +16 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ec.h +15 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdsa.h +6 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/err.h +2 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +85 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/nid.h +5 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslconf.h +3 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +202 -134
- data/third_party/boringssl-with-bazel/src/include/openssl/rand.h +6 -17
- data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +31 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/sha.h +26 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/span.h +2 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +335 -112
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +33 -10
- data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +310 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +1141 -755
- data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +1 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +593 -440
- data/third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc +18 -5
- data/third_party/boringssl-with-bazel/src/ssl/d1_both.cc +0 -4
- data/third_party/boringssl-with-bazel/src/ssl/d1_lib.cc +3 -3
- data/third_party/boringssl-with-bazel/src/ssl/dtls_method.cc +13 -4
- data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +181 -57
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +45 -26
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +43 -45
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +32 -10
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +160 -80
- data/third_party/boringssl-with-bazel/src/ssl/s3_both.cc +10 -10
- data/third_party/boringssl-with-bazel/src/ssl/s3_lib.cc +2 -3
- data/third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc +21 -21
- data/third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc +77 -8
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc +7 -6
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +8 -9
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +131 -15
- data/third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc +13 -2
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +50 -15
- data/third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc +6 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +2 -2
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +5 -5
- data/third_party/boringssl-with-bazel/src/ssl/t1_enc.cc +53 -30
- data/third_party/boringssl-with-bazel/src/ssl/t1_lib.cc +611 -89
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +2 -3
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +187 -68
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +71 -90
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +247 -73
- data/third_party/boringssl-with-bazel/src/ssl/tls_method.cc +63 -25
- data/third_party/boringssl-with-bazel/src/ssl/tls_record.cc +5 -3
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_32.h +245 -175
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_64.h +135 -75
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_32.h +1593 -1672
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_64.h +512 -503
- 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 +1279 -0
- data/third_party/re2/re2/dfa.cc +2130 -0
- data/third_party/re2/re2/filtered_re2.cc +121 -0
- data/third_party/re2/re2/filtered_re2.h +109 -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 +2464 -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 +710 -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 +988 -0
- data/third_party/re2/re2/prog.h +436 -0
- data/third_party/re2/re2/re2.cc +1362 -0
- data/third_party/re2/re2/re2.h +1002 -0
- data/third_party/re2/re2/regexp.cc +980 -0
- data/third_party/re2/re2/regexp.h +659 -0
- data/third_party/re2/re2/set.cc +154 -0
- data/third_party/re2/re2/set.h +80 -0
- data/third_party/re2/re2/simplify.cc +657 -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/third_party/wyhash/wyhash.h +145 -0
- data/third_party/upb/upb/decode.c +604 -511
- data/third_party/upb/upb/decode.h +20 -1
- data/third_party/upb/upb/decode.int.h +163 -0
- data/third_party/upb/upb/decode_fast.c +1040 -0
- data/third_party/upb/upb/decode_fast.h +126 -0
- data/third_party/upb/upb/def.c +2178 -0
- data/third_party/upb/upb/def.h +315 -0
- data/third_party/upb/upb/def.hpp +439 -0
- data/third_party/upb/upb/encode.c +311 -211
- data/third_party/upb/upb/encode.h +27 -2
- data/third_party/upb/upb/json_decode.c +1443 -0
- data/third_party/upb/upb/json_decode.h +23 -0
- data/third_party/upb/upb/json_encode.c +713 -0
- data/third_party/upb/upb/json_encode.h +36 -0
- data/third_party/upb/upb/msg.c +215 -70
- data/third_party/upb/upb/msg.h +558 -14
- data/third_party/upb/upb/port_def.inc +105 -63
- data/third_party/upb/upb/port_undef.inc +10 -7
- data/third_party/upb/upb/reflection.c +408 -0
- data/third_party/upb/upb/reflection.h +168 -0
- data/third_party/upb/upb/table.c +73 -269
- data/third_party/upb/upb/table.int.h +25 -57
- data/third_party/upb/upb/text_encode.c +421 -0
- data/third_party/upb/upb/text_encode.h +38 -0
- data/third_party/upb/upb/upb.c +138 -135
- data/third_party/upb/upb/upb.h +119 -146
- data/third_party/upb/upb/upb.hpp +88 -0
- data/third_party/upb/upb/upb.int.h +29 -0
- metadata +646 -164
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +0 -1754
- data/src/core/ext/filters/client_channel/parse_address.cc +0 -237
- data/src/core/ext/filters/client_channel/parse_address.h +0 -53
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +0 -484
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +0 -65
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +0 -359
- data/src/core/ext/filters/client_channel/resolving_lb_policy.h +0 -122
- data/src/core/ext/filters/client_channel/xds/xds_api.cc +0 -1779
- data/src/core/ext/filters/client_channel/xds/xds_api.h +0 -280
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +0 -347
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +0 -87
- data/src/core/ext/filters/client_channel/xds/xds_channel.h +0 -46
- data/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc +0 -104
- data/src/core/ext/filters/client_channel/xds/xds_client.h +0 -274
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +0 -116
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +0 -246
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +0 -905
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +0 -390
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +0 -1411
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +0 -73
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +0 -218
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +0 -34
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h +0 -69
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +0 -54
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +0 -305
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +0 -111
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +0 -328
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +0 -292
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +0 -847
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +0 -95
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +0 -322
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +0 -196
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +0 -642
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +0 -168
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +0 -658
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +0 -35
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h +0 -80
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +0 -132
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +0 -436
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +0 -128
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h +0 -392
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +0 -30
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c +0 -91
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h +0 -240
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +0 -17
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +0 -33
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c +0 -88
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +0 -258
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +0 -111
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h +0 -324
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.c +0 -30
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c +0 -104
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +0 -383
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c +0 -17
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h +0 -33
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +0 -144
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +0 -527
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c +0 -42
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +0 -112
- data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.c +0 -62
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.h +0 -199
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c +0 -17
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h +0 -33
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +0 -793
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +0 -2936
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c +0 -58
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +0 -134
- data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +0 -227
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +0 -725
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c +0 -296
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +0 -1072
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c +0 -32
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +0 -65
- data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c +0 -23
- data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h +0 -50
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c +0 -52
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h +0 -130
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c +0 -47
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +0 -108
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c +0 -52
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +0 -133
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c +0 -87
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +0 -258
- data/src/core/ext/upb-generated/envoy/type/percent.upb.c +0 -38
- data/src/core/ext/upb-generated/envoy/type/percent.upb.h +0 -87
- data/src/core/ext/upb-generated/envoy/type/range.upb.c +0 -49
- data/src/core/ext/upb-generated/envoy/type/range.upb.h +0 -112
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.c +0 -28
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h +0 -62
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c +0 -88
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +0 -249
- data/src/core/ext/upb-generated/gogoproto/gogo.upb.c +0 -17
- data/src/core/lib/gprpp/map.h +0 -59
- data/src/core/lib/gprpp/string_view.h +0 -60
- data/src/core/lib/iomgr/iomgr_posix.h +0 -26
- data/src/core/lib/security/transport/target_authority_table.cc +0 -75
- data/src/core/lib/security/transport/target_authority_table.h +0 -40
- data/src/core/lib/slice/slice_hash_table.h +0 -199
- data/src/core/lib/slice/slice_weak_hash_table.h +0 -102
- data/src/core/tsi/grpc_shadow_boringssl.h +0 -3311
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.cc +0 -129
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pku.c +0 -110
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_sxnet.c +0 -274
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256.c +0 -1063
- data/third_party/upb/upb/generated_util.h +0 -105
- data/third_party/upb/upb/port.c +0 -26
@@ -0,0 +1,1279 @@
|
|
1
|
+
// Copyright 2007 The RE2 Authors. All Rights Reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style
|
3
|
+
// license that can be found in the LICENSE file.
|
4
|
+
|
5
|
+
// Compile regular expression to Prog.
|
6
|
+
//
|
7
|
+
// Prog and Inst are defined in prog.h.
|
8
|
+
// This file's external interface is just Regexp::CompileToProg.
|
9
|
+
// The Compiler class defined in this file is private.
|
10
|
+
|
11
|
+
#include <stdint.h>
|
12
|
+
#include <string.h>
|
13
|
+
#include <unordered_map>
|
14
|
+
#include <utility>
|
15
|
+
|
16
|
+
#include "util/logging.h"
|
17
|
+
#include "util/utf.h"
|
18
|
+
#include "re2/pod_array.h"
|
19
|
+
#include "re2/prog.h"
|
20
|
+
#include "re2/re2.h"
|
21
|
+
#include "re2/regexp.h"
|
22
|
+
#include "re2/walker-inl.h"
|
23
|
+
|
24
|
+
namespace re2 {
|
25
|
+
|
26
|
+
// List of pointers to Inst* that need to be filled in (patched).
|
27
|
+
// Because the Inst* haven't been filled in yet,
|
28
|
+
// we can use the Inst* word to hold the list's "next" pointer.
|
29
|
+
// It's kind of sleazy, but it works well in practice.
|
30
|
+
// See http://swtch.com/~rsc/regexp/regexp1.html for inspiration.
|
31
|
+
//
|
32
|
+
// Because the out and out1 fields in Inst are no longer pointers,
|
33
|
+
// we can't use pointers directly here either. Instead, p refers
|
34
|
+
// to inst_[p>>1].out (p&1 == 0) or inst_[p>>1].out1 (p&1 == 1).
|
35
|
+
// p == 0 represents the NULL list. This is okay because instruction #0
|
36
|
+
// is always the fail instruction, which never appears on a list.
|
37
|
+
|
38
|
+
struct PatchList {
|
39
|
+
uint32_t p;
|
40
|
+
|
41
|
+
// Returns patch list containing just p.
|
42
|
+
static PatchList Mk(uint32_t p);
|
43
|
+
|
44
|
+
// Patches all the entries on l to have value v.
|
45
|
+
// Caller must not ever use patch list again.
|
46
|
+
static void Patch(Prog::Inst *inst0, PatchList l, uint32_t v);
|
47
|
+
|
48
|
+
// Deref returns the next pointer pointed at by p.
|
49
|
+
static PatchList Deref(Prog::Inst *inst0, PatchList l);
|
50
|
+
|
51
|
+
// Appends two patch lists and returns result.
|
52
|
+
static PatchList Append(Prog::Inst *inst0, PatchList l1, PatchList l2);
|
53
|
+
};
|
54
|
+
|
55
|
+
static PatchList nullPatchList = { 0 };
|
56
|
+
|
57
|
+
// Returns patch list containing just p.
|
58
|
+
PatchList PatchList::Mk(uint32_t p) {
|
59
|
+
PatchList l;
|
60
|
+
l.p = p;
|
61
|
+
return l;
|
62
|
+
}
|
63
|
+
|
64
|
+
// Returns the next pointer pointed at by l.
|
65
|
+
PatchList PatchList::Deref(Prog::Inst* inst0, PatchList l) {
|
66
|
+
Prog::Inst* ip = &inst0[l.p>>1];
|
67
|
+
if (l.p&1)
|
68
|
+
l.p = ip->out1();
|
69
|
+
else
|
70
|
+
l.p = ip->out();
|
71
|
+
return l;
|
72
|
+
}
|
73
|
+
|
74
|
+
// Patches all the entries on l to have value v.
|
75
|
+
void PatchList::Patch(Prog::Inst *inst0, PatchList l, uint32_t val) {
|
76
|
+
while (l.p != 0) {
|
77
|
+
Prog::Inst* ip = &inst0[l.p>>1];
|
78
|
+
if (l.p&1) {
|
79
|
+
l.p = ip->out1();
|
80
|
+
ip->out1_ = val;
|
81
|
+
} else {
|
82
|
+
l.p = ip->out();
|
83
|
+
ip->set_out(val);
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
// Appends two patch lists and returns result.
|
89
|
+
PatchList PatchList::Append(Prog::Inst* inst0, PatchList l1, PatchList l2) {
|
90
|
+
if (l1.p == 0)
|
91
|
+
return l2;
|
92
|
+
if (l2.p == 0)
|
93
|
+
return l1;
|
94
|
+
|
95
|
+
PatchList l = l1;
|
96
|
+
for (;;) {
|
97
|
+
PatchList next = PatchList::Deref(inst0, l);
|
98
|
+
if (next.p == 0)
|
99
|
+
break;
|
100
|
+
l = next;
|
101
|
+
}
|
102
|
+
|
103
|
+
Prog::Inst* ip = &inst0[l.p>>1];
|
104
|
+
if (l.p&1)
|
105
|
+
ip->out1_ = l2.p;
|
106
|
+
else
|
107
|
+
ip->set_out(l2.p);
|
108
|
+
|
109
|
+
return l1;
|
110
|
+
}
|
111
|
+
|
112
|
+
// Compiled program fragment.
|
113
|
+
struct Frag {
|
114
|
+
uint32_t begin;
|
115
|
+
PatchList end;
|
116
|
+
|
117
|
+
Frag() : begin(0) { end.p = 0; } // needed so Frag can go in vector
|
118
|
+
Frag(uint32_t begin, PatchList end) : begin(begin), end(end) {}
|
119
|
+
};
|
120
|
+
|
121
|
+
// Input encodings.
|
122
|
+
enum Encoding {
|
123
|
+
kEncodingUTF8 = 1, // UTF-8 (0-10FFFF)
|
124
|
+
kEncodingLatin1, // Latin-1 (0-FF)
|
125
|
+
};
|
126
|
+
|
127
|
+
class Compiler : public Regexp::Walker<Frag> {
|
128
|
+
public:
|
129
|
+
explicit Compiler();
|
130
|
+
~Compiler();
|
131
|
+
|
132
|
+
// Compiles Regexp to a new Prog.
|
133
|
+
// Caller is responsible for deleting Prog when finished with it.
|
134
|
+
// If reversed is true, compiles for walking over the input
|
135
|
+
// string backward (reverses all concatenations).
|
136
|
+
static Prog *Compile(Regexp* re, bool reversed, int64_t max_mem);
|
137
|
+
|
138
|
+
// Compiles alternation of all the re to a new Prog.
|
139
|
+
// Each re has a match with an id equal to its index in the vector.
|
140
|
+
static Prog* CompileSet(Regexp* re, RE2::Anchor anchor, int64_t max_mem);
|
141
|
+
|
142
|
+
// Interface for Regexp::Walker, which helps traverse the Regexp.
|
143
|
+
// The walk is purely post-recursive: given the machines for the
|
144
|
+
// children, PostVisit combines them to create the machine for
|
145
|
+
// the current node. The child_args are Frags.
|
146
|
+
// The Compiler traverses the Regexp parse tree, visiting
|
147
|
+
// each node in depth-first order. It invokes PreVisit before
|
148
|
+
// visiting the node's children and PostVisit after visiting
|
149
|
+
// the children.
|
150
|
+
Frag PreVisit(Regexp* re, Frag parent_arg, bool* stop);
|
151
|
+
Frag PostVisit(Regexp* re, Frag parent_arg, Frag pre_arg, Frag* child_args,
|
152
|
+
int nchild_args);
|
153
|
+
Frag ShortVisit(Regexp* re, Frag parent_arg);
|
154
|
+
Frag Copy(Frag arg);
|
155
|
+
|
156
|
+
// Given fragment a, returns a+ or a+?; a* or a*?; a? or a??
|
157
|
+
Frag Plus(Frag a, bool nongreedy);
|
158
|
+
Frag Star(Frag a, bool nongreedy);
|
159
|
+
Frag Quest(Frag a, bool nongreedy);
|
160
|
+
|
161
|
+
// Given fragment a, returns (a) capturing as \n.
|
162
|
+
Frag Capture(Frag a, int n);
|
163
|
+
|
164
|
+
// Given fragments a and b, returns ab; a|b
|
165
|
+
Frag Cat(Frag a, Frag b);
|
166
|
+
Frag Alt(Frag a, Frag b);
|
167
|
+
|
168
|
+
// Returns a fragment that can't match anything.
|
169
|
+
Frag NoMatch();
|
170
|
+
|
171
|
+
// Returns a fragment that matches the empty string.
|
172
|
+
Frag Match(int32_t id);
|
173
|
+
|
174
|
+
// Returns a no-op fragment.
|
175
|
+
Frag Nop();
|
176
|
+
|
177
|
+
// Returns a fragment matching the byte range lo-hi.
|
178
|
+
Frag ByteRange(int lo, int hi, bool foldcase);
|
179
|
+
|
180
|
+
// Returns a fragment matching an empty-width special op.
|
181
|
+
Frag EmptyWidth(EmptyOp op);
|
182
|
+
|
183
|
+
// Adds n instructions to the program.
|
184
|
+
// Returns the index of the first one.
|
185
|
+
// Returns -1 if no more instructions are available.
|
186
|
+
int AllocInst(int n);
|
187
|
+
|
188
|
+
// Rune range compiler.
|
189
|
+
|
190
|
+
// Begins a new alternation.
|
191
|
+
void BeginRange();
|
192
|
+
|
193
|
+
// Adds a fragment matching the rune range lo-hi.
|
194
|
+
void AddRuneRange(Rune lo, Rune hi, bool foldcase);
|
195
|
+
void AddRuneRangeLatin1(Rune lo, Rune hi, bool foldcase);
|
196
|
+
void AddRuneRangeUTF8(Rune lo, Rune hi, bool foldcase);
|
197
|
+
void Add_80_10ffff();
|
198
|
+
|
199
|
+
// New suffix that matches the byte range lo-hi, then goes to next.
|
200
|
+
int UncachedRuneByteSuffix(uint8_t lo, uint8_t hi, bool foldcase, int next);
|
201
|
+
int CachedRuneByteSuffix(uint8_t lo, uint8_t hi, bool foldcase, int next);
|
202
|
+
|
203
|
+
// Returns true iff the suffix is cached.
|
204
|
+
bool IsCachedRuneByteSuffix(int id);
|
205
|
+
|
206
|
+
// Adds a suffix to alternation.
|
207
|
+
void AddSuffix(int id);
|
208
|
+
|
209
|
+
// Adds a suffix to the trie starting from the given root node.
|
210
|
+
// Returns zero iff allocating an instruction fails. Otherwise, returns
|
211
|
+
// the current root node, which might be different from what was given.
|
212
|
+
int AddSuffixRecursive(int root, int id);
|
213
|
+
|
214
|
+
// Finds the trie node for the given suffix. Returns a Frag in order to
|
215
|
+
// distinguish between pointing at the root node directly (end.p == 0)
|
216
|
+
// and pointing at an Alt's out1 or out (end.p&1 == 1 or 0, respectively).
|
217
|
+
Frag FindByteRange(int root, int id);
|
218
|
+
|
219
|
+
// Compares two ByteRanges and returns true iff they are equal.
|
220
|
+
bool ByteRangeEqual(int id1, int id2);
|
221
|
+
|
222
|
+
// Returns the alternation of all the added suffixes.
|
223
|
+
Frag EndRange();
|
224
|
+
|
225
|
+
// Single rune.
|
226
|
+
Frag Literal(Rune r, bool foldcase);
|
227
|
+
|
228
|
+
void Setup(Regexp::ParseFlags flags, int64_t max_mem, RE2::Anchor anchor);
|
229
|
+
Prog* Finish(Regexp* re);
|
230
|
+
|
231
|
+
// Returns .* where dot = any byte
|
232
|
+
Frag DotStar();
|
233
|
+
|
234
|
+
private:
|
235
|
+
Prog* prog_; // Program being built.
|
236
|
+
bool failed_; // Did we give up compiling?
|
237
|
+
Encoding encoding_; // Input encoding
|
238
|
+
bool reversed_; // Should program run backward over text?
|
239
|
+
|
240
|
+
PODArray<Prog::Inst> inst_;
|
241
|
+
int ninst_; // Number of instructions used.
|
242
|
+
int max_ninst_; // Maximum number of instructions.
|
243
|
+
|
244
|
+
int64_t max_mem_; // Total memory budget.
|
245
|
+
|
246
|
+
std::unordered_map<uint64_t, int> rune_cache_;
|
247
|
+
Frag rune_range_;
|
248
|
+
|
249
|
+
RE2::Anchor anchor_; // anchor mode for RE2::Set
|
250
|
+
|
251
|
+
Compiler(const Compiler&) = delete;
|
252
|
+
Compiler& operator=(const Compiler&) = delete;
|
253
|
+
};
|
254
|
+
|
255
|
+
Compiler::Compiler() {
|
256
|
+
prog_ = new Prog();
|
257
|
+
failed_ = false;
|
258
|
+
encoding_ = kEncodingUTF8;
|
259
|
+
reversed_ = false;
|
260
|
+
ninst_ = 0;
|
261
|
+
max_ninst_ = 1; // make AllocInst for fail instruction okay
|
262
|
+
max_mem_ = 0;
|
263
|
+
int fail = AllocInst(1);
|
264
|
+
inst_[fail].InitFail();
|
265
|
+
max_ninst_ = 0; // Caller must change
|
266
|
+
}
|
267
|
+
|
268
|
+
Compiler::~Compiler() {
|
269
|
+
delete prog_;
|
270
|
+
}
|
271
|
+
|
272
|
+
int Compiler::AllocInst(int n) {
|
273
|
+
if (failed_ || ninst_ + n > max_ninst_) {
|
274
|
+
failed_ = true;
|
275
|
+
return -1;
|
276
|
+
}
|
277
|
+
|
278
|
+
if (ninst_ + n > inst_.size()) {
|
279
|
+
int cap = inst_.size();
|
280
|
+
if (cap == 0)
|
281
|
+
cap = 8;
|
282
|
+
while (ninst_ + n > cap)
|
283
|
+
cap *= 2;
|
284
|
+
PODArray<Prog::Inst> inst(cap);
|
285
|
+
if (inst_.data() != NULL)
|
286
|
+
memmove(inst.data(), inst_.data(), ninst_*sizeof inst_[0]);
|
287
|
+
memset(inst.data() + ninst_, 0, (cap - ninst_)*sizeof inst_[0]);
|
288
|
+
inst_ = std::move(inst);
|
289
|
+
}
|
290
|
+
int id = ninst_;
|
291
|
+
ninst_ += n;
|
292
|
+
return id;
|
293
|
+
}
|
294
|
+
|
295
|
+
// These routines are somewhat hard to visualize in text --
|
296
|
+
// see http://swtch.com/~rsc/regexp/regexp1.html for
|
297
|
+
// pictures explaining what is going on here.
|
298
|
+
|
299
|
+
// Returns an unmatchable fragment.
|
300
|
+
Frag Compiler::NoMatch() {
|
301
|
+
return Frag(0, nullPatchList);
|
302
|
+
}
|
303
|
+
|
304
|
+
// Is a an unmatchable fragment?
|
305
|
+
static bool IsNoMatch(Frag a) {
|
306
|
+
return a.begin == 0;
|
307
|
+
}
|
308
|
+
|
309
|
+
// Given fragments a and b, returns fragment for ab.
|
310
|
+
Frag Compiler::Cat(Frag a, Frag b) {
|
311
|
+
if (IsNoMatch(a) || IsNoMatch(b))
|
312
|
+
return NoMatch();
|
313
|
+
|
314
|
+
// Elide no-op.
|
315
|
+
Prog::Inst* begin = &inst_[a.begin];
|
316
|
+
if (begin->opcode() == kInstNop &&
|
317
|
+
a.end.p == (a.begin << 1) &&
|
318
|
+
begin->out() == 0) {
|
319
|
+
// in case refs to a somewhere
|
320
|
+
PatchList::Patch(inst_.data(), a.end, b.begin);
|
321
|
+
return b;
|
322
|
+
}
|
323
|
+
|
324
|
+
// To run backward over string, reverse all concatenations.
|
325
|
+
if (reversed_) {
|
326
|
+
PatchList::Patch(inst_.data(), b.end, a.begin);
|
327
|
+
return Frag(b.begin, a.end);
|
328
|
+
}
|
329
|
+
|
330
|
+
PatchList::Patch(inst_.data(), a.end, b.begin);
|
331
|
+
return Frag(a.begin, b.end);
|
332
|
+
}
|
333
|
+
|
334
|
+
// Given fragments for a and b, returns fragment for a|b.
|
335
|
+
Frag Compiler::Alt(Frag a, Frag b) {
|
336
|
+
// Special case for convenience in loops.
|
337
|
+
if (IsNoMatch(a))
|
338
|
+
return b;
|
339
|
+
if (IsNoMatch(b))
|
340
|
+
return a;
|
341
|
+
|
342
|
+
int id = AllocInst(1);
|
343
|
+
if (id < 0)
|
344
|
+
return NoMatch();
|
345
|
+
|
346
|
+
inst_[id].InitAlt(a.begin, b.begin);
|
347
|
+
return Frag(id, PatchList::Append(inst_.data(), a.end, b.end));
|
348
|
+
}
|
349
|
+
|
350
|
+
// When capturing submatches in like-Perl mode, a kOpAlt Inst
|
351
|
+
// treats out_ as the first choice, out1_ as the second.
|
352
|
+
//
|
353
|
+
// For *, +, and ?, if out_ causes another repetition,
|
354
|
+
// then the operator is greedy. If out1_ is the repetition
|
355
|
+
// (and out_ moves forward), then the operator is non-greedy.
|
356
|
+
|
357
|
+
// Given a fragment a, returns a fragment for a* or a*? (if nongreedy)
|
358
|
+
Frag Compiler::Star(Frag a, bool nongreedy) {
|
359
|
+
int id = AllocInst(1);
|
360
|
+
if (id < 0)
|
361
|
+
return NoMatch();
|
362
|
+
inst_[id].InitAlt(0, 0);
|
363
|
+
PatchList::Patch(inst_.data(), a.end, id);
|
364
|
+
if (nongreedy) {
|
365
|
+
inst_[id].out1_ = a.begin;
|
366
|
+
return Frag(id, PatchList::Mk(id << 1));
|
367
|
+
} else {
|
368
|
+
inst_[id].set_out(a.begin);
|
369
|
+
return Frag(id, PatchList::Mk((id << 1) | 1));
|
370
|
+
}
|
371
|
+
}
|
372
|
+
|
373
|
+
// Given a fragment for a, returns a fragment for a+ or a+? (if nongreedy)
|
374
|
+
Frag Compiler::Plus(Frag a, bool nongreedy) {
|
375
|
+
// a+ is just a* with a different entry point.
|
376
|
+
Frag f = Star(a, nongreedy);
|
377
|
+
return Frag(a.begin, f.end);
|
378
|
+
}
|
379
|
+
|
380
|
+
// Given a fragment for a, returns a fragment for a? or a?? (if nongreedy)
|
381
|
+
Frag Compiler::Quest(Frag a, bool nongreedy) {
|
382
|
+
if (IsNoMatch(a))
|
383
|
+
return Nop();
|
384
|
+
int id = AllocInst(1);
|
385
|
+
if (id < 0)
|
386
|
+
return NoMatch();
|
387
|
+
PatchList pl;
|
388
|
+
if (nongreedy) {
|
389
|
+
inst_[id].InitAlt(0, a.begin);
|
390
|
+
pl = PatchList::Mk(id << 1);
|
391
|
+
} else {
|
392
|
+
inst_[id].InitAlt(a.begin, 0);
|
393
|
+
pl = PatchList::Mk((id << 1) | 1);
|
394
|
+
}
|
395
|
+
return Frag(id, PatchList::Append(inst_.data(), pl, a.end));
|
396
|
+
}
|
397
|
+
|
398
|
+
// Returns a fragment for the byte range lo-hi.
|
399
|
+
Frag Compiler::ByteRange(int lo, int hi, bool foldcase) {
|
400
|
+
int id = AllocInst(1);
|
401
|
+
if (id < 0)
|
402
|
+
return NoMatch();
|
403
|
+
inst_[id].InitByteRange(lo, hi, foldcase, 0);
|
404
|
+
return Frag(id, PatchList::Mk(id << 1));
|
405
|
+
}
|
406
|
+
|
407
|
+
// Returns a no-op fragment. Sometimes unavoidable.
|
408
|
+
Frag Compiler::Nop() {
|
409
|
+
int id = AllocInst(1);
|
410
|
+
if (id < 0)
|
411
|
+
return NoMatch();
|
412
|
+
inst_[id].InitNop(0);
|
413
|
+
return Frag(id, PatchList::Mk(id << 1));
|
414
|
+
}
|
415
|
+
|
416
|
+
// Returns a fragment that signals a match.
|
417
|
+
Frag Compiler::Match(int32_t match_id) {
|
418
|
+
int id = AllocInst(1);
|
419
|
+
if (id < 0)
|
420
|
+
return NoMatch();
|
421
|
+
inst_[id].InitMatch(match_id);
|
422
|
+
return Frag(id, nullPatchList);
|
423
|
+
}
|
424
|
+
|
425
|
+
// Returns a fragment matching a particular empty-width op (like ^ or $)
|
426
|
+
Frag Compiler::EmptyWidth(EmptyOp empty) {
|
427
|
+
int id = AllocInst(1);
|
428
|
+
if (id < 0)
|
429
|
+
return NoMatch();
|
430
|
+
inst_[id].InitEmptyWidth(empty, 0);
|
431
|
+
return Frag(id, PatchList::Mk(id << 1));
|
432
|
+
}
|
433
|
+
|
434
|
+
// Given a fragment a, returns a fragment with capturing parens around a.
|
435
|
+
Frag Compiler::Capture(Frag a, int n) {
|
436
|
+
if (IsNoMatch(a))
|
437
|
+
return NoMatch();
|
438
|
+
int id = AllocInst(2);
|
439
|
+
if (id < 0)
|
440
|
+
return NoMatch();
|
441
|
+
inst_[id].InitCapture(2*n, a.begin);
|
442
|
+
inst_[id+1].InitCapture(2*n+1, 0);
|
443
|
+
PatchList::Patch(inst_.data(), a.end, id+1);
|
444
|
+
|
445
|
+
return Frag(id, PatchList::Mk((id+1) << 1));
|
446
|
+
}
|
447
|
+
|
448
|
+
// A Rune is a name for a Unicode code point.
|
449
|
+
// Returns maximum rune encoded by UTF-8 sequence of length len.
|
450
|
+
static int MaxRune(int len) {
|
451
|
+
int b; // number of Rune bits in len-byte UTF-8 sequence (len < UTFmax)
|
452
|
+
if (len == 1)
|
453
|
+
b = 7;
|
454
|
+
else
|
455
|
+
b = 8-(len+1) + 6*(len-1);
|
456
|
+
return (1<<b) - 1; // maximum Rune for b bits.
|
457
|
+
}
|
458
|
+
|
459
|
+
// The rune range compiler caches common suffix fragments,
|
460
|
+
// which are very common in UTF-8 (e.g., [80-bf]).
|
461
|
+
// The fragment suffixes are identified by their start
|
462
|
+
// instructions. NULL denotes the eventual end match.
|
463
|
+
// The Frag accumulates in rune_range_. Caching common
|
464
|
+
// suffixes reduces the UTF-8 "." from 32 to 24 instructions,
|
465
|
+
// and it reduces the corresponding one-pass NFA from 16 nodes to 8.
|
466
|
+
|
467
|
+
void Compiler::BeginRange() {
|
468
|
+
rune_cache_.clear();
|
469
|
+
rune_range_.begin = 0;
|
470
|
+
rune_range_.end = nullPatchList;
|
471
|
+
}
|
472
|
+
|
473
|
+
int Compiler::UncachedRuneByteSuffix(uint8_t lo, uint8_t hi, bool foldcase,
|
474
|
+
int next) {
|
475
|
+
Frag f = ByteRange(lo, hi, foldcase);
|
476
|
+
if (next != 0) {
|
477
|
+
PatchList::Patch(inst_.data(), f.end, next);
|
478
|
+
} else {
|
479
|
+
rune_range_.end = PatchList::Append(inst_.data(), rune_range_.end, f.end);
|
480
|
+
}
|
481
|
+
return f.begin;
|
482
|
+
}
|
483
|
+
|
484
|
+
static uint64_t MakeRuneCacheKey(uint8_t lo, uint8_t hi, bool foldcase,
|
485
|
+
int next) {
|
486
|
+
return (uint64_t)next << 17 |
|
487
|
+
(uint64_t)lo << 9 |
|
488
|
+
(uint64_t)hi << 1 |
|
489
|
+
(uint64_t)foldcase;
|
490
|
+
}
|
491
|
+
|
492
|
+
int Compiler::CachedRuneByteSuffix(uint8_t lo, uint8_t hi, bool foldcase,
|
493
|
+
int next) {
|
494
|
+
uint64_t key = MakeRuneCacheKey(lo, hi, foldcase, next);
|
495
|
+
std::unordered_map<uint64_t, int>::const_iterator it = rune_cache_.find(key);
|
496
|
+
if (it != rune_cache_.end())
|
497
|
+
return it->second;
|
498
|
+
int id = UncachedRuneByteSuffix(lo, hi, foldcase, next);
|
499
|
+
rune_cache_[key] = id;
|
500
|
+
return id;
|
501
|
+
}
|
502
|
+
|
503
|
+
bool Compiler::IsCachedRuneByteSuffix(int id) {
|
504
|
+
uint8_t lo = inst_[id].lo_;
|
505
|
+
uint8_t hi = inst_[id].hi_;
|
506
|
+
bool foldcase = inst_[id].foldcase() != 0;
|
507
|
+
int next = inst_[id].out();
|
508
|
+
|
509
|
+
uint64_t key = MakeRuneCacheKey(lo, hi, foldcase, next);
|
510
|
+
return rune_cache_.find(key) != rune_cache_.end();
|
511
|
+
}
|
512
|
+
|
513
|
+
void Compiler::AddSuffix(int id) {
|
514
|
+
if (failed_)
|
515
|
+
return;
|
516
|
+
|
517
|
+
if (rune_range_.begin == 0) {
|
518
|
+
rune_range_.begin = id;
|
519
|
+
return;
|
520
|
+
}
|
521
|
+
|
522
|
+
if (encoding_ == kEncodingUTF8) {
|
523
|
+
// Build a trie in order to reduce fanout.
|
524
|
+
rune_range_.begin = AddSuffixRecursive(rune_range_.begin, id);
|
525
|
+
return;
|
526
|
+
}
|
527
|
+
|
528
|
+
int alt = AllocInst(1);
|
529
|
+
if (alt < 0) {
|
530
|
+
rune_range_.begin = 0;
|
531
|
+
return;
|
532
|
+
}
|
533
|
+
inst_[alt].InitAlt(rune_range_.begin, id);
|
534
|
+
rune_range_.begin = alt;
|
535
|
+
}
|
536
|
+
|
537
|
+
int Compiler::AddSuffixRecursive(int root, int id) {
|
538
|
+
DCHECK(inst_[root].opcode() == kInstAlt ||
|
539
|
+
inst_[root].opcode() == kInstByteRange);
|
540
|
+
|
541
|
+
Frag f = FindByteRange(root, id);
|
542
|
+
if (IsNoMatch(f)) {
|
543
|
+
int alt = AllocInst(1);
|
544
|
+
if (alt < 0)
|
545
|
+
return 0;
|
546
|
+
inst_[alt].InitAlt(root, id);
|
547
|
+
return alt;
|
548
|
+
}
|
549
|
+
|
550
|
+
int br;
|
551
|
+
if (f.end.p == 0)
|
552
|
+
br = root;
|
553
|
+
else if (f.end.p&1)
|
554
|
+
br = inst_[f.begin].out1();
|
555
|
+
else
|
556
|
+
br = inst_[f.begin].out();
|
557
|
+
|
558
|
+
if (IsCachedRuneByteSuffix(br)) {
|
559
|
+
// We can't fiddle with cached suffixes, so make a clone of the head.
|
560
|
+
int byterange = AllocInst(1);
|
561
|
+
if (byterange < 0)
|
562
|
+
return 0;
|
563
|
+
inst_[byterange].InitByteRange(inst_[br].lo(), inst_[br].hi(),
|
564
|
+
inst_[br].foldcase(), inst_[br].out());
|
565
|
+
|
566
|
+
// Ensure that the parent points to the clone, not to the original.
|
567
|
+
// Note that this could leave the head unreachable except via the cache.
|
568
|
+
br = byterange;
|
569
|
+
if (f.end.p == 0)
|
570
|
+
root = br;
|
571
|
+
else if (f.end.p&1)
|
572
|
+
inst_[f.begin].out1_ = br;
|
573
|
+
else
|
574
|
+
inst_[f.begin].set_out(br);
|
575
|
+
}
|
576
|
+
|
577
|
+
int out = inst_[id].out();
|
578
|
+
if (!IsCachedRuneByteSuffix(id)) {
|
579
|
+
// The head should be the instruction most recently allocated, so free it
|
580
|
+
// instead of leaving it unreachable.
|
581
|
+
DCHECK_EQ(id, ninst_-1);
|
582
|
+
inst_[id].out_opcode_ = 0;
|
583
|
+
inst_[id].out1_ = 0;
|
584
|
+
ninst_--;
|
585
|
+
}
|
586
|
+
|
587
|
+
out = AddSuffixRecursive(inst_[br].out(), out);
|
588
|
+
if (out == 0)
|
589
|
+
return 0;
|
590
|
+
|
591
|
+
inst_[br].set_out(out);
|
592
|
+
return root;
|
593
|
+
}
|
594
|
+
|
595
|
+
bool Compiler::ByteRangeEqual(int id1, int id2) {
|
596
|
+
return inst_[id1].lo() == inst_[id2].lo() &&
|
597
|
+
inst_[id1].hi() == inst_[id2].hi() &&
|
598
|
+
inst_[id1].foldcase() == inst_[id2].foldcase();
|
599
|
+
}
|
600
|
+
|
601
|
+
Frag Compiler::FindByteRange(int root, int id) {
|
602
|
+
if (inst_[root].opcode() == kInstByteRange) {
|
603
|
+
if (ByteRangeEqual(root, id))
|
604
|
+
return Frag(root, nullPatchList);
|
605
|
+
else
|
606
|
+
return NoMatch();
|
607
|
+
}
|
608
|
+
|
609
|
+
while (inst_[root].opcode() == kInstAlt) {
|
610
|
+
int out1 = inst_[root].out1();
|
611
|
+
if (ByteRangeEqual(out1, id))
|
612
|
+
return Frag(root, PatchList::Mk((root << 1) | 1));
|
613
|
+
|
614
|
+
// CharClass is a sorted list of ranges, so if out1 of the root Alt wasn't
|
615
|
+
// what we're looking for, then we can stop immediately. Unfortunately, we
|
616
|
+
// can't short-circuit the search in reverse mode.
|
617
|
+
if (!reversed_)
|
618
|
+
return NoMatch();
|
619
|
+
|
620
|
+
int out = inst_[root].out();
|
621
|
+
if (inst_[out].opcode() == kInstAlt)
|
622
|
+
root = out;
|
623
|
+
else if (ByteRangeEqual(out, id))
|
624
|
+
return Frag(root, PatchList::Mk(root << 1));
|
625
|
+
else
|
626
|
+
return NoMatch();
|
627
|
+
}
|
628
|
+
|
629
|
+
LOG(DFATAL) << "should never happen";
|
630
|
+
return NoMatch();
|
631
|
+
}
|
632
|
+
|
633
|
+
Frag Compiler::EndRange() {
|
634
|
+
return rune_range_;
|
635
|
+
}
|
636
|
+
|
637
|
+
// Converts rune range lo-hi into a fragment that recognizes
|
638
|
+
// the bytes that would make up those runes in the current
|
639
|
+
// encoding (Latin 1 or UTF-8).
|
640
|
+
// This lets the machine work byte-by-byte even when
|
641
|
+
// using multibyte encodings.
|
642
|
+
|
643
|
+
void Compiler::AddRuneRange(Rune lo, Rune hi, bool foldcase) {
|
644
|
+
switch (encoding_) {
|
645
|
+
default:
|
646
|
+
case kEncodingUTF8:
|
647
|
+
AddRuneRangeUTF8(lo, hi, foldcase);
|
648
|
+
break;
|
649
|
+
case kEncodingLatin1:
|
650
|
+
AddRuneRangeLatin1(lo, hi, foldcase);
|
651
|
+
break;
|
652
|
+
}
|
653
|
+
}
|
654
|
+
|
655
|
+
void Compiler::AddRuneRangeLatin1(Rune lo, Rune hi, bool foldcase) {
|
656
|
+
// Latin-1 is easy: runes *are* bytes.
|
657
|
+
if (lo > hi || lo > 0xFF)
|
658
|
+
return;
|
659
|
+
if (hi > 0xFF)
|
660
|
+
hi = 0xFF;
|
661
|
+
AddSuffix(UncachedRuneByteSuffix(static_cast<uint8_t>(lo),
|
662
|
+
static_cast<uint8_t>(hi), foldcase, 0));
|
663
|
+
}
|
664
|
+
|
665
|
+
void Compiler::Add_80_10ffff() {
|
666
|
+
// The 80-10FFFF (Runeself-Runemax) rune range occurs frequently enough
|
667
|
+
// (for example, for /./ and /[^a-z]/) that it is worth simplifying: by
|
668
|
+
// permitting overlong encodings in E0 and F0 sequences and code points
|
669
|
+
// over 10FFFF in F4 sequences, the size of the bytecode and the number
|
670
|
+
// of equivalence classes are reduced significantly.
|
671
|
+
int id;
|
672
|
+
if (reversed_) {
|
673
|
+
// Prefix factoring matters, but we don't have to handle it here
|
674
|
+
// because the rune range trie logic takes care of that already.
|
675
|
+
id = UncachedRuneByteSuffix(0xC2, 0xDF, false, 0);
|
676
|
+
id = UncachedRuneByteSuffix(0x80, 0xBF, false, id);
|
677
|
+
AddSuffix(id);
|
678
|
+
|
679
|
+
id = UncachedRuneByteSuffix(0xE0, 0xEF, false, 0);
|
680
|
+
id = UncachedRuneByteSuffix(0x80, 0xBF, false, id);
|
681
|
+
id = UncachedRuneByteSuffix(0x80, 0xBF, false, id);
|
682
|
+
AddSuffix(id);
|
683
|
+
|
684
|
+
id = UncachedRuneByteSuffix(0xF0, 0xF4, false, 0);
|
685
|
+
id = UncachedRuneByteSuffix(0x80, 0xBF, false, id);
|
686
|
+
id = UncachedRuneByteSuffix(0x80, 0xBF, false, id);
|
687
|
+
id = UncachedRuneByteSuffix(0x80, 0xBF, false, id);
|
688
|
+
AddSuffix(id);
|
689
|
+
} else {
|
690
|
+
// Suffix factoring matters - and we do have to handle it here.
|
691
|
+
int cont1 = UncachedRuneByteSuffix(0x80, 0xBF, false, 0);
|
692
|
+
id = UncachedRuneByteSuffix(0xC2, 0xDF, false, cont1);
|
693
|
+
AddSuffix(id);
|
694
|
+
|
695
|
+
int cont2 = UncachedRuneByteSuffix(0x80, 0xBF, false, cont1);
|
696
|
+
id = UncachedRuneByteSuffix(0xE0, 0xEF, false, cont2);
|
697
|
+
AddSuffix(id);
|
698
|
+
|
699
|
+
int cont3 = UncachedRuneByteSuffix(0x80, 0xBF, false, cont2);
|
700
|
+
id = UncachedRuneByteSuffix(0xF0, 0xF4, false, cont3);
|
701
|
+
AddSuffix(id);
|
702
|
+
}
|
703
|
+
}
|
704
|
+
|
705
|
+
void Compiler::AddRuneRangeUTF8(Rune lo, Rune hi, bool foldcase) {
|
706
|
+
if (lo > hi)
|
707
|
+
return;
|
708
|
+
|
709
|
+
// Pick off 80-10FFFF as a common special case.
|
710
|
+
if (lo == 0x80 && hi == 0x10ffff) {
|
711
|
+
Add_80_10ffff();
|
712
|
+
return;
|
713
|
+
}
|
714
|
+
|
715
|
+
// Split range into same-length sized ranges.
|
716
|
+
for (int i = 1; i < UTFmax; i++) {
|
717
|
+
Rune max = MaxRune(i);
|
718
|
+
if (lo <= max && max < hi) {
|
719
|
+
AddRuneRangeUTF8(lo, max, foldcase);
|
720
|
+
AddRuneRangeUTF8(max+1, hi, foldcase);
|
721
|
+
return;
|
722
|
+
}
|
723
|
+
}
|
724
|
+
|
725
|
+
// ASCII range is always a special case.
|
726
|
+
if (hi < Runeself) {
|
727
|
+
AddSuffix(UncachedRuneByteSuffix(static_cast<uint8_t>(lo),
|
728
|
+
static_cast<uint8_t>(hi), foldcase, 0));
|
729
|
+
return;
|
730
|
+
}
|
731
|
+
|
732
|
+
// Split range into sections that agree on leading bytes.
|
733
|
+
for (int i = 1; i < UTFmax; i++) {
|
734
|
+
uint32_t m = (1<<(6*i)) - 1; // last i bytes of a UTF-8 sequence
|
735
|
+
if ((lo & ~m) != (hi & ~m)) {
|
736
|
+
if ((lo & m) != 0) {
|
737
|
+
AddRuneRangeUTF8(lo, lo|m, foldcase);
|
738
|
+
AddRuneRangeUTF8((lo|m)+1, hi, foldcase);
|
739
|
+
return;
|
740
|
+
}
|
741
|
+
if ((hi & m) != m) {
|
742
|
+
AddRuneRangeUTF8(lo, (hi&~m)-1, foldcase);
|
743
|
+
AddRuneRangeUTF8(hi&~m, hi, foldcase);
|
744
|
+
return;
|
745
|
+
}
|
746
|
+
}
|
747
|
+
}
|
748
|
+
|
749
|
+
// Finally. Generate byte matching equivalent for lo-hi.
|
750
|
+
uint8_t ulo[UTFmax], uhi[UTFmax];
|
751
|
+
int n = runetochar(reinterpret_cast<char*>(ulo), &lo);
|
752
|
+
int m = runetochar(reinterpret_cast<char*>(uhi), &hi);
|
753
|
+
(void)m; // USED(m)
|
754
|
+
DCHECK_EQ(n, m);
|
755
|
+
|
756
|
+
// The logic below encodes this thinking:
|
757
|
+
//
|
758
|
+
// 1. When we have built the whole suffix, we know that it cannot
|
759
|
+
// possibly be a suffix of anything longer: in forward mode, nothing
|
760
|
+
// else can occur before the leading byte; in reverse mode, nothing
|
761
|
+
// else can occur after the last continuation byte or else the leading
|
762
|
+
// byte would have to change. Thus, there is no benefit to caching
|
763
|
+
// the first byte of the suffix whereas there is a cost involved in
|
764
|
+
// cloning it if it begins a common prefix, which is fairly likely.
|
765
|
+
//
|
766
|
+
// 2. Conversely, the last byte of the suffix cannot possibly be a
|
767
|
+
// prefix of anything because next == 0, so we will never want to
|
768
|
+
// clone it, but it is fairly likely to be a common suffix. Perhaps
|
769
|
+
// more so in reverse mode than in forward mode because the former is
|
770
|
+
// "converging" towards lower entropy, but caching is still worthwhile
|
771
|
+
// for the latter in cases such as 80-BF.
|
772
|
+
//
|
773
|
+
// 3. Handling the bytes between the first and the last is less
|
774
|
+
// straightforward and, again, the approach depends on whether we are
|
775
|
+
// "converging" towards lower entropy: in forward mode, a single byte
|
776
|
+
// is unlikely to be part of a common suffix whereas a byte range
|
777
|
+
// is more likely so; in reverse mode, a byte range is unlikely to
|
778
|
+
// be part of a common suffix whereas a single byte is more likely
|
779
|
+
// so. The same benefit versus cost argument applies here.
|
780
|
+
int id = 0;
|
781
|
+
if (reversed_) {
|
782
|
+
for (int i = 0; i < n; i++) {
|
783
|
+
// In reverse UTF-8 mode: cache the leading byte; don't cache the last
|
784
|
+
// continuation byte; cache anything else iff it's a single byte (XX-XX).
|
785
|
+
if (i == 0 || (ulo[i] == uhi[i] && i != n-1))
|
786
|
+
id = CachedRuneByteSuffix(ulo[i], uhi[i], false, id);
|
787
|
+
else
|
788
|
+
id = UncachedRuneByteSuffix(ulo[i], uhi[i], false, id);
|
789
|
+
}
|
790
|
+
} else {
|
791
|
+
for (int i = n-1; i >= 0; i--) {
|
792
|
+
// In forward UTF-8 mode: don't cache the leading byte; cache the last
|
793
|
+
// continuation byte; cache anything else iff it's a byte range (XX-YY).
|
794
|
+
if (i == n-1 || (ulo[i] < uhi[i] && i != 0))
|
795
|
+
id = CachedRuneByteSuffix(ulo[i], uhi[i], false, id);
|
796
|
+
else
|
797
|
+
id = UncachedRuneByteSuffix(ulo[i], uhi[i], false, id);
|
798
|
+
}
|
799
|
+
}
|
800
|
+
AddSuffix(id);
|
801
|
+
}
|
802
|
+
|
803
|
+
// Should not be called.
|
804
|
+
Frag Compiler::Copy(Frag arg) {
|
805
|
+
// We're using WalkExponential; there should be no copying.
|
806
|
+
LOG(DFATAL) << "Compiler::Copy called!";
|
807
|
+
failed_ = true;
|
808
|
+
return NoMatch();
|
809
|
+
}
|
810
|
+
|
811
|
+
// Visits a node quickly; called once WalkExponential has
|
812
|
+
// decided to cut this walk short.
|
813
|
+
Frag Compiler::ShortVisit(Regexp* re, Frag) {
|
814
|
+
failed_ = true;
|
815
|
+
return NoMatch();
|
816
|
+
}
|
817
|
+
|
818
|
+
// Called before traversing a node's children during the walk.
|
819
|
+
Frag Compiler::PreVisit(Regexp* re, Frag, bool* stop) {
|
820
|
+
// Cut off walk if we've already failed.
|
821
|
+
if (failed_)
|
822
|
+
*stop = true;
|
823
|
+
|
824
|
+
return Frag(); // not used by caller
|
825
|
+
}
|
826
|
+
|
827
|
+
Frag Compiler::Literal(Rune r, bool foldcase) {
|
828
|
+
switch (encoding_) {
|
829
|
+
default:
|
830
|
+
return Frag();
|
831
|
+
|
832
|
+
case kEncodingLatin1:
|
833
|
+
return ByteRange(r, r, foldcase);
|
834
|
+
|
835
|
+
case kEncodingUTF8: {
|
836
|
+
if (r < Runeself) // Make common case fast.
|
837
|
+
return ByteRange(r, r, foldcase);
|
838
|
+
uint8_t buf[UTFmax];
|
839
|
+
int n = runetochar(reinterpret_cast<char*>(buf), &r);
|
840
|
+
Frag f = ByteRange((uint8_t)buf[0], buf[0], false);
|
841
|
+
for (int i = 1; i < n; i++)
|
842
|
+
f = Cat(f, ByteRange((uint8_t)buf[i], buf[i], false));
|
843
|
+
return f;
|
844
|
+
}
|
845
|
+
}
|
846
|
+
}
|
847
|
+
|
848
|
+
// Called after traversing the node's children during the walk.
|
849
|
+
// Given their frags, build and return the frag for this re.
|
850
|
+
Frag Compiler::PostVisit(Regexp* re, Frag, Frag, Frag* child_frags,
|
851
|
+
int nchild_frags) {
|
852
|
+
// If a child failed, don't bother going forward, especially
|
853
|
+
// since the child_frags might contain Frags with NULLs in them.
|
854
|
+
if (failed_)
|
855
|
+
return NoMatch();
|
856
|
+
|
857
|
+
// Given the child fragments, return the fragment for this node.
|
858
|
+
switch (re->op()) {
|
859
|
+
case kRegexpRepeat:
|
860
|
+
// Should not see; code at bottom of function will print error
|
861
|
+
break;
|
862
|
+
|
863
|
+
case kRegexpNoMatch:
|
864
|
+
return NoMatch();
|
865
|
+
|
866
|
+
case kRegexpEmptyMatch:
|
867
|
+
return Nop();
|
868
|
+
|
869
|
+
case kRegexpHaveMatch: {
|
870
|
+
Frag f = Match(re->match_id());
|
871
|
+
if (anchor_ == RE2::ANCHOR_BOTH) {
|
872
|
+
// Append \z or else the subexpression will effectively be unanchored.
|
873
|
+
// Complemented by the UNANCHORED case in CompileSet().
|
874
|
+
f = Cat(EmptyWidth(kEmptyEndText), f);
|
875
|
+
}
|
876
|
+
return f;
|
877
|
+
}
|
878
|
+
|
879
|
+
case kRegexpConcat: {
|
880
|
+
Frag f = child_frags[0];
|
881
|
+
for (int i = 1; i < nchild_frags; i++)
|
882
|
+
f = Cat(f, child_frags[i]);
|
883
|
+
return f;
|
884
|
+
}
|
885
|
+
|
886
|
+
case kRegexpAlternate: {
|
887
|
+
Frag f = child_frags[0];
|
888
|
+
for (int i = 1; i < nchild_frags; i++)
|
889
|
+
f = Alt(f, child_frags[i]);
|
890
|
+
return f;
|
891
|
+
}
|
892
|
+
|
893
|
+
case kRegexpStar:
|
894
|
+
return Star(child_frags[0], (re->parse_flags()&Regexp::NonGreedy) != 0);
|
895
|
+
|
896
|
+
case kRegexpPlus:
|
897
|
+
return Plus(child_frags[0], (re->parse_flags()&Regexp::NonGreedy) != 0);
|
898
|
+
|
899
|
+
case kRegexpQuest:
|
900
|
+
return Quest(child_frags[0], (re->parse_flags()&Regexp::NonGreedy) != 0);
|
901
|
+
|
902
|
+
case kRegexpLiteral:
|
903
|
+
return Literal(re->rune(), (re->parse_flags()&Regexp::FoldCase) != 0);
|
904
|
+
|
905
|
+
case kRegexpLiteralString: {
|
906
|
+
// Concatenation of literals.
|
907
|
+
if (re->nrunes() == 0)
|
908
|
+
return Nop();
|
909
|
+
Frag f;
|
910
|
+
for (int i = 0; i < re->nrunes(); i++) {
|
911
|
+
Frag f1 = Literal(re->runes()[i],
|
912
|
+
(re->parse_flags()&Regexp::FoldCase) != 0);
|
913
|
+
if (i == 0)
|
914
|
+
f = f1;
|
915
|
+
else
|
916
|
+
f = Cat(f, f1);
|
917
|
+
}
|
918
|
+
return f;
|
919
|
+
}
|
920
|
+
|
921
|
+
case kRegexpAnyChar:
|
922
|
+
BeginRange();
|
923
|
+
AddRuneRange(0, Runemax, false);
|
924
|
+
return EndRange();
|
925
|
+
|
926
|
+
case kRegexpAnyByte:
|
927
|
+
return ByteRange(0x00, 0xFF, false);
|
928
|
+
|
929
|
+
case kRegexpCharClass: {
|
930
|
+
CharClass* cc = re->cc();
|
931
|
+
if (cc->empty()) {
|
932
|
+
// This can't happen.
|
933
|
+
LOG(DFATAL) << "No ranges in char class";
|
934
|
+
failed_ = true;
|
935
|
+
return NoMatch();
|
936
|
+
}
|
937
|
+
|
938
|
+
// ASCII case-folding optimization: if the char class
|
939
|
+
// behaves the same on A-Z as it does on a-z,
|
940
|
+
// discard any ranges wholly contained in A-Z
|
941
|
+
// and mark the other ranges as foldascii.
|
942
|
+
// This reduces the size of a program for
|
943
|
+
// (?i)abc from 3 insts per letter to 1 per letter.
|
944
|
+
bool foldascii = cc->FoldsASCII();
|
945
|
+
|
946
|
+
// Character class is just a big OR of the different
|
947
|
+
// character ranges in the class.
|
948
|
+
BeginRange();
|
949
|
+
for (CharClass::iterator i = cc->begin(); i != cc->end(); ++i) {
|
950
|
+
// ASCII case-folding optimization (see above).
|
951
|
+
if (foldascii && 'A' <= i->lo && i->hi <= 'Z')
|
952
|
+
continue;
|
953
|
+
|
954
|
+
// If this range contains all of A-Za-z or none of it,
|
955
|
+
// the fold flag is unnecessary; don't bother.
|
956
|
+
bool fold = foldascii;
|
957
|
+
if ((i->lo <= 'A' && 'z' <= i->hi) || i->hi < 'A' || 'z' < i->lo ||
|
958
|
+
('Z' < i->lo && i->hi < 'a'))
|
959
|
+
fold = false;
|
960
|
+
|
961
|
+
AddRuneRange(i->lo, i->hi, fold);
|
962
|
+
}
|
963
|
+
return EndRange();
|
964
|
+
}
|
965
|
+
|
966
|
+
case kRegexpCapture:
|
967
|
+
// If this is a non-capturing parenthesis -- (?:foo) --
|
968
|
+
// just use the inner expression.
|
969
|
+
if (re->cap() < 0)
|
970
|
+
return child_frags[0];
|
971
|
+
return Capture(child_frags[0], re->cap());
|
972
|
+
|
973
|
+
case kRegexpBeginLine:
|
974
|
+
return EmptyWidth(reversed_ ? kEmptyEndLine : kEmptyBeginLine);
|
975
|
+
|
976
|
+
case kRegexpEndLine:
|
977
|
+
return EmptyWidth(reversed_ ? kEmptyBeginLine : kEmptyEndLine);
|
978
|
+
|
979
|
+
case kRegexpBeginText:
|
980
|
+
return EmptyWidth(reversed_ ? kEmptyEndText : kEmptyBeginText);
|
981
|
+
|
982
|
+
case kRegexpEndText:
|
983
|
+
return EmptyWidth(reversed_ ? kEmptyBeginText : kEmptyEndText);
|
984
|
+
|
985
|
+
case kRegexpWordBoundary:
|
986
|
+
return EmptyWidth(kEmptyWordBoundary);
|
987
|
+
|
988
|
+
case kRegexpNoWordBoundary:
|
989
|
+
return EmptyWidth(kEmptyNonWordBoundary);
|
990
|
+
}
|
991
|
+
LOG(DFATAL) << "Missing case in Compiler: " << re->op();
|
992
|
+
failed_ = true;
|
993
|
+
return NoMatch();
|
994
|
+
}
|
995
|
+
|
996
|
+
// Is this regexp required to start at the beginning of the text?
|
997
|
+
// Only approximate; can return false for complicated regexps like (\Aa|\Ab),
|
998
|
+
// but handles (\A(a|b)). Could use the Walker to write a more exact one.
|
999
|
+
static bool IsAnchorStart(Regexp** pre, int depth) {
|
1000
|
+
Regexp* re = *pre;
|
1001
|
+
Regexp* sub;
|
1002
|
+
// The depth limit makes sure that we don't overflow
|
1003
|
+
// the stack on a deeply nested regexp. As the comment
|
1004
|
+
// above says, IsAnchorStart is conservative, so returning
|
1005
|
+
// a false negative is okay. The exact limit is somewhat arbitrary.
|
1006
|
+
if (re == NULL || depth >= 4)
|
1007
|
+
return false;
|
1008
|
+
switch (re->op()) {
|
1009
|
+
default:
|
1010
|
+
break;
|
1011
|
+
case kRegexpConcat:
|
1012
|
+
if (re->nsub() > 0) {
|
1013
|
+
sub = re->sub()[0]->Incref();
|
1014
|
+
if (IsAnchorStart(&sub, depth+1)) {
|
1015
|
+
PODArray<Regexp*> subcopy(re->nsub());
|
1016
|
+
subcopy[0] = sub; // already have reference
|
1017
|
+
for (int i = 1; i < re->nsub(); i++)
|
1018
|
+
subcopy[i] = re->sub()[i]->Incref();
|
1019
|
+
*pre = Regexp::Concat(subcopy.data(), re->nsub(), re->parse_flags());
|
1020
|
+
re->Decref();
|
1021
|
+
return true;
|
1022
|
+
}
|
1023
|
+
sub->Decref();
|
1024
|
+
}
|
1025
|
+
break;
|
1026
|
+
case kRegexpCapture:
|
1027
|
+
sub = re->sub()[0]->Incref();
|
1028
|
+
if (IsAnchorStart(&sub, depth+1)) {
|
1029
|
+
*pre = Regexp::Capture(sub, re->parse_flags(), re->cap());
|
1030
|
+
re->Decref();
|
1031
|
+
return true;
|
1032
|
+
}
|
1033
|
+
sub->Decref();
|
1034
|
+
break;
|
1035
|
+
case kRegexpBeginText:
|
1036
|
+
*pre = Regexp::LiteralString(NULL, 0, re->parse_flags());
|
1037
|
+
re->Decref();
|
1038
|
+
return true;
|
1039
|
+
}
|
1040
|
+
return false;
|
1041
|
+
}
|
1042
|
+
|
1043
|
+
// Is this regexp required to start at the end of the text?
|
1044
|
+
// Only approximate; can return false for complicated regexps like (a\z|b\z),
|
1045
|
+
// but handles ((a|b)\z). Could use the Walker to write a more exact one.
|
1046
|
+
static bool IsAnchorEnd(Regexp** pre, int depth) {
|
1047
|
+
Regexp* re = *pre;
|
1048
|
+
Regexp* sub;
|
1049
|
+
// The depth limit makes sure that we don't overflow
|
1050
|
+
// the stack on a deeply nested regexp. As the comment
|
1051
|
+
// above says, IsAnchorEnd is conservative, so returning
|
1052
|
+
// a false negative is okay. The exact limit is somewhat arbitrary.
|
1053
|
+
if (re == NULL || depth >= 4)
|
1054
|
+
return false;
|
1055
|
+
switch (re->op()) {
|
1056
|
+
default:
|
1057
|
+
break;
|
1058
|
+
case kRegexpConcat:
|
1059
|
+
if (re->nsub() > 0) {
|
1060
|
+
sub = re->sub()[re->nsub() - 1]->Incref();
|
1061
|
+
if (IsAnchorEnd(&sub, depth+1)) {
|
1062
|
+
PODArray<Regexp*> subcopy(re->nsub());
|
1063
|
+
subcopy[re->nsub() - 1] = sub; // already have reference
|
1064
|
+
for (int i = 0; i < re->nsub() - 1; i++)
|
1065
|
+
subcopy[i] = re->sub()[i]->Incref();
|
1066
|
+
*pre = Regexp::Concat(subcopy.data(), re->nsub(), re->parse_flags());
|
1067
|
+
re->Decref();
|
1068
|
+
return true;
|
1069
|
+
}
|
1070
|
+
sub->Decref();
|
1071
|
+
}
|
1072
|
+
break;
|
1073
|
+
case kRegexpCapture:
|
1074
|
+
sub = re->sub()[0]->Incref();
|
1075
|
+
if (IsAnchorEnd(&sub, depth+1)) {
|
1076
|
+
*pre = Regexp::Capture(sub, re->parse_flags(), re->cap());
|
1077
|
+
re->Decref();
|
1078
|
+
return true;
|
1079
|
+
}
|
1080
|
+
sub->Decref();
|
1081
|
+
break;
|
1082
|
+
case kRegexpEndText:
|
1083
|
+
*pre = Regexp::LiteralString(NULL, 0, re->parse_flags());
|
1084
|
+
re->Decref();
|
1085
|
+
return true;
|
1086
|
+
}
|
1087
|
+
return false;
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
void Compiler::Setup(Regexp::ParseFlags flags, int64_t max_mem,
|
1091
|
+
RE2::Anchor anchor) {
|
1092
|
+
if (flags & Regexp::Latin1)
|
1093
|
+
encoding_ = kEncodingLatin1;
|
1094
|
+
max_mem_ = max_mem;
|
1095
|
+
if (max_mem <= 0) {
|
1096
|
+
max_ninst_ = 100000; // more than enough
|
1097
|
+
} else if (static_cast<size_t>(max_mem) <= sizeof(Prog)) {
|
1098
|
+
// No room for anything.
|
1099
|
+
max_ninst_ = 0;
|
1100
|
+
} else {
|
1101
|
+
int64_t m = (max_mem - sizeof(Prog)) / sizeof(Prog::Inst);
|
1102
|
+
// Limit instruction count so that inst->id() fits nicely in an int.
|
1103
|
+
// SparseArray also assumes that the indices (inst->id()) are ints.
|
1104
|
+
// The call to WalkExponential uses 2*max_ninst_ below,
|
1105
|
+
// and other places in the code use 2 or 3 * prog->size().
|
1106
|
+
// Limiting to 2^24 should avoid overflow in those places.
|
1107
|
+
// (The point of allowing more than 32 bits of memory is to
|
1108
|
+
// have plenty of room for the DFA states, not to use it up
|
1109
|
+
// on the program.)
|
1110
|
+
if (m >= 1<<24)
|
1111
|
+
m = 1<<24;
|
1112
|
+
// Inst imposes its own limit (currently bigger than 2^24 but be safe).
|
1113
|
+
if (m > Prog::Inst::kMaxInst)
|
1114
|
+
m = Prog::Inst::kMaxInst;
|
1115
|
+
max_ninst_ = static_cast<int>(m);
|
1116
|
+
}
|
1117
|
+
anchor_ = anchor;
|
1118
|
+
}
|
1119
|
+
|
1120
|
+
// Compiles re, returning program.
|
1121
|
+
// Caller is responsible for deleting prog_.
|
1122
|
+
// If reversed is true, compiles a program that expects
|
1123
|
+
// to run over the input string backward (reverses all concatenations).
|
1124
|
+
// The reversed flag is also recorded in the returned program.
|
1125
|
+
Prog* Compiler::Compile(Regexp* re, bool reversed, int64_t max_mem) {
|
1126
|
+
Compiler c;
|
1127
|
+
c.Setup(re->parse_flags(), max_mem, RE2::UNANCHORED /* unused */);
|
1128
|
+
c.reversed_ = reversed;
|
1129
|
+
|
1130
|
+
// Simplify to remove things like counted repetitions
|
1131
|
+
// and character classes like \d.
|
1132
|
+
Regexp* sre = re->Simplify();
|
1133
|
+
if (sre == NULL)
|
1134
|
+
return NULL;
|
1135
|
+
|
1136
|
+
// Record whether prog is anchored, removing the anchors.
|
1137
|
+
// (They get in the way of other optimizations.)
|
1138
|
+
bool is_anchor_start = IsAnchorStart(&sre, 0);
|
1139
|
+
bool is_anchor_end = IsAnchorEnd(&sre, 0);
|
1140
|
+
|
1141
|
+
// Generate fragment for entire regexp.
|
1142
|
+
Frag all = c.WalkExponential(sre, Frag(), 2*c.max_ninst_);
|
1143
|
+
sre->Decref();
|
1144
|
+
if (c.failed_)
|
1145
|
+
return NULL;
|
1146
|
+
|
1147
|
+
// Success! Finish by putting Match node at end, and record start.
|
1148
|
+
// Turn off c.reversed_ (if it is set) to force the remaining concatenations
|
1149
|
+
// to behave normally.
|
1150
|
+
c.reversed_ = false;
|
1151
|
+
all = c.Cat(all, c.Match(0));
|
1152
|
+
|
1153
|
+
c.prog_->set_reversed(reversed);
|
1154
|
+
if (c.prog_->reversed()) {
|
1155
|
+
c.prog_->set_anchor_start(is_anchor_end);
|
1156
|
+
c.prog_->set_anchor_end(is_anchor_start);
|
1157
|
+
} else {
|
1158
|
+
c.prog_->set_anchor_start(is_anchor_start);
|
1159
|
+
c.prog_->set_anchor_end(is_anchor_end);
|
1160
|
+
}
|
1161
|
+
|
1162
|
+
c.prog_->set_start(all.begin);
|
1163
|
+
if (!c.prog_->anchor_start()) {
|
1164
|
+
// Also create unanchored version, which starts with a .*? loop.
|
1165
|
+
all = c.Cat(c.DotStar(), all);
|
1166
|
+
}
|
1167
|
+
c.prog_->set_start_unanchored(all.begin);
|
1168
|
+
|
1169
|
+
// Hand ownership of prog_ to caller.
|
1170
|
+
return c.Finish(re);
|
1171
|
+
}
|
1172
|
+
|
1173
|
+
Prog* Compiler::Finish(Regexp* re) {
|
1174
|
+
if (failed_)
|
1175
|
+
return NULL;
|
1176
|
+
|
1177
|
+
if (prog_->start() == 0 && prog_->start_unanchored() == 0) {
|
1178
|
+
// No possible matches; keep Fail instruction only.
|
1179
|
+
ninst_ = 1;
|
1180
|
+
}
|
1181
|
+
|
1182
|
+
// Hand off the array to Prog.
|
1183
|
+
prog_->inst_ = std::move(inst_);
|
1184
|
+
prog_->size_ = ninst_;
|
1185
|
+
|
1186
|
+
prog_->Optimize();
|
1187
|
+
prog_->Flatten();
|
1188
|
+
prog_->ComputeByteMap();
|
1189
|
+
|
1190
|
+
if (!prog_->reversed()) {
|
1191
|
+
std::string prefix;
|
1192
|
+
bool prefix_foldcase;
|
1193
|
+
if (re->RequiredPrefixForAccel(&prefix, &prefix_foldcase) &&
|
1194
|
+
!prefix_foldcase) {
|
1195
|
+
prog_->prefix_size_ = prefix.size();
|
1196
|
+
prog_->prefix_front_ = prefix.front();
|
1197
|
+
prog_->prefix_back_ = prefix.back();
|
1198
|
+
}
|
1199
|
+
}
|
1200
|
+
|
1201
|
+
// Record remaining memory for DFA.
|
1202
|
+
if (max_mem_ <= 0) {
|
1203
|
+
prog_->set_dfa_mem(1<<20);
|
1204
|
+
} else {
|
1205
|
+
int64_t m = max_mem_ - sizeof(Prog);
|
1206
|
+
m -= prog_->size_*sizeof(Prog::Inst); // account for inst_
|
1207
|
+
if (prog_->CanBitState())
|
1208
|
+
m -= prog_->size_*sizeof(uint16_t); // account for list_heads_
|
1209
|
+
if (m < 0)
|
1210
|
+
m = 0;
|
1211
|
+
prog_->set_dfa_mem(m);
|
1212
|
+
}
|
1213
|
+
|
1214
|
+
Prog* p = prog_;
|
1215
|
+
prog_ = NULL;
|
1216
|
+
return p;
|
1217
|
+
}
|
1218
|
+
|
1219
|
+
// Converts Regexp to Prog.
|
1220
|
+
Prog* Regexp::CompileToProg(int64_t max_mem) {
|
1221
|
+
return Compiler::Compile(this, false, max_mem);
|
1222
|
+
}
|
1223
|
+
|
1224
|
+
Prog* Regexp::CompileToReverseProg(int64_t max_mem) {
|
1225
|
+
return Compiler::Compile(this, true, max_mem);
|
1226
|
+
}
|
1227
|
+
|
1228
|
+
Frag Compiler::DotStar() {
|
1229
|
+
return Star(ByteRange(0x00, 0xff, false), true);
|
1230
|
+
}
|
1231
|
+
|
1232
|
+
// Compiles RE set to Prog.
|
1233
|
+
Prog* Compiler::CompileSet(Regexp* re, RE2::Anchor anchor, int64_t max_mem) {
|
1234
|
+
Compiler c;
|
1235
|
+
c.Setup(re->parse_flags(), max_mem, anchor);
|
1236
|
+
|
1237
|
+
Regexp* sre = re->Simplify();
|
1238
|
+
if (sre == NULL)
|
1239
|
+
return NULL;
|
1240
|
+
|
1241
|
+
Frag all = c.WalkExponential(sre, Frag(), 2*c.max_ninst_);
|
1242
|
+
sre->Decref();
|
1243
|
+
if (c.failed_)
|
1244
|
+
return NULL;
|
1245
|
+
|
1246
|
+
c.prog_->set_anchor_start(true);
|
1247
|
+
c.prog_->set_anchor_end(true);
|
1248
|
+
|
1249
|
+
if (anchor == RE2::UNANCHORED) {
|
1250
|
+
// Prepend .* or else the expression will effectively be anchored.
|
1251
|
+
// Complemented by the ANCHOR_BOTH case in PostVisit().
|
1252
|
+
all = c.Cat(c.DotStar(), all);
|
1253
|
+
}
|
1254
|
+
c.prog_->set_start(all.begin);
|
1255
|
+
c.prog_->set_start_unanchored(all.begin);
|
1256
|
+
|
1257
|
+
Prog* prog = c.Finish(re);
|
1258
|
+
if (prog == NULL)
|
1259
|
+
return NULL;
|
1260
|
+
|
1261
|
+
// Make sure DFA has enough memory to operate,
|
1262
|
+
// since we're not going to fall back to the NFA.
|
1263
|
+
bool dfa_failed = false;
|
1264
|
+
StringPiece sp = "hello, world";
|
1265
|
+
prog->SearchDFA(sp, sp, Prog::kAnchored, Prog::kManyMatch,
|
1266
|
+
NULL, &dfa_failed, NULL);
|
1267
|
+
if (dfa_failed) {
|
1268
|
+
delete prog;
|
1269
|
+
return NULL;
|
1270
|
+
}
|
1271
|
+
|
1272
|
+
return prog;
|
1273
|
+
}
|
1274
|
+
|
1275
|
+
Prog* Prog::CompileSet(Regexp* re, RE2::Anchor anchor, int64_t max_mem) {
|
1276
|
+
return Compiler::CompileSet(re, anchor, max_mem);
|
1277
|
+
}
|
1278
|
+
|
1279
|
+
} // namespace re2
|