grpc 1.71.0 → 1.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +78 -75
- data/include/grpc/event_engine/memory_request.h +3 -3
- data/include/grpc/impl/channel_arg_names.h +70 -50
- data/include/grpc/support/workaround_list.h +1 -4
- data/src/core/{lib/transport → call}/call_arena_allocator.cc +1 -1
- data/src/core/{lib/transport → call}/call_arena_allocator.h +3 -3
- data/src/core/{lib/transport → call}/call_destination.h +4 -4
- data/src/core/{lib/transport → call}/call_filters.cc +2 -2
- data/src/core/{lib/transport → call}/call_filters.h +25 -6
- data/src/core/{lib/channel → call}/call_finalization.h +3 -3
- data/src/core/{lib/transport → call}/call_spine.cc +1 -1
- data/src/core/{lib/transport → call}/call_spine.h +68 -26
- data/src/core/{lib/transport → call}/call_state.cc +1 -1
- data/src/core/{lib/transport → call}/call_state.h +3 -3
- data/src/core/{lib/surface → call}/client_call.cc +9 -7
- data/src/core/{lib/surface → call}/client_call.h +4 -4
- data/src/core/{lib/transport → call}/custom_metadata.h +3 -3
- data/src/core/{lib/transport → call}/interception_chain.cc +5 -5
- data/src/core/{lib/transport → call}/interception_chain.h +7 -7
- data/src/core/{lib/transport → call}/message.cc +1 -1
- data/src/core/{lib/transport → call}/message.h +7 -3
- data/src/core/{lib/transport → call}/metadata.cc +2 -2
- data/src/core/{lib/transport → call}/metadata.h +4 -4
- data/src/core/{lib/transport → call}/metadata_batch.cc +1 -1
- data/src/core/{lib/transport → call}/metadata_batch.h +7 -7
- data/src/core/{lib/transport → call}/metadata_compression_traits.h +3 -3
- data/src/core/{lib/transport → call}/metadata_info.cc +27 -9
- data/src/core/{lib/transport → call}/metadata_info.h +4 -4
- data/src/core/{lib/transport → call}/parsed_metadata.cc +1 -1
- data/src/core/{lib/transport → call}/parsed_metadata.h +3 -3
- data/src/core/call/request_buffer.h +3 -3
- data/src/core/call/security_context.cc +125 -0
- data/src/core/call/security_context.h +114 -0
- data/src/core/{lib/surface → call}/server_call.cc +3 -3
- data/src/core/{lib/surface → call}/server_call.h +5 -5
- data/src/core/{lib/transport → call}/simple_slice_based_metadata.h +4 -4
- data/src/core/{lib/channel → call}/status_util.cc +1 -1
- data/src/core/{lib/channel → call}/status_util.h +3 -3
- data/src/core/client_channel/client_channel.cc +24 -16
- data/src/core/client_channel/client_channel.h +4 -3
- data/src/core/client_channel/client_channel_filter.cc +10 -20
- data/src/core/client_channel/client_channel_filter.h +1 -1
- data/src/core/client_channel/client_channel_internal.h +1 -1
- data/src/core/client_channel/config_selector.h +2 -2
- data/src/core/client_channel/direct_channel.cc +2 -2
- data/src/core/client_channel/dynamic_filters.cc +0 -1
- data/src/core/client_channel/dynamic_filters.h +0 -1
- data/src/core/client_channel/lb_metadata.h +1 -1
- data/src/core/client_channel/load_balanced_call_destination.cc +1 -1
- data/src/core/client_channel/load_balanced_call_destination.h +1 -1
- data/src/core/client_channel/retry_filter_legacy_call_data.cc +43 -41
- data/src/core/client_channel/retry_filter_legacy_call_data.h +6 -6
- data/src/core/client_channel/retry_interceptor.h +1 -1
- data/src/core/client_channel/retry_service_config.cc +1 -1
- data/src/core/client_channel/retry_service_config.h +1 -1
- data/src/core/client_channel/retry_throttle.cc +30 -34
- data/src/core/client_channel/retry_throttle.h +10 -2
- data/src/core/client_channel/subchannel.cc +7 -8
- data/src/core/client_channel/subchannel.h +1 -2
- data/src/core/client_channel/subchannel_stream_client.cc +14 -11
- data/src/core/client_channel/subchannel_stream_client.h +2 -2
- data/src/core/config/core_configuration.h +2 -2
- data/src/core/credentials/call/call_credentials.h +157 -0
- data/src/core/{lib/security/credentials → credentials/call}/call_creds_util.cc +4 -4
- data/src/core/{lib/security/credentials → credentials/call}/call_creds_util.h +4 -4
- data/src/core/{lib/security/credentials/composite/composite_credentials.cc → credentials/call/composite/composite_call_credentials.cc} +4 -57
- data/src/core/credentials/call/composite/composite_call_credentials.h +82 -0
- data/src/core/{lib/security/credentials → credentials/call}/external/aws_external_account_credentials.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/call}/external/aws_external_account_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/call}/external/aws_request_signer.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/call}/external/aws_request_signer.h +3 -3
- data/src/core/{lib/security/credentials → credentials/call}/external/external_account_credentials.cc +6 -6
- data/src/core/{lib/security/credentials → credentials/call}/external/external_account_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/call}/external/file_external_account_credentials.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/call}/external/file_external_account_credentials.h +4 -4
- data/src/core/{lib/security/credentials → credentials/call}/external/url_external_account_credentials.cc +3 -2
- data/src/core/{lib/security/credentials → credentials/call}/external/url_external_account_credentials.h +4 -4
- data/src/core/{lib/security/credentials → credentials/call}/gcp_service_account_identity/gcp_service_account_identity_credentials.cc +3 -2
- data/src/core/{lib/security/credentials → credentials/call}/gcp_service_account_identity/gcp_service_account_identity_credentials.h +6 -6
- data/src/core/{lib/security/credentials → credentials/call}/iam/iam_credentials.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/call}/iam/iam_credentials.h +4 -4
- data/src/core/{lib/security/util → credentials/call}/json_util.cc +1 -1
- data/src/core/{lib/security/util → credentials/call}/json_util.h +3 -3
- data/src/core/{lib/security/credentials → credentials/call}/jwt/json_token.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/call}/jwt/json_token.h +3 -3
- data/src/core/{lib/security/credentials → credentials/call}/jwt/jwt_credentials.cc +3 -3
- data/src/core/{lib/security/credentials → credentials/call}/jwt/jwt_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/call}/jwt/jwt_verifier.cc +3 -2
- data/src/core/{lib/security/credentials → credentials/call}/jwt/jwt_verifier.h +3 -3
- data/src/core/{lib/security/credentials → credentials/call}/oauth2/oauth2_credentials.cc +4 -3
- data/src/core/{lib/security/credentials → credentials/call}/oauth2/oauth2_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/call}/plugin/plugin_credentials.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/call}/plugin/plugin_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/call}/token_fetcher/token_fetcher_credentials.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/call}/token_fetcher/token_fetcher_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/transport}/alts/alts_credentials.cc +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/alts/alts_credentials.h +5 -5
- data/src/core/{lib/security/security_connector → credentials/transport}/alts/alts_security_connector.cc +4 -4
- data/src/core/{lib/security/security_connector → credentials/transport}/alts/alts_security_connector.h +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/alts/check_gcp_environment.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/alts/check_gcp_environment.h +3 -3
- data/src/core/{lib/security/credentials → credentials/transport}/alts/check_gcp_environment_linux.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/alts/check_gcp_environment_no_op.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/alts/check_gcp_environment_windows.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/alts/grpc_alts_credentials_client_options.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/alts/grpc_alts_credentials_options.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/alts/grpc_alts_credentials_options.h +3 -3
- data/src/core/{lib/security/credentials → credentials/transport}/alts/grpc_alts_credentials_server_options.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/channel_creds_registry.h +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/channel_creds_registry_init.cc +21 -17
- data/src/core/credentials/transport/composite/composite_channel_credentials.cc +68 -0
- data/src/core/{lib/security/credentials/composite/composite_credentials.h → credentials/transport/composite/composite_channel_credentials.h} +6 -51
- data/src/core/{lib/security/credentials → credentials/transport}/fake/fake_credentials.cc +4 -26
- data/src/core/{lib/security/credentials → credentials/transport}/fake/fake_credentials.h +5 -37
- data/src/core/{lib/security/security_connector → credentials/transport}/fake/fake_security_connector.cc +4 -4
- data/src/core/{lib/security/security_connector → credentials/transport}/fake/fake_security_connector.h +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/google_default/credentials_generic.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/transport}/google_default/google_default_credentials.cc +31 -19
- data/src/core/{lib/security/credentials → credentials/transport}/google_default/google_default_credentials.h +5 -5
- data/src/core/{lib/security/credentials → credentials/transport}/insecure/insecure_credentials.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/transport}/insecure/insecure_credentials.h +5 -5
- data/src/core/{lib/security/security_connector → credentials/transport}/insecure/insecure_security_connector.cc +2 -2
- data/src/core/{lib/security/security_connector → credentials/transport}/insecure/insecure_security_connector.h +5 -5
- data/src/core/{lib/security/credentials → credentials/transport}/local/local_credentials.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/transport}/local/local_credentials.h +5 -5
- data/src/core/{lib/security/security_connector → credentials/transport}/local/local_security_connector.cc +4 -4
- data/src/core/{lib/security/security_connector → credentials/transport}/local/local_security_connector.h +4 -4
- data/src/core/{lib/security/security_connector → credentials/transport}/security_connector.cc +2 -2
- data/src/core/{lib/security/security_connector → credentials/transport}/security_connector.h +3 -3
- data/src/core/{lib/security/credentials → credentials/transport}/ssl/ssl_credentials.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/transport}/ssl/ssl_credentials.h +6 -6
- data/src/core/{lib/security/security_connector → credentials/transport}/ssl/ssl_security_connector.cc +5 -5
- data/src/core/{lib/security/security_connector → credentials/transport}/ssl/ssl_security_connector.h +4 -4
- data/src/core/{lib/security/certificate_provider → credentials/transport/tls}/certificate_provider_factory.h +3 -3
- data/src/core/{lib/security/certificate_provider → credentials/transport/tls}/certificate_provider_registry.cc +1 -1
- data/src/core/{lib/security/certificate_provider → credentials/transport/tls}/certificate_provider_registry.h +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_distributor.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_distributor.h +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_match.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_provider.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_provider.h +5 -5
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_verifier.cc +2 -2
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_certificate_verifier.h +3 -3
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_credentials_options.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_credentials_options.h +7 -7
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_crl_provider.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/tls/grpc_tls_crl_provider.h +3 -3
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/load_system_roots.h +3 -3
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/load_system_roots_fallback.cc +1 -1
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/load_system_roots_supported.cc +2 -2
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/load_system_roots_supported.h +3 -3
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/load_system_roots_windows.cc +1 -1
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/ssl_utils.cc +3 -3
- data/src/core/{lib/security/security_connector → credentials/transport/tls}/ssl_utils.h +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/tls/tls_credentials.cc +4 -4
- data/src/core/{lib/security/credentials → credentials/transport}/tls/tls_credentials.h +5 -5
- data/src/core/{lib/security/security_connector → credentials/transport}/tls/tls_security_connector.cc +6 -6
- data/src/core/{lib/security/security_connector → credentials/transport}/tls/tls_security_connector.h +6 -6
- data/src/core/{lib/security/credentials → credentials/transport}/tls/tls_utils.cc +1 -1
- data/src/core/{lib/security/credentials → credentials/transport}/tls/tls_utils.h +3 -3
- data/src/core/{lib/security/credentials/credentials.cc → credentials/transport/transport_credentials.cc} +1 -3
- data/src/core/{lib/security/credentials/credentials.h → credentials/transport/transport_credentials.h} +5 -121
- data/src/core/{lib/security/credentials → credentials/transport}/xds/xds_credentials.cc +5 -5
- data/src/core/{lib/security/credentials → credentials/transport}/xds/xds_credentials.h +6 -6
- data/src/core/ext/filters/backend_metrics/backend_metric_filter.cc +1 -1
- data/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc +8 -5
- data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +2 -2
- data/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.cc +1 -1
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +2 -2
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +1 -1
- data/src/core/ext/filters/http/client/http_client_filter.h +1 -1
- data/src/core/ext/filters/http/client_authority_filter.cc +2 -2
- data/src/core/ext/filters/http/message_compress/compression_filter.cc +1 -1
- data/src/core/ext/filters/http/message_compress/compression_filter.h +1 -1
- data/src/core/ext/filters/http/server/http_server_filter.cc +1 -1
- data/src/core/ext/filters/message_size/message_size_filter.cc +1 -1
- data/src/core/ext/filters/rbac/rbac_filter.cc +2 -2
- data/src/core/ext/filters/stateful_session/stateful_session_filter.cc +1 -1
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +3 -3
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +8 -5
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +5 -1
- data/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/call_tracer_wrapper.h +1 -3
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +58 -57
- data/src/core/ext/transport/chttp2/transport/context_list_entry.h +3 -3
- data/src/core/ext/transport/chttp2/transport/frame.cc +89 -68
- data/src/core/ext/transport/chttp2/transport/frame.h +37 -1
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +2 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +6 -3
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +4 -2
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +2 -2
- data/src/core/ext/transport/chttp2/transport/hpack_parse_result.h +1 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +1 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +2 -2
- data/src/core/ext/transport/chttp2/transport/http2_settings.cc +10 -8
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +2 -2
- data/src/core/ext/transport/chttp2/transport/http2_status.h +52 -0
- data/src/core/ext/transport/chttp2/transport/internal.h +11 -14
- data/src/core/ext/transport/chttp2/transport/parsing.cc +36 -23
- data/src/core/ext/transport/chttp2/transport/writing.cc +15 -14
- data/src/core/ext/transport/inproc/inproc_transport.cc +1 -1
- data/src/core/ext/transport/inproc/legacy_inproc_transport.cc +1 -1
- data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb.h +65 -65
- data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb_minitable.c +28 -28
- data/src/core/ext/upb-gen/envoy/admin/v3/config_dump_shared.upb.h +14 -14
- data/src/core/ext/upb-gen/envoy/admin/v3/config_dump_shared.upb_minitable.c +6 -6
- data/src/core/ext/upb-gen/envoy/admin/v3/metrics.upb.h +6 -6
- data/src/core/ext/upb-gen/envoy/admin/v3/metrics.upb_minitable.c +4 -4
- data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb.h +133 -133
- data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb_minitable.c +71 -71
- data/src/core/ext/upb-gen/envoy/config/accesslog/v3/accesslog.upb.h +26 -26
- data/src/core/ext/upb-gen/envoy/config/accesslog/v3/accesslog.upb_minitable.c +7 -7
- data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb.h +216 -218
- data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb_minitable.c +66 -66
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb.h +27 -27
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb_minitable.c +9 -9
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb.h +326 -328
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.c +103 -103
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb.h +58 -58
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb_minitable.c +14 -14
- data/src/core/ext/upb-gen/envoy/config/common/matcher/v3/matcher.upb.h +22 -24
- data/src/core/ext/upb-gen/envoy/config/common/matcher/v3/matcher.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb.h +29 -29
- data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb_minitable.c +16 -16
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb.h +186 -192
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.c +54 -54
- data/src/core/ext/upb-gen/envoy/config/core/v3/config_source.upb.h +54 -54
- data/src/core/ext/upb-gen/envoy/config/core/v3/config_source.upb_minitable.c +21 -21
- data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_service.upb.h +59 -61
- data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_service.upb_minitable.c +15 -15
- data/src/core/ext/upb-gen/envoy/config/core/v3/health_check.upb.h +100 -100
- data/src/core/ext/upb-gen/envoy/config/core/v3/health_check.upb_minitable.c +34 -34
- data/src/core/ext/upb-gen/envoy/config/core/v3/http_uri.upb.h +12 -12
- data/src/core/ext/upb-gen/envoy/config/core/v3/http_uri.upb_minitable.c +5 -5
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb.h +118 -118
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.c +39 -39
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb.h +19 -19
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb_minitable.c +9 -9
- data/src/core/ext/upb-gen/envoy/config/core/v3/substitution_format_string.upb.h +27 -27
- data/src/core/ext/upb-gen/envoy/config/core/v3/substitution_format_string.upb_minitable.c +10 -10
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint.upb.h +12 -14
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb.h +41 -41
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb_minitable.c +16 -16
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/load_report.upb.h +24 -24
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/load_report.upb_minitable.c +9 -9
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb.h +139 -139
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.c +46 -46
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb.h +61 -61
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb_minitable.c +20 -20
- data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb.h +3 -3
- data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb_minitable.c +1 -1
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/metrics_service.upb.h +6 -6
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/metrics_service.upb_minitable.c +4 -4
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb.h +33 -33
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb_minitable.c +14 -14
- data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb.h +12 -14
- data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/envoy/config/route/v3/route.upb.h +52 -54
- data/src/core/ext/upb-gen/envoy/config/route/v3/route.upb_minitable.c +10 -10
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb.h +620 -626
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.c +215 -215
- data/src/core/ext/upb-gen/envoy/config/route/v3/scoped_route.upb.h +13 -13
- data/src/core/ext/upb-gen/envoy/config/route/v3/scoped_route.upb_minitable.c +4 -4
- data/src/core/ext/upb-gen/envoy/config/tap/v3/common.upb.h +3 -3
- data/src/core/ext/upb-gen/envoy/config/tap/v3/common.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb.h +7 -7
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/envoy/config/trace/v3/skywalking.upb.h +15 -15
- data/src/core/ext/upb-gen/envoy/config/trace/v3/skywalking.upb_minitable.c +7 -7
- data/src/core/ext/upb-gen/envoy/config/trace/v3/xray.upb.h +7 -7
- data/src/core/ext/upb-gen/envoy/config/trace/v3/xray.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb.h +16 -16
- data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb_minitable.c +10 -10
- data/src/core/ext/upb-gen/envoy/data/accesslog/v3/accesslog.upb.h +306 -312
- data/src/core/ext/upb-gen/envoy/data/accesslog/v3/accesslog.upb_minitable.c +96 -96
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb.h +61 -61
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb_minitable.c +27 -27
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb.h +19 -19
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb_minitable.c +6 -6
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/rbac/v3/rbac.upb.h +25 -25
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/rbac/v3/rbac.upb_minitable.c +9 -9
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb.h +34 -34
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb_minitable.c +9 -9
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.h +3 -3
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +294 -294
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.c +105 -105
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb.h +3 -3
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.c +1 -1
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.h +23 -23
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb_minitable.c +8 -8
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb.h +84 -84
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb_minitable.c +28 -28
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +87 -87
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls.upb_minitable.c +31 -31
- data/src/core/ext/upb-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upb.h +24 -24
- data/src/core/ext/upb-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upb_minitable.c +5 -5
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb.h +130 -132
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb_minitable.c +43 -43
- data/src/core/ext/upb-gen/envoy/service/load_stats/v3/lrs.upb.h +6 -6
- data/src/core/ext/upb-gen/envoy/service/load_stats/v3/lrs.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/envoy/service/status/v3/csds.upb.h +60 -60
- data/src/core/ext/upb-gen/envoy/service/status/v3/csds.upb_minitable.c +26 -26
- data/src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb.h +7 -7
- data/src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/metadata.upb.h +6 -6
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/metadata.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/regex.upb.h +7 -7
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/regex.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/envoy/type/tracing/v3/custom_tag.upb.h +11 -11
- data/src/core/ext/upb-gen/envoy/type/tracing/v3/custom_tag.upb_minitable.c +4 -4
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/checked.upb.h +85 -89
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/checked.upb_minitable.c +20 -20
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/syntax.upb.h +80 -83
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/syntax.upb_minitable.c +27 -27
- data/src/core/ext/upb-gen/google/api/http.upb.h +51 -51
- data/src/core/ext/upb-gen/google/api/http.upb_minitable.c +22 -22
- data/src/core/ext/upb-gen/google/protobuf/descriptor.upb.h +327 -301
- data/src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.c +97 -85
- data/src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.h +1 -0
- data/src/core/ext/upb-gen/google/protobuf/struct.upb.h +9 -11
- data/src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb.h +9 -10
- data/src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb.h +110 -113
- data/src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c +25 -25
- data/src/core/ext/upb-gen/src/proto/grpc/lb/v1/load_balancer.upb.h +6 -6
- data/src/core/ext/upb-gen/src/proto/grpc/lb/v1/load_balancer.upb_minitable.c +4 -4
- data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls.upb.h +21 -22
- data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls_config.upb.h +70 -72
- data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls_config.upb_minitable.c +17 -17
- data/src/core/ext/upb-gen/validate/validate.upb.h +368 -368
- data/src/core/ext/upb-gen/validate/validate.upb_minitable.c +117 -117
- data/src/core/ext/upb-gen/xds/core/v3/context_params.upb.h +9 -10
- data/src/core/ext/upb-gen/xds/core/v3/resource.upb.h +7 -7
- data/src/core/ext/upb-gen/xds/core/v3/resource.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/xds/core/v3/resource_locator.upb.h +12 -12
- data/src/core/ext/upb-gen/xds/core/v3/resource_locator.upb_minitable.c +2 -2
- data/src/core/ext/upb-gen/xds/data/orca/v3/orca_load_report.upb.h +27 -30
- data/src/core/ext/upb-gen/xds/type/matcher/v3/cel.upb.h +7 -7
- data/src/core/ext/upb-gen/xds/type/matcher/v3/cel.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/xds/type/matcher/v3/ip.upb.h +3 -3
- data/src/core/ext/upb-gen/xds/type/matcher/v3/ip.upb_minitable.c +1 -1
- data/src/core/ext/upb-gen/xds/type/matcher/v3/matcher.upb.h +22 -24
- data/src/core/ext/upb-gen/xds/type/matcher/v3/matcher.upb_minitable.c +3 -3
- data/src/core/ext/upbdefs-gen/google/protobuf/descriptor.upbdefs.c +98 -87
- data/src/core/{lib/security/transport → filter/auth}/auth_filters.h +8 -7
- data/src/core/{lib/security/transport → filter/auth}/client_auth_filter.cc +7 -6
- data/src/core/{lib/security/transport → filter/auth}/server_auth_filter.cc +5 -4
- data/src/core/handshaker/handshaker.cc +0 -8
- data/src/core/handshaker/security/security_handshaker.cc +1 -1
- data/src/core/handshaker/security/security_handshaker.h +1 -1
- data/src/core/lib/channel/channel_args.h +49 -30
- data/src/core/lib/channel/channel_stack.h +1 -2
- data/src/core/lib/channel/channel_stack_builder_impl.cc +1 -1
- data/src/core/lib/channel/connected_channel.cc +2 -2
- data/src/core/lib/channel/promise_based_filter.h +3 -3
- data/src/core/lib/debug/trace_flags.cc +2 -4
- data/src/core/lib/debug/trace_flags.h +1 -2
- data/src/core/lib/event_engine/default_event_engine_factory.cc +6 -6
- data/src/core/lib/event_engine/default_event_engine_factory.h +1 -1
- data/src/core/lib/event_engine/extensions/iomgr_compatible.h +39 -0
- data/src/core/lib/event_engine/extensions/supports_win_sockets.h +48 -0
- data/src/core/lib/event_engine/extensions/tcp_trace.h +1 -1
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +0 -2
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +1 -3
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +26 -0
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h +4 -0
- data/src/core/lib/event_engine/posix_engine/set_socket_dualstack.cc +64 -0
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +0 -11
- data/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc +10 -2
- data/src/core/lib/event_engine/shim.cc +9 -16
- data/src/core/lib/event_engine/shim.h +11 -0
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +15 -7
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h +2 -1
- data/src/core/lib/event_engine/windows/win_socket.cc +11 -0
- data/src/core/lib/event_engine/windows/win_socket.h +3 -0
- data/src/core/lib/event_engine/windows/windows_endpoint.cc +5 -10
- data/src/core/lib/event_engine/windows/windows_engine.cc +42 -0
- data/src/core/lib/event_engine/windows/windows_engine.h +8 -2
- data/src/core/lib/event_engine/windows/windows_listener.cc +5 -6
- data/src/core/lib/event_engine/windows/windows_listener.h +9 -4
- data/src/core/lib/experiments/experiments.cc +174 -21
- data/src/core/lib/experiments/experiments.h +70 -13
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +43 -16
- data/src/core/lib/iomgr/endpoint_pair_windows.cc +43 -8
- data/src/core/lib/iomgr/error.cc +27 -43
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +13 -1
- data/src/core/lib/iomgr/ev_poll_posix.cc +13 -0
- data/src/core/lib/iomgr/polling_entity.cc +2 -7
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +1 -0
- data/src/core/lib/iomgr/socket_utils_posix.cc +22 -11
- data/src/core/lib/iomgr/socket_utils_posix.h +12 -2
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +8 -9
- data/src/core/lib/iomgr/tcp_client_posix.cc +11 -15
- data/src/core/lib/iomgr/tcp_client_posix.h +1 -1
- data/src/core/lib/iomgr/tcp_posix.cc +58 -31
- data/src/core/lib/iomgr/tcp_posix.h +10 -2
- data/src/core/lib/iomgr/tcp_server_posix.cc +9 -1
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +1 -4
- data/src/core/lib/iomgr/tcp_server_windows.cc +27 -16
- data/src/core/lib/iomgr/wakeup_fd_pipe.cc +10 -2
- data/src/core/lib/promise/all_ok.h +31 -0
- data/src/core/lib/promise/loop.h +8 -5
- data/src/core/lib/promise/map.h +65 -2
- data/src/core/lib/promise/party.h +5 -1
- data/src/core/lib/promise/poll.h +22 -20
- data/src/core/lib/promise/promise.h +2 -2
- data/src/core/lib/promise/status_flag.h +23 -11
- data/src/core/lib/security/authorization/evaluate_args.cc +1 -1
- data/src/core/lib/security/authorization/evaluate_args.h +1 -1
- data/src/core/lib/security/authorization/grpc_server_authz_filter.cc +1 -1
- data/src/core/lib/security/authorization/grpc_server_authz_filter.h +1 -1
- data/src/core/lib/slice/slice.h +6 -0
- data/src/core/lib/surface/call.cc +20 -18
- data/src/core/lib/surface/call_utils.cc +3 -3
- data/src/core/lib/surface/call_utils.h +3 -3
- data/src/core/lib/surface/channel.h +2 -2
- data/src/core/lib/surface/channel_init.h +2 -2
- data/src/core/lib/surface/completion_queue.cc +77 -17
- data/src/core/lib/surface/filter_stack_call.cc +40 -27
- data/src/core/lib/surface/filter_stack_call.h +1 -1
- data/src/core/lib/surface/init.cc +2 -3
- data/src/core/lib/surface/lame_client.cc +1 -1
- data/src/core/lib/surface/legacy_channel.cc +27 -23
- data/src/core/lib/surface/legacy_channel.h +1 -1
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/error_utils.cc +65 -11
- data/src/core/lib/transport/error_utils.h +2 -2
- data/src/core/lib/transport/status_conversion.cc +16 -14
- data/src/core/lib/transport/status_conversion.h +5 -4
- data/src/core/lib/transport/transport.h +5 -5
- data/src/core/lib/transport/transport_op_string.cc +1 -1
- data/src/core/load_balancing/delegating_helper.h +1 -1
- data/src/core/load_balancing/grpclb/client_load_reporting_filter.cc +1 -1
- data/src/core/load_balancing/grpclb/grpclb.cc +1 -2
- data/src/core/load_balancing/pick_first/pick_first.cc +0 -955
- data/src/core/load_balancing/rls/rls.cc +31 -37
- data/src/core/load_balancing/weighted_target/weighted_target.cc +1 -1
- data/src/core/load_balancing/xds/cds.cc +3 -10
- data/src/core/load_balancing/xds/xds_cluster_impl.cc +1 -1
- data/src/core/plugin_registry/grpc_plugin_registry.cc +2 -0
- data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +0 -2
- data/src/core/resolver/dns/c_ares/dns_resolver_ares.cc +1 -3
- data/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h +4 -0
- data/src/core/resolver/google_c2p/google_c2p_resolver.cc +1 -1
- data/src/core/resolver/xds/xds_dependency_manager.cc +8 -3
- data/src/core/resolver/xds/xds_resolver.cc +2 -2
- data/src/core/server/server.cc +7 -4
- data/src/core/server/server.h +1 -1
- data/src/core/server/server_call_tracer_filter.cc +1 -1
- data/src/core/server/server_config_selector.h +1 -1
- data/src/core/server/server_config_selector_filter.cc +1 -1
- data/src/core/server/xds_server_config_fetcher.cc +5 -5
- data/src/core/service_config/service_config_channel_arg_filter.cc +1 -1
- data/src/core/telemetry/call_tracer.cc +2 -4
- data/src/core/telemetry/call_tracer.h +3 -3
- data/src/core/telemetry/metrics.cc +30 -12
- data/src/core/telemetry/metrics.h +15 -3
- data/src/core/telemetry/stats_data.cc +75 -2
- data/src/core/telemetry/stats_data.h +46 -4
- data/src/core/telemetry/tcp_tracer.h +90 -84
- data/src/core/{lib/security/context/security_context.cc → transport/auth_context.cc} +1 -96
- data/src/core/{lib/security/context/security_context.h → transport/auth_context.h} +6 -76
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +1 -1
- data/src/core/tsi/ssl_transport_security.cc +1 -1
- data/src/core/util/check_class_size.h +48 -0
- data/src/core/util/gcp_metadata_query.cc +1 -1
- data/src/core/util/http_client/httpcli.cc +3 -3
- data/src/core/util/http_client/httpcli_security_connector.cc +3 -3
- data/src/core/util/load_file.cc +26 -14
- data/src/core/util/status_helper.cc +86 -63
- data/src/core/util/status_helper.h +9 -26
- data/src/core/xds/grpc/certificate_provider_store.cc +1 -1
- data/src/core/xds/grpc/certificate_provider_store.h +3 -3
- data/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc +3 -3
- data/src/core/xds/grpc/file_watcher_certificate_provider_factory.h +1 -1
- data/src/core/xds/grpc/xds_bootstrap_grpc.cc +10 -7
- data/src/core/xds/grpc/xds_certificate_provider.cc +1 -1
- data/src/core/xds/grpc/xds_certificate_provider.h +2 -2
- data/src/core/xds/grpc/xds_client_grpc.cc +7 -6
- data/src/core/xds/grpc/xds_client_grpc.h +4 -2
- data/src/core/xds/grpc/xds_cluster.h +3 -3
- data/src/core/xds/grpc/xds_cluster_parser.cc +3 -2
- data/src/core/xds/grpc/xds_http_fault_filter.cc +1 -1
- data/src/core/xds/grpc/xds_http_filter.h +1 -1
- data/src/core/xds/grpc/xds_http_filter_registry.h +1 -1
- data/src/core/xds/grpc/xds_route_config.h +1 -1
- data/src/core/xds/grpc/xds_route_config_parser.cc +1 -1
- data/src/core/xds/grpc/xds_route_config_parser.h +1 -1
- data/src/core/xds/grpc/xds_routing.h +1 -1
- data/src/core/xds/grpc/xds_server_grpc.cc +60 -48
- data/src/core/xds/grpc/xds_server_grpc.h +23 -13
- data/src/core/xds/grpc/xds_server_grpc_interface.h +2 -2
- data/src/core/xds/grpc/xds_transport_grpc.cc +5 -5
- data/src/core/xds/grpc/xds_transport_grpc.h +5 -3
- data/src/core/xds/xds_client/lrs_client.cc +6 -5
- data/src/core/xds/xds_client/lrs_client.h +7 -7
- data/src/core/xds/xds_client/xds_bootstrap.h +16 -1
- data/src/core/xds/xds_client/xds_client.cc +25 -23
- data/src/core/xds/xds_client/xds_client.h +3 -1
- data/src/core/xds/xds_client/xds_resource_type.h +1 -2
- data/src/core/xds/xds_client/xds_transport.h +1 -1
- data/src/ruby/ext/grpc/extconf.rb +1 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_apple.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_fuchsia.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_linux.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_openbsd.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_sysreg.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_win.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/cpu_arm_freebsd.cc +0 -1
- data/third_party/boringssl-with-bazel/src/crypto/cpu_arm_linux.cc +0 -1
- data/third_party/boringssl-with-bazel/src/crypto/crypto.cc +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/internal.h +20 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +3 -25
- data/third_party/boringssl-with-bazel/src/ssl/extensions.cc +3 -7
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +1 -1
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +1 -1
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +13 -6
- data/third_party/boringssl-with-bazel/src/ssl/ssl_credential.cc +2 -1
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +1 -1
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +1 -1
- data/third_party/upb/upb/base/internal/log2.h +3 -1
- data/third_party/upb/upb/base/string_view.h +10 -0
- data/third_party/upb/upb/hash/common.c +5 -1
- data/third_party/upb/upb/json/decode.c +2 -2
- data/third_party/upb/upb/json/decode.h +0 -1
- data/third_party/upb/upb/mem/alloc.h +5 -0
- data/third_party/upb/upb/mem/arena.c +296 -142
- data/third_party/upb/upb/mem/arena.h +47 -11
- data/third_party/upb/upb/mem/arena.hpp +4 -20
- data/third_party/upb/upb/mem/internal/arena.h +4 -6
- data/third_party/upb/upb/message/accessors.h +41 -0
- data/third_party/upb/upb/message/compat.c +11 -14
- data/third_party/upb/upb/message/compat.h +4 -3
- data/third_party/upb/upb/message/copy.c +35 -30
- data/third_party/upb/upb/message/internal/accessors.h +139 -10
- data/third_party/upb/upb/message/internal/extension.c +28 -25
- data/third_party/upb/upb/message/internal/extension.h +21 -5
- data/third_party/upb/upb/message/internal/iterator.c +58 -0
- data/third_party/upb/upb/message/internal/iterator.h +29 -0
- data/third_party/upb/upb/message/internal/map.h +2 -3
- data/third_party/upb/upb/message/internal/map_sorter.h +3 -2
- data/third_party/upb/upb/message/internal/message.c +48 -29
- data/third_party/upb/upb/message/internal/message.h +154 -24
- data/third_party/upb/upb/message/map_sorter.c +20 -8
- data/third_party/upb/upb/message/message.c +90 -38
- data/third_party/upb/upb/message/message.h +58 -2
- data/third_party/upb/upb/message/value.h +9 -0
- data/third_party/upb/upb/mini_descriptor/build_enum.c +1 -1
- data/third_party/upb/upb/mini_descriptor/decode.c +97 -136
- data/third_party/upb/upb/mini_descriptor/decode.h +4 -3
- data/third_party/upb/upb/mini_descriptor/internal/encode.hpp +1 -1
- data/third_party/upb/upb/mini_table/extension_registry.c +24 -12
- data/third_party/upb/upb/mini_table/extension_registry.h +13 -6
- data/third_party/upb/upb/mini_table/message.c +21 -13
- data/third_party/upb/upb/port/atomic.h +134 -7
- data/third_party/upb/upb/port/def.inc +140 -38
- data/third_party/upb/upb/port/undef.inc +11 -1
- data/third_party/upb/upb/reflection/def.hpp +5 -1
- data/third_party/upb/upb/reflection/def_pool.c +10 -3
- data/third_party/upb/upb/reflection/descriptor_bootstrap.h +1 -1
- data/third_party/upb/upb/reflection/file_def.c +12 -5
- data/third_party/upb/upb/reflection/internal/def_builder.c +1 -1
- data/third_party/upb/upb/reflection/internal/upb_edition_defaults.h +1 -1
- data/third_party/upb/upb/reflection/message.c +19 -16
- data/third_party/upb/upb/reflection/message.h +3 -1
- data/third_party/upb/upb/text/encode.c +1 -13
- data/third_party/upb/upb/text/internal/encode.c +25 -6
- data/third_party/upb/upb/text/internal/encode.h +4 -0
- data/third_party/upb/upb/wire/decode.c +60 -45
- data/third_party/upb/upb/wire/decode.h +4 -2
- data/third_party/upb/upb/wire/encode.c +77 -42
- data/third_party/upb/upb/wire/encode.h +2 -0
- data/third_party/upb/upb/wire/eps_copy_input_stream.h +18 -20
- data/third_party/upb/upb/wire/internal/decoder.h +4 -11
- data/third_party/utf8_range/utf8_range.c +15 -275
- data/third_party/utf8_range/utf8_range_neon.inc +117 -0
- data/third_party/utf8_range/utf8_range_sse.inc +272 -0
- data/third_party/zlib/deflate.c +40 -15
- data/third_party/zlib/deflate.h +33 -2
- data/third_party/zlib/gzguts.h +2 -6
- data/third_party/zlib/inflate.c +1 -1
- data/third_party/zlib/inftrees.c +3 -3
- data/third_party/zlib/inftrees.h +2 -2
- data/third_party/zlib/trees.c +18 -4
- data/third_party/zlib/zconf.h +1 -9
- data/third_party/zlib/zlib.h +12 -12
- data/third_party/zlib/zutil.h +4 -25
- metadata +155 -145
- data/include/grpc/grpc_cronet.h +0 -37
- data/src/core/lib/transport/http2_errors.h +0 -43
- data/third_party/upb/upb/message/internal/compare_unknown.c +0 -289
- data/third_party/upb/upb/message/internal/compare_unknown.h +0 -49
@@ -0,0 +1,117 @@
|
|
1
|
+
#include <arm_neon.h>
|
2
|
+
|
3
|
+
/* This code is almost the same as SSE implementation, please reference
|
4
|
+
* utf8-range-sse.inc for detailed explanation.
|
5
|
+
* The only difference is the range adjustment step. NEON code is more
|
6
|
+
* straightforward.
|
7
|
+
*/
|
8
|
+
|
9
|
+
static FORCE_INLINE_ATTR inline size_t utf8_range_ValidateUTF8Simd(
|
10
|
+
const char* data_original, const char* data, const char* end,
|
11
|
+
int return_position) {
|
12
|
+
const uint8x16_t first_len_tbl = {
|
13
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3,
|
14
|
+
};
|
15
|
+
const uint8x16_t first_range_tbl = {
|
16
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8,
|
17
|
+
};
|
18
|
+
const uint8x16_t range_min_tbl = {
|
19
|
+
0x00, 0x80, 0x80, 0x80, 0xA0, 0x80, 0x90, 0x80,
|
20
|
+
0xC2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
21
|
+
};
|
22
|
+
const uint8x16_t range_max_tbl = {
|
23
|
+
0x7F, 0xBF, 0xBF, 0xBF, 0xBF, 0x9F, 0xBF, 0x8F,
|
24
|
+
0xF4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
25
|
+
};
|
26
|
+
/* Range adjustment in NEON uint8x16x2 table. Note that lanes are interleaved
|
27
|
+
* in register. The table below is plotted vertically to ease understanding.
|
28
|
+
* The 1st column is for E0~EF, 2nd column for F0~FF.
|
29
|
+
*/
|
30
|
+
// clang-format off
|
31
|
+
const uint8_t range_adjust_tbl_data[] = {
|
32
|
+
/* index -> 0~15 16~31 <- index */
|
33
|
+
/* E0 -> */ 2, 3, /* <- F0 */
|
34
|
+
0, 0,
|
35
|
+
0, 0,
|
36
|
+
0, 0,
|
37
|
+
0, 4, /* <- F4 */
|
38
|
+
0, 0,
|
39
|
+
0, 0,
|
40
|
+
0, 0,
|
41
|
+
0, 0,
|
42
|
+
0, 0,
|
43
|
+
0, 0,
|
44
|
+
0, 0,
|
45
|
+
0, 0,
|
46
|
+
/* ED -> */ 3, 0,
|
47
|
+
0, 0,
|
48
|
+
0, 0,
|
49
|
+
};
|
50
|
+
// clang-format on
|
51
|
+
const uint8x16x2_t range_adjust_tbl = vld2q_u8(range_adjust_tbl_data);
|
52
|
+
|
53
|
+
const uint8x16_t const_1 = vdupq_n_u8(1);
|
54
|
+
const uint8x16_t const_2 = vdupq_n_u8(2);
|
55
|
+
const uint8x16_t const_e0 = vdupq_n_u8(0xE0);
|
56
|
+
|
57
|
+
uint8x16_t prev_input = vdupq_n_u8(0);
|
58
|
+
uint8x16_t prev_first_len = vdupq_n_u8(0);
|
59
|
+
uint8x16_t error = vdupq_n_u8(0);
|
60
|
+
|
61
|
+
while (end - data >= 16) {
|
62
|
+
const uint8x16_t input = vld1q_u8((const uint8_t*)data);
|
63
|
+
|
64
|
+
const uint8x16_t high_nibbles = vshrq_n_u8(input, 4);
|
65
|
+
|
66
|
+
const uint8x16_t first_len = vqtbl1q_u8(first_len_tbl, high_nibbles);
|
67
|
+
|
68
|
+
uint8x16_t range = vqtbl1q_u8(first_range_tbl, high_nibbles);
|
69
|
+
|
70
|
+
range = vorrq_u8(range, vextq_u8(prev_first_len, first_len, 15));
|
71
|
+
|
72
|
+
uint8x16_t shift2 = vextq_u8(prev_first_len, first_len, 14);
|
73
|
+
shift2 = vqsubq_u8(shift2, const_1);
|
74
|
+
range = vorrq_u8(range, shift2);
|
75
|
+
|
76
|
+
uint8x16_t shift3 = vextq_u8(prev_first_len, first_len, 13);
|
77
|
+
shift3 = vqsubq_u8(shift3, const_2);
|
78
|
+
range = vorrq_u8(range, shift3);
|
79
|
+
|
80
|
+
uint8x16_t shift1 = vextq_u8(prev_input, input, 15);
|
81
|
+
shift1 = vsubq_u8(shift1, const_e0);
|
82
|
+
range = vaddq_u8(range, vqtbl2q_u8(range_adjust_tbl, shift1));
|
83
|
+
|
84
|
+
const uint8x16_t min_range = vqtbl1q_u8(range_min_tbl, range);
|
85
|
+
const uint8x16_t max_range = vqtbl1q_u8(range_max_tbl, range);
|
86
|
+
|
87
|
+
if (return_position) {
|
88
|
+
error = vcltq_u8(input, min_range);
|
89
|
+
error = vorrq_u8(error, vcgtq_u8(input, max_range));
|
90
|
+
if (vmaxvq_u32(vreinterpretq_u32_u8(error))) {
|
91
|
+
break;
|
92
|
+
}
|
93
|
+
} else {
|
94
|
+
error = vorrq_u8(error, vcltq_u8(input, min_range));
|
95
|
+
error = vorrq_u8(error, vcgtq_u8(input, max_range));
|
96
|
+
}
|
97
|
+
|
98
|
+
prev_input = input;
|
99
|
+
prev_first_len = first_len;
|
100
|
+
|
101
|
+
data += 16;
|
102
|
+
}
|
103
|
+
|
104
|
+
if (return_position && data == data_original) {
|
105
|
+
return utf8_range_ValidateUTF8Naive(data, end, return_position);
|
106
|
+
}
|
107
|
+
const int32_t prev = vgetq_lane_s32(vreinterpretq_s32_u8(prev_input), 3);
|
108
|
+
data -= utf8_range_CodepointSkipBackwards(prev);
|
109
|
+
if (return_position) {
|
110
|
+
return (data - data_original) +
|
111
|
+
utf8_range_ValidateUTF8Naive(data, end, return_position);
|
112
|
+
}
|
113
|
+
if (vmaxvq_u32(vreinterpretq_u32_u8(error))) {
|
114
|
+
return 0;
|
115
|
+
}
|
116
|
+
return utf8_range_ValidateUTF8Naive(data, end, return_position);
|
117
|
+
}
|
@@ -0,0 +1,272 @@
|
|
1
|
+
#include <emmintrin.h>
|
2
|
+
#include <smmintrin.h>
|
3
|
+
#include <tmmintrin.h>
|
4
|
+
|
5
|
+
static FORCE_INLINE_ATTR inline size_t utf8_range_ValidateUTF8Simd(
|
6
|
+
const char* data_original, const char* data, const char* end,
|
7
|
+
int return_position) {
|
8
|
+
/* This code checks that utf-8 ranges are structurally valid 16 bytes at once
|
9
|
+
* using superscalar instructions.
|
10
|
+
* The mapping between ranges of codepoint and their corresponding utf-8
|
11
|
+
* sequences is below.
|
12
|
+
*/
|
13
|
+
|
14
|
+
/*
|
15
|
+
* U+0000...U+007F 00...7F
|
16
|
+
* U+0080...U+07FF C2...DF 80...BF
|
17
|
+
* U+0800...U+0FFF E0 A0...BF 80...BF
|
18
|
+
* U+1000...U+CFFF E1...EC 80...BF 80...BF
|
19
|
+
* U+D000...U+D7FF ED 80...9F 80...BF
|
20
|
+
* U+E000...U+FFFF EE...EF 80...BF 80...BF
|
21
|
+
* U+10000...U+3FFFF F0 90...BF 80...BF 80...BF
|
22
|
+
* U+40000...U+FFFFF F1...F3 80...BF 80...BF 80...BF
|
23
|
+
* U+100000...U+10FFFF F4 80...8F 80...BF 80...BF
|
24
|
+
*/
|
25
|
+
|
26
|
+
/* First we compute the type for each byte, as given by the table below.
|
27
|
+
* This type will be used as an index later on.
|
28
|
+
*/
|
29
|
+
|
30
|
+
/*
|
31
|
+
* Index Min Max Byte Type
|
32
|
+
* 0 00 7F Single byte sequence
|
33
|
+
* 1,2,3 80 BF Second, third and fourth byte for many of the sequences.
|
34
|
+
* 4 A0 BF Second byte after E0
|
35
|
+
* 5 80 9F Second byte after ED
|
36
|
+
* 6 90 BF Second byte after F0
|
37
|
+
* 7 80 8F Second byte after F4
|
38
|
+
* 8 C2 F4 First non ASCII byte
|
39
|
+
* 9..15 7F 80 Invalid byte
|
40
|
+
*/
|
41
|
+
|
42
|
+
/* After the first step we compute the index for all bytes, then we permute
|
43
|
+
the bytes according to their indices to check the ranges from the range
|
44
|
+
table.
|
45
|
+
* The range for a given type can be found in the range_min_table and
|
46
|
+
range_max_table, the range for type/index X is in range_min_table[X] ...
|
47
|
+
range_max_table[X].
|
48
|
+
*/
|
49
|
+
|
50
|
+
/* Algorithm:
|
51
|
+
* Put index zero to all bytes.
|
52
|
+
* Find all non ASCII characters, give them index 8.
|
53
|
+
* For each tail byte in a codepoint sequence, give it an index corresponding
|
54
|
+
to the 1 based index from the end.
|
55
|
+
* If the first byte of the codepoint is in the [C0...DF] range, we write
|
56
|
+
index 1 in the following byte.
|
57
|
+
* If the first byte of the codepoint is in the range [E0...EF], we write
|
58
|
+
indices 2 and 1 in the next two bytes.
|
59
|
+
* If the first byte of the codepoint is in the range [F0...FF] we write
|
60
|
+
indices 3,2,1 into the next three bytes.
|
61
|
+
* For finding the number of bytes we need to look at high nibbles (4 bits)
|
62
|
+
and do the lookup from the table, it can be done with shift by 4 + shuffle
|
63
|
+
instructions. We call it `first_len`.
|
64
|
+
* Then we shift first_len by 8 bits to get the indices of the 2nd bytes.
|
65
|
+
* Saturating sub 1 and shift by 8 bits to get the indices of the 3rd bytes.
|
66
|
+
* Again to get the indices of the 4th bytes.
|
67
|
+
* Take OR of all that 4 values and check within range.
|
68
|
+
*/
|
69
|
+
/* For example:
|
70
|
+
* input C3 80 68 E2 80 20 A6 F0 A0 80 AC 20 F0 93 80 80
|
71
|
+
* first_len 1 0 0 2 0 0 0 3 0 0 0 0 3 0 0 0
|
72
|
+
* 1st byte 8 0 0 8 0 0 0 8 0 0 0 0 8 0 0 0
|
73
|
+
* 2nd byte 0 1 0 0 2 0 0 0 3 0 0 0 0 3 0 0 // Shift + sub
|
74
|
+
* 3rd byte 0 0 0 0 0 1 0 0 0 2 0 0 0 0 2 0 // Shift + sub
|
75
|
+
* 4th byte 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 // Shift + sub
|
76
|
+
* Index 8 1 0 8 2 1 0 8 3 2 1 0 8 3 2 1 // OR of results
|
77
|
+
*/
|
78
|
+
|
79
|
+
/* Checking for errors:
|
80
|
+
* Error checking is done by looking up the high nibble (4 bits) of each byte
|
81
|
+
against an error checking table.
|
82
|
+
* Because the lookup value for the second byte depends of the value of the
|
83
|
+
first byte in codepoint, we use saturated operations to adjust the index.
|
84
|
+
* Specifically we need to add 2 for E0, 3 for ED, 3 for F0 and 4 for F4 to
|
85
|
+
match the correct index.
|
86
|
+
* If we subtract from all bytes EF then EO -> 241, ED -> 254, F0 -> 1,
|
87
|
+
F4 -> 5
|
88
|
+
* Do saturating sub 240, then E0 -> 1, ED -> 14 and we can do lookup to
|
89
|
+
match the adjustment
|
90
|
+
* Add saturating 112, then F0 -> 113, F4 -> 117, all that were > 16 will
|
91
|
+
be more 128 and lookup in ef_fe_table will return 0 but for F0
|
92
|
+
and F4 it will be 4 and 5 accordingly
|
93
|
+
*/
|
94
|
+
/*
|
95
|
+
* Then just check the appropriate ranges with greater/smaller equal
|
96
|
+
instructions. Check tail with a naive algorithm.
|
97
|
+
* To save from previous 16 byte checks we just align previous_first_len to
|
98
|
+
get correct continuations of the codepoints.
|
99
|
+
*/
|
100
|
+
|
101
|
+
/*
|
102
|
+
* Map high nibble of "First Byte" to legal character length minus 1
|
103
|
+
* 0x00 ~ 0xBF --> 0
|
104
|
+
* 0xC0 ~ 0xDF --> 1
|
105
|
+
* 0xE0 ~ 0xEF --> 2
|
106
|
+
* 0xF0 ~ 0xFF --> 3
|
107
|
+
*/
|
108
|
+
const __m128i first_len_table =
|
109
|
+
_mm_setr_epi8(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3);
|
110
|
+
|
111
|
+
/* Map "First Byte" to 8-th item of range table (0xC2 ~ 0xF4) */
|
112
|
+
const __m128i first_range_table =
|
113
|
+
_mm_setr_epi8(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8);
|
114
|
+
|
115
|
+
/*
|
116
|
+
* Range table, map range index to min and max values
|
117
|
+
*/
|
118
|
+
const __m128i range_min_table =
|
119
|
+
_mm_setr_epi8(0x00, 0x80, 0x80, 0x80, 0xA0, 0x80, 0x90, 0x80, 0xC2, 0x7F,
|
120
|
+
0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F);
|
121
|
+
|
122
|
+
const __m128i range_max_table =
|
123
|
+
_mm_setr_epi8(0x7F, 0xBF, 0xBF, 0xBF, 0xBF, 0x9F, 0xBF, 0x8F, 0xF4, 0x80,
|
124
|
+
0x80, 0x80, 0x80, 0x80, 0x80, 0x80);
|
125
|
+
|
126
|
+
/*
|
127
|
+
* Tables for fast handling of four special First Bytes(E0,ED,F0,F4), after
|
128
|
+
* which the Second Byte are not 80~BF. It contains "range index adjustment".
|
129
|
+
* +------------+---------------+------------------+----------------+
|
130
|
+
* | First Byte | original range| range adjustment | adjusted range |
|
131
|
+
* +------------+---------------+------------------+----------------+
|
132
|
+
* | E0 | 2 | 2 | 4 |
|
133
|
+
* +------------+---------------+------------------+----------------+
|
134
|
+
* | ED | 2 | 3 | 5 |
|
135
|
+
* +------------+---------------+------------------+----------------+
|
136
|
+
* | F0 | 3 | 3 | 6 |
|
137
|
+
* +------------+---------------+------------------+----------------+
|
138
|
+
* | F4 | 4 | 4 | 8 |
|
139
|
+
* +------------+---------------+------------------+----------------+
|
140
|
+
*/
|
141
|
+
|
142
|
+
/* df_ee_table[1] -> E0, df_ee_table[14] -> ED as ED - E0 = 13 */
|
143
|
+
// The values represent the adjustment in the Range Index table for a correct
|
144
|
+
// index.
|
145
|
+
const __m128i df_ee_table =
|
146
|
+
_mm_setr_epi8(0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0);
|
147
|
+
|
148
|
+
/* ef_fe_table[1] -> F0, ef_fe_table[5] -> F4, F4 - F0 = 4 */
|
149
|
+
// The values represent the adjustment in the Range Index table for a correct
|
150
|
+
// index.
|
151
|
+
const __m128i ef_fe_table =
|
152
|
+
_mm_setr_epi8(0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
153
|
+
|
154
|
+
__m128i prev_input = _mm_set1_epi8(0);
|
155
|
+
__m128i prev_first_len = _mm_set1_epi8(0);
|
156
|
+
__m128i error = _mm_set1_epi8(0);
|
157
|
+
|
158
|
+
while (end - data >= 16) {
|
159
|
+
const __m128i input = _mm_loadu_si128((const __m128i*)(data));
|
160
|
+
|
161
|
+
/* high_nibbles = input >> 4 */
|
162
|
+
const __m128i high_nibbles =
|
163
|
+
_mm_and_si128(_mm_srli_epi16(input, 4), _mm_set1_epi8(0x0F));
|
164
|
+
|
165
|
+
/* first_len = legal character length minus 1 */
|
166
|
+
/* 0 for 00~7F, 1 for C0~DF, 2 for E0~EF, 3 for F0~FF */
|
167
|
+
/* first_len = first_len_table[high_nibbles] */
|
168
|
+
__m128i first_len = _mm_shuffle_epi8(first_len_table, high_nibbles);
|
169
|
+
|
170
|
+
/* First Byte: set range index to 8 for bytes within 0xC0 ~ 0xFF */
|
171
|
+
/* range = first_range_table[high_nibbles] */
|
172
|
+
__m128i range = _mm_shuffle_epi8(first_range_table, high_nibbles);
|
173
|
+
|
174
|
+
/* Second Byte: set range index to first_len */
|
175
|
+
/* 0 for 00~7F, 1 for C0~DF, 2 for E0~EF, 3 for F0~FF */
|
176
|
+
/* range |= (first_len, prev_first_len) << 1 byte */
|
177
|
+
range = _mm_or_si128(range, _mm_alignr_epi8(first_len, prev_first_len, 15));
|
178
|
+
|
179
|
+
/* Third Byte: set range index to saturate_sub(first_len, 1) */
|
180
|
+
/* 0 for 00~7F, 0 for C0~DF, 1 for E0~EF, 2 for F0~FF */
|
181
|
+
__m128i tmp1;
|
182
|
+
__m128i tmp2;
|
183
|
+
/* tmp1 = saturate_sub(first_len, 1) */
|
184
|
+
tmp1 = _mm_subs_epu8(first_len, _mm_set1_epi8(1));
|
185
|
+
/* tmp2 = saturate_sub(prev_first_len, 1) */
|
186
|
+
tmp2 = _mm_subs_epu8(prev_first_len, _mm_set1_epi8(1));
|
187
|
+
/* range |= (tmp1, tmp2) << 2 bytes */
|
188
|
+
range = _mm_or_si128(range, _mm_alignr_epi8(tmp1, tmp2, 14));
|
189
|
+
|
190
|
+
/* Fourth Byte: set range index to saturate_sub(first_len, 2) */
|
191
|
+
/* 0 for 00~7F, 0 for C0~DF, 0 for E0~EF, 1 for F0~FF */
|
192
|
+
/* tmp1 = saturate_sub(first_len, 2) */
|
193
|
+
tmp1 = _mm_subs_epu8(first_len, _mm_set1_epi8(2));
|
194
|
+
/* tmp2 = saturate_sub(prev_first_len, 2) */
|
195
|
+
tmp2 = _mm_subs_epu8(prev_first_len, _mm_set1_epi8(2));
|
196
|
+
/* range |= (tmp1, tmp2) << 3 bytes */
|
197
|
+
range = _mm_or_si128(range, _mm_alignr_epi8(tmp1, tmp2, 13));
|
198
|
+
|
199
|
+
/*
|
200
|
+
* Now we have below range indices calculated
|
201
|
+
* Correct cases:
|
202
|
+
* - 8 for C0~FF
|
203
|
+
* - 3 for 1st byte after F0~FF
|
204
|
+
* - 2 for 1st byte after E0~EF or 2nd byte after F0~FF
|
205
|
+
* - 1 for 1st byte after C0~DF or 2nd byte after E0~EF or
|
206
|
+
* 3rd byte after F0~FF
|
207
|
+
* - 0 for others
|
208
|
+
* Error cases:
|
209
|
+
* >9 for non ascii First Byte overlapping
|
210
|
+
* E.g., F1 80 C2 90 --> 8 3 10 2, where 10 indicates error
|
211
|
+
*/
|
212
|
+
|
213
|
+
/* Adjust Second Byte range for special First Bytes(E0,ED,F0,F4) */
|
214
|
+
/* Overlaps lead to index 9~15, which are illegal in range table */
|
215
|
+
__m128i shift1;
|
216
|
+
__m128i pos;
|
217
|
+
__m128i range2;
|
218
|
+
/* shift1 = (input, prev_input) << 1 byte */
|
219
|
+
shift1 = _mm_alignr_epi8(input, prev_input, 15);
|
220
|
+
pos = _mm_sub_epi8(shift1, _mm_set1_epi8(0xEF));
|
221
|
+
/*
|
222
|
+
* shift1: | EF F0 ... FE | FF 00 ... ... DE | DF E0 ... EE |
|
223
|
+
* pos: | 0 1 15 | 16 17 239| 240 241 255|
|
224
|
+
* pos-240: | 0 0 0 | 0 0 0 | 0 1 15 |
|
225
|
+
* pos+112: | 112 113 127| >= 128 | >= 128 |
|
226
|
+
*/
|
227
|
+
tmp1 = _mm_subs_epu8(pos, _mm_set1_epi8(-16));
|
228
|
+
range2 = _mm_shuffle_epi8(df_ee_table, tmp1);
|
229
|
+
tmp2 = _mm_adds_epu8(pos, _mm_set1_epi8(112));
|
230
|
+
range2 = _mm_add_epi8(range2, _mm_shuffle_epi8(ef_fe_table, tmp2));
|
231
|
+
|
232
|
+
range = _mm_add_epi8(range, range2);
|
233
|
+
|
234
|
+
/* Load min and max values per calculated range index */
|
235
|
+
__m128i min_range = _mm_shuffle_epi8(range_min_table, range);
|
236
|
+
__m128i max_range = _mm_shuffle_epi8(range_max_table, range);
|
237
|
+
|
238
|
+
/* Check value range */
|
239
|
+
if (return_position) {
|
240
|
+
error = _mm_cmplt_epi8(input, min_range);
|
241
|
+
error = _mm_or_si128(error, _mm_cmpgt_epi8(input, max_range));
|
242
|
+
/* 5% performance drop from this conditional branch */
|
243
|
+
if (!_mm_testz_si128(error, error)) {
|
244
|
+
break;
|
245
|
+
}
|
246
|
+
} else {
|
247
|
+
error = _mm_or_si128(error, _mm_cmplt_epi8(input, min_range));
|
248
|
+
error = _mm_or_si128(error, _mm_cmpgt_epi8(input, max_range));
|
249
|
+
}
|
250
|
+
|
251
|
+
prev_input = input;
|
252
|
+
prev_first_len = first_len;
|
253
|
+
|
254
|
+
data += 16;
|
255
|
+
}
|
256
|
+
/* If we got to the end, we don't need to skip any bytes backwards */
|
257
|
+
if (return_position && data == data_original) {
|
258
|
+
return utf8_range_ValidateUTF8Naive(data, end, return_position);
|
259
|
+
}
|
260
|
+
/* Find previous codepoint (not 80~BF) */
|
261
|
+
data -= utf8_range_CodepointSkipBackwards(_mm_extract_epi32(prev_input, 3));
|
262
|
+
if (return_position) {
|
263
|
+
return (data - data_original) +
|
264
|
+
utf8_range_ValidateUTF8Naive(data, end, return_position);
|
265
|
+
}
|
266
|
+
/* Test if there was any error */
|
267
|
+
if (!_mm_testz_si128(error, error)) {
|
268
|
+
return 0;
|
269
|
+
}
|
270
|
+
/* Check the tail */
|
271
|
+
return utf8_range_ValidateUTF8Naive(data, end, return_position);
|
272
|
+
}
|
data/third_party/zlib/deflate.c
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/* deflate.c -- compress data using the deflation algorithm
|
2
|
-
* Copyright (C) 1995-
|
2
|
+
* Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
|
3
3
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
4
4
|
*/
|
5
5
|
|
@@ -52,7 +52,7 @@
|
|
52
52
|
#include "deflate.h"
|
53
53
|
|
54
54
|
const char deflate_copyright[] =
|
55
|
-
" deflate 1.3 Copyright 1995-
|
55
|
+
" deflate 1.3.1.1 Copyright 1995-2024 Jean-loup Gailly and Mark Adler ";
|
56
56
|
/*
|
57
57
|
If you use the zlib library in a product, an acknowledgment is welcome
|
58
58
|
in the documentation of your product. If for some reason you cannot
|
@@ -493,7 +493,7 @@ int ZEXPORT deflateInit2_(z_streamp strm, int level, int method,
|
|
493
493
|
* symbols from which it is being constructed.
|
494
494
|
*/
|
495
495
|
|
496
|
-
s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize,
|
496
|
+
s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, LIT_BUFS);
|
497
497
|
s->pending_buf_size = (ulg)s->lit_bufsize * 4;
|
498
498
|
|
499
499
|
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
|
@@ -503,8 +503,14 @@ int ZEXPORT deflateInit2_(z_streamp strm, int level, int method,
|
|
503
503
|
deflateEnd (strm);
|
504
504
|
return Z_MEM_ERROR;
|
505
505
|
}
|
506
|
+
#ifdef LIT_MEM
|
507
|
+
s->d_buf = (ushf *)(s->pending_buf + (s->lit_bufsize << 1));
|
508
|
+
s->l_buf = s->pending_buf + (s->lit_bufsize << 2);
|
509
|
+
s->sym_end = s->lit_bufsize - 1;
|
510
|
+
#else
|
506
511
|
s->sym_buf = s->pending_buf + s->lit_bufsize;
|
507
512
|
s->sym_end = (s->lit_bufsize - 1) * 3;
|
513
|
+
#endif
|
508
514
|
/* We avoid equality with lit_bufsize*3 because of wraparound at 64K
|
509
515
|
* on 16 bit machines and because stored blocks are restricted to
|
510
516
|
* 64K-1 bytes.
|
@@ -720,9 +726,15 @@ int ZEXPORT deflatePrime(z_streamp strm, int bits, int value) {
|
|
720
726
|
|
721
727
|
if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
|
722
728
|
s = strm->state;
|
729
|
+
#ifdef LIT_MEM
|
730
|
+
if (bits < 0 || bits > 16 ||
|
731
|
+
(uchf *)s->d_buf < s->pending_out + ((Buf_size + 7) >> 3))
|
732
|
+
return Z_BUF_ERROR;
|
733
|
+
#else
|
723
734
|
if (bits < 0 || bits > 16 ||
|
724
735
|
s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
|
725
736
|
return Z_BUF_ERROR;
|
737
|
+
#endif
|
726
738
|
do {
|
727
739
|
put = Buf_size - s->bi_valid;
|
728
740
|
if (put > bits)
|
@@ -1294,7 +1306,7 @@ int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) {
|
|
1294
1306
|
ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
|
1295
1307
|
ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos));
|
1296
1308
|
ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos));
|
1297
|
-
ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize,
|
1309
|
+
ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, LIT_BUFS);
|
1298
1310
|
|
1299
1311
|
if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
|
1300
1312
|
ds->pending_buf == Z_NULL) {
|
@@ -1305,10 +1317,15 @@ int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) {
|
|
1305
1317
|
zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
|
1306
1318
|
zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos));
|
1307
1319
|
zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos));
|
1308
|
-
zmemcpy(ds->pending_buf, ss->pending_buf,
|
1320
|
+
zmemcpy(ds->pending_buf, ss->pending_buf, ds->lit_bufsize * LIT_BUFS);
|
1309
1321
|
|
1310
1322
|
ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
|
1323
|
+
#ifdef LIT_MEM
|
1324
|
+
ds->d_buf = (ushf *)(ds->pending_buf + (ds->lit_bufsize << 1));
|
1325
|
+
ds->l_buf = ds->pending_buf + (ds->lit_bufsize << 2);
|
1326
|
+
#else
|
1311
1327
|
ds->sym_buf = ds->pending_buf + ds->lit_bufsize;
|
1328
|
+
#endif
|
1312
1329
|
|
1313
1330
|
ds->l_desc.dyn_tree = ds->dyn_ltree;
|
1314
1331
|
ds->d_desc.dyn_tree = ds->dyn_dtree;
|
@@ -1539,13 +1556,21 @@ local uInt longest_match(deflate_state *s, IPos cur_match) {
|
|
1539
1556
|
*/
|
1540
1557
|
local void check_match(deflate_state *s, IPos start, IPos match, int length) {
|
1541
1558
|
/* check that the match is indeed a match */
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1559
|
+
Bytef *back = s->window + (int)match, *here = s->window + start;
|
1560
|
+
IPos len = length;
|
1561
|
+
if (match == (IPos)-1) {
|
1562
|
+
/* match starts one byte before the current window -- just compare the
|
1563
|
+
subsequent length-1 bytes */
|
1564
|
+
back++;
|
1565
|
+
here++;
|
1566
|
+
len--;
|
1567
|
+
}
|
1568
|
+
if (zmemcmp(back, here, len) != EQUAL) {
|
1569
|
+
fprintf(stderr, " start %u, match %d, length %d\n",
|
1570
|
+
start, (int)match, length);
|
1546
1571
|
do {
|
1547
|
-
fprintf(stderr, "%
|
1548
|
-
} while (--
|
1572
|
+
fprintf(stderr, "(%02x %02x)", *back++, *here++);
|
1573
|
+
} while (--len != 0);
|
1549
1574
|
z_error("invalid match");
|
1550
1575
|
}
|
1551
1576
|
if (z_verbose > 1) {
|
@@ -1646,10 +1671,10 @@ local block_state deflate_stored(deflate_state *s, int flush) {
|
|
1646
1671
|
_tr_stored_block(s, (char *)0, 0L, last);
|
1647
1672
|
|
1648
1673
|
/* Replace the lengths in the dummy stored block with len. */
|
1649
|
-
s->pending_buf[s->pending - 4] = len;
|
1650
|
-
s->pending_buf[s->pending - 3] = len >> 8;
|
1651
|
-
s->pending_buf[s->pending - 2] = ~len;
|
1652
|
-
s->pending_buf[s->pending - 1] = ~len >> 8;
|
1674
|
+
s->pending_buf[s->pending - 4] = (Bytef)len;
|
1675
|
+
s->pending_buf[s->pending - 3] = (Bytef)(len >> 8);
|
1676
|
+
s->pending_buf[s->pending - 2] = (Bytef)~len;
|
1677
|
+
s->pending_buf[s->pending - 1] = (Bytef)(~len >> 8);
|
1653
1678
|
|
1654
1679
|
/* Write the stored block header bytes. */
|
1655
1680
|
flush_pending(s->strm);
|
data/third_party/zlib/deflate.h
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/* deflate.h -- internal compression state
|
2
|
-
* Copyright (C) 1995-
|
2
|
+
* Copyright (C) 1995-2024 Jean-loup Gailly
|
3
3
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
4
4
|
*/
|
5
5
|
|
@@ -23,6 +23,10 @@
|
|
23
23
|
# define GZIP
|
24
24
|
#endif
|
25
25
|
|
26
|
+
/* define LIT_MEM to slightly increase the speed of deflate (order 1% to 2%) at
|
27
|
+
the cost of a larger memory footprint */
|
28
|
+
/* #define LIT_MEM */
|
29
|
+
|
26
30
|
/* ===========================================================================
|
27
31
|
* Internal compression state.
|
28
32
|
*/
|
@@ -217,7 +221,14 @@ typedef struct internal_state {
|
|
217
221
|
/* Depth of each subtree used as tie breaker for trees of equal frequency
|
218
222
|
*/
|
219
223
|
|
224
|
+
#ifdef LIT_MEM
|
225
|
+
# define LIT_BUFS 5
|
226
|
+
ushf *d_buf; /* buffer for distances */
|
227
|
+
uchf *l_buf; /* buffer for literals/lengths */
|
228
|
+
#else
|
229
|
+
# define LIT_BUFS 4
|
220
230
|
uchf *sym_buf; /* buffer for distances and literals/lengths */
|
231
|
+
#endif
|
221
232
|
|
222
233
|
uInt lit_bufsize;
|
223
234
|
/* Size of match buffer for literals/lengths. There are 4 reasons for
|
@@ -239,7 +250,7 @@ typedef struct internal_state {
|
|
239
250
|
* - I can't count above 4
|
240
251
|
*/
|
241
252
|
|
242
|
-
uInt sym_next; /* running index in
|
253
|
+
uInt sym_next; /* running index in symbol buffer */
|
243
254
|
uInt sym_end; /* symbol table full when sym_next reaches this */
|
244
255
|
|
245
256
|
ulg opt_len; /* bit length of current block with optimal trees */
|
@@ -318,6 +329,25 @@ void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf,
|
|
318
329
|
extern const uch ZLIB_INTERNAL _dist_code[];
|
319
330
|
#endif
|
320
331
|
|
332
|
+
#ifdef LIT_MEM
|
333
|
+
# define _tr_tally_lit(s, c, flush) \
|
334
|
+
{ uch cc = (c); \
|
335
|
+
s->d_buf[s->sym_next] = 0; \
|
336
|
+
s->l_buf[s->sym_next++] = cc; \
|
337
|
+
s->dyn_ltree[cc].Freq++; \
|
338
|
+
flush = (s->sym_next == s->sym_end); \
|
339
|
+
}
|
340
|
+
# define _tr_tally_dist(s, distance, length, flush) \
|
341
|
+
{ uch len = (uch)(length); \
|
342
|
+
ush dist = (ush)(distance); \
|
343
|
+
s->d_buf[s->sym_next] = dist; \
|
344
|
+
s->l_buf[s->sym_next++] = len; \
|
345
|
+
dist--; \
|
346
|
+
s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
|
347
|
+
s->dyn_dtree[d_code(dist)].Freq++; \
|
348
|
+
flush = (s->sym_next == s->sym_end); \
|
349
|
+
}
|
350
|
+
#else
|
321
351
|
# define _tr_tally_lit(s, c, flush) \
|
322
352
|
{ uch cc = (c); \
|
323
353
|
s->sym_buf[s->sym_next++] = 0; \
|
@@ -337,6 +367,7 @@ void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf,
|
|
337
367
|
s->dyn_dtree[d_code(dist)].Freq++; \
|
338
368
|
flush = (s->sym_next == s->sym_end); \
|
339
369
|
}
|
370
|
+
#endif
|
340
371
|
#else
|
341
372
|
# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
|
342
373
|
# define _tr_tally_dist(s, distance, length, flush) \
|
data/third_party/zlib/gzguts.h
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/* gzguts.h -- zlib internal header definitions for gz* operations
|
2
|
-
* Copyright (C) 2004-
|
2
|
+
* Copyright (C) 2004-2024 Mark Adler
|
3
3
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
4
4
|
*/
|
5
5
|
|
@@ -210,9 +210,5 @@ char ZLIB_INTERNAL *gz_strwinerror(DWORD error);
|
|
210
210
|
/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
|
211
211
|
value -- needed when comparing unsigned to z_off64_t, which is signed
|
212
212
|
(possible z_off64_t types off_t, off64_t, and long are all signed) */
|
213
|
-
#ifdef INT_MAX
|
214
|
-
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
|
215
|
-
#else
|
216
213
|
unsigned ZLIB_INTERNAL gz_intmax(void);
|
217
|
-
#
|
218
|
-
#endif
|
214
|
+
#define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
|
data/third_party/zlib/inflate.c
CHANGED
@@ -1387,7 +1387,7 @@ int ZEXPORT inflateSync(z_streamp strm) {
|
|
1387
1387
|
/* if first time, start search in bit buffer */
|
1388
1388
|
if (state->mode != SYNC) {
|
1389
1389
|
state->mode = SYNC;
|
1390
|
-
state->hold
|
1390
|
+
state->hold >>= state->bits & 7;
|
1391
1391
|
state->bits -= state->bits & 7;
|
1392
1392
|
len = 0;
|
1393
1393
|
while (state->bits >= 8) {
|
data/third_party/zlib/inftrees.c
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/* inftrees.c -- generate Huffman trees for efficient decoding
|
2
|
-
* Copyright (C) 1995-
|
2
|
+
* Copyright (C) 1995-2024 Mark Adler
|
3
3
|
* For conditions of distribution and use, see copyright notice in zlib.h
|
4
4
|
*/
|
5
5
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
#define MAXBITS 15
|
10
10
|
|
11
11
|
const char inflate_copyright[] =
|
12
|
-
" inflate 1.3 Copyright 1995-
|
12
|
+
" inflate 1.3.1.1 Copyright 1995-2024 Mark Adler ";
|
13
13
|
/*
|
14
14
|
If you use the zlib library in a product, an acknowledgment is welcome
|
15
15
|
in the documentation of your product. If for some reason you cannot
|
@@ -57,7 +57,7 @@ int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens,
|
|
57
57
|
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
|
58
58
|
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
|
59
59
|
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
|
60
|
-
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16,
|
60
|
+
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 73, 200};
|
61
61
|
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
|
62
62
|
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
|
63
63
|
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
|
data/third_party/zlib/inftrees.h
CHANGED
@@ -41,8 +41,8 @@ typedef struct {
|
|
41
41
|
examples/enough.c found in the zlib distribution. The arguments to that
|
42
42
|
program are the number of symbols, the initial root table size, and the
|
43
43
|
maximum bit length of a code. "enough 286 9 15" for literal/length codes
|
44
|
-
returns
|
45
|
-
|
44
|
+
returns 852, and "enough 30 6 15" for distance codes returns 592. The
|
45
|
+
initial root table size (9 or 6) is found in the fifth argument of the
|
46
46
|
inflate_table() calls in inflate.c and infback.c. If the root table size is
|
47
47
|
changed, then these maximum sizes would be need to be recalculated and
|
48
48
|
updated. */
|