grpc 1.26.0 → 1.28.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.

Files changed (829) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +1699 -1482
  3. data/etc/roots.pem +44 -0
  4. data/include/grpc/grpc_security.h +37 -15
  5. data/include/grpc/grpc_security_constants.h +27 -0
  6. data/include/grpc/impl/codegen/grpc_types.h +19 -0
  7. data/include/grpc/impl/codegen/port_platform.h +8 -1
  8. data/include/grpc/impl/codegen/sync.h +5 -3
  9. data/include/grpc/impl/codegen/sync_abseil.h +36 -0
  10. data/include/grpc/module.modulemap +3 -0
  11. data/{src/core/lib/json/json_common.h → include/grpc/support/sync_abseil.h} +7 -15
  12. data/src/core/ext/filters/client_channel/client_channel.cc +74 -32
  13. data/src/core/ext/filters/client_channel/client_channel_channelz.cc +31 -47
  14. data/src/core/ext/filters/client_channel/client_channel_channelz.h +1 -3
  15. data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +1 -1
  16. data/src/core/ext/filters/client_channel/http_proxy.cc +8 -5
  17. data/src/core/ext/filters/client_channel/lb_policy.cc +4 -3
  18. data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +291 -0
  19. data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +83 -0
  20. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +224 -367
  21. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +88 -121
  22. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +28 -57
  23. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +18 -21
  24. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +9 -13
  25. data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +85 -83
  26. data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +623 -767
  27. data/src/core/ext/filters/client_channel/lb_policy_factory.h +3 -3
  28. data/src/core/ext/filters/client_channel/lb_policy_registry.cc +43 -75
  29. data/src/core/ext/filters/client_channel/lb_policy_registry.h +1 -1
  30. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +57 -70
  31. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +1 -1
  32. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +1 -1
  33. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +1 -1
  34. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +3 -3
  35. data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +2 -2
  36. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +1 -1
  37. data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +3 -3
  38. data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +31 -7
  39. data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +228 -286
  40. data/src/core/ext/filters/client_channel/resolver_result_parsing.h +2 -2
  41. data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +37 -176
  42. data/src/core/ext/filters/client_channel/resolving_lb_policy.h +7 -11
  43. data/src/core/ext/filters/client_channel/service_config.cc +91 -160
  44. data/src/core/ext/filters/client_channel/service_config.h +14 -21
  45. data/src/core/ext/filters/client_channel/xds/xds_api.cc +1426 -229
  46. data/src/core/ext/filters/client_channel/xds/xds_api.h +214 -115
  47. data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +236 -339
  48. data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +32 -45
  49. data/src/core/ext/filters/client_channel/xds/xds_channel.h +3 -1
  50. data/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc +14 -9
  51. data/src/core/ext/filters/client_channel/xds/xds_client.cc +986 -252
  52. data/src/core/ext/filters/client_channel/xds/xds_client.h +84 -36
  53. data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +53 -131
  54. data/src/core/ext/filters/client_channel/xds/xds_client_stats.h +119 -152
  55. data/src/core/ext/filters/message_size/message_size_filter.cc +32 -35
  56. data/src/core/ext/filters/message_size/message_size_filter.h +1 -1
  57. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +3 -6
  58. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +6 -8
  59. data/src/core/ext/transport/chttp2/transport/writing.cc +1 -1
  60. data/src/core/ext/transport/inproc/inproc_transport.cc +22 -42
  61. data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c +17 -0
  62. data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +30 -0
  63. data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +27 -0
  64. data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +54 -0
  65. data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +46 -21
  66. data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +116 -29
  67. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +4 -362
  68. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +14 -1337
  69. data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +390 -0
  70. data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +1411 -0
  71. data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +29 -8
  72. data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +60 -0
  73. data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +1 -0
  74. data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +1 -0
  75. data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +5 -3
  76. data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +6 -2
  77. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +48 -5
  78. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +154 -4
  79. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +19 -15
  80. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +46 -32
  81. data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +26 -4
  82. data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +70 -0
  83. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +42 -25
  84. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +83 -25
  85. data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +1 -0
  86. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +43 -7
  87. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +115 -0
  88. data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +1 -0
  89. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +7 -68
  90. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +14 -201
  91. data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c +91 -0
  92. data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h +240 -0
  93. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +1 -71
  94. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +3 -228
  95. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c +88 -0
  96. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +258 -0
  97. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +1 -0
  98. data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.c +30 -0
  99. data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h +53 -0
  100. data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c +104 -0
  101. data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +383 -0
  102. data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c +17 -0
  103. data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h +33 -0
  104. data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +144 -0
  105. data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +527 -0
  106. data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c +42 -0
  107. data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +112 -0
  108. data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.c +29 -0
  109. data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h +53 -0
  110. data/src/core/ext/upb-generated/envoy/api/v2/route.upb.c +62 -0
  111. data/src/core/ext/upb-generated/envoy/api/v2/route.upb.h +199 -0
  112. data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c +17 -0
  113. data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h +33 -0
  114. data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +793 -0
  115. data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +2936 -0
  116. data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c +58 -0
  117. data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +134 -0
  118. data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.c +27 -0
  119. data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h +53 -0
  120. data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +227 -0
  121. data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +725 -0
  122. data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c +296 -0
  123. data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +1072 -0
  124. data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c +32 -0
  125. data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +65 -0
  126. data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c +47 -0
  127. data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +108 -0
  128. data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c +52 -0
  129. data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +133 -0
  130. data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c +87 -0
  131. data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +258 -0
  132. data/src/core/ext/upb-generated/envoy/type/range.upb.c +11 -0
  133. data/src/core/ext/upb-generated/envoy/type/range.upb.h +27 -0
  134. data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.c +28 -0
  135. data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h +62 -0
  136. data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c +88 -0
  137. data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +249 -0
  138. data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +30 -27
  139. data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +64 -52
  140. data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +13 -5
  141. data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +34 -0
  142. data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +48 -0
  143. data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +104 -0
  144. data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c +17 -0
  145. data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +30 -0
  146. data/src/core/ext/upb-generated/validate/validate.upb.c +38 -34
  147. data/src/core/ext/upb-generated/validate/validate.upb.h +129 -99
  148. data/src/core/lib/channel/channel_trace.cc +32 -41
  149. data/src/core/lib/channel/channel_trace.h +3 -3
  150. data/src/core/lib/channel/channelz.cc +158 -248
  151. data/src/core/lib/channel/channelz.h +17 -10
  152. data/src/core/lib/channel/channelz_registry.cc +47 -74
  153. data/src/core/lib/channel/channelz_registry.h +4 -4
  154. data/src/core/lib/gpr/sync_abseil.cc +114 -0
  155. data/src/core/lib/gpr/sync_posix.cc +8 -5
  156. data/src/core/lib/gpr/sync_windows.cc +4 -2
  157. data/src/core/lib/gpr/time_precise.cc +1 -1
  158. data/src/core/lib/gprpp/host_port.cc +1 -1
  159. data/src/core/lib/gprpp/inlined_vector.h +1 -210
  160. data/src/core/lib/gprpp/memory.h +2 -6
  161. data/src/core/lib/gprpp/optional.h +6 -21
  162. data/src/core/lib/gprpp/string_view.h +5 -110
  163. data/src/core/lib/gprpp/sync.h +9 -0
  164. data/src/core/lib/iomgr/buffer_list.cc +36 -35
  165. data/src/core/lib/iomgr/error.h +4 -4
  166. data/src/core/lib/iomgr/ev_epollex_linux.cc +12 -4
  167. data/src/core/lib/iomgr/executor.cc +1 -1
  168. data/src/core/lib/iomgr/fork_posix.cc +4 -0
  169. data/src/core/lib/iomgr/load_file.cc +1 -0
  170. data/src/core/lib/iomgr/poller/eventmanager_libuv.cc +87 -0
  171. data/src/core/lib/iomgr/poller/eventmanager_libuv.h +88 -0
  172. data/src/core/lib/iomgr/socket_utils_common_posix.cc +14 -0
  173. data/src/core/lib/iomgr/socket_utils_posix.h +12 -0
  174. data/src/core/lib/iomgr/tcp_client_posix.cc +17 -17
  175. data/src/core/lib/iomgr/tcp_client_posix.h +6 -6
  176. data/src/core/lib/iomgr/tcp_custom.h +3 -0
  177. data/src/core/lib/iomgr/tcp_posix.cc +608 -56
  178. data/src/core/lib/iomgr/tcp_server_custom.cc +15 -2
  179. data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +8 -0
  180. data/src/core/lib/iomgr/work_serializer.cc +155 -0
  181. data/src/core/lib/iomgr/work_serializer.h +65 -0
  182. data/src/core/lib/json/json.h +208 -68
  183. data/src/core/lib/json/json_reader.cc +511 -319
  184. data/src/core/lib/json/json_writer.cc +201 -110
  185. data/src/core/lib/security/credentials/alts/check_gcp_environment.cc +1 -1
  186. data/src/core/lib/security/credentials/composite/composite_credentials.cc +7 -0
  187. data/src/core/lib/security/credentials/composite/composite_credentials.h +5 -1
  188. data/src/core/lib/security/credentials/credentials.h +10 -1
  189. data/src/core/lib/security/credentials/fake/fake_credentials.h +2 -1
  190. data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +10 -8
  191. data/src/core/lib/security/credentials/jwt/json_token.cc +26 -56
  192. data/src/core/lib/security/credentials/jwt/json_token.h +2 -1
  193. data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +8 -18
  194. data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +149 -159
  195. data/src/core/lib/security/credentials/jwt/jwt_verifier.h +2 -3
  196. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +38 -35
  197. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +1 -1
  198. data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +6 -4
  199. data/src/core/lib/security/credentials/plugin/plugin_credentials.h +2 -1
  200. data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +20 -0
  201. data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +9 -0
  202. data/src/core/lib/security/credentials/tls/{spiffe_credentials.cc → tls_credentials.cc} +23 -24
  203. data/src/core/lib/security/credentials/tls/{spiffe_credentials.h → tls_credentials.h} +9 -9
  204. data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +13 -0
  205. data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +22 -2
  206. data/src/core/lib/security/security_connector/load_system_roots_fallback.cc +2 -2
  207. data/src/core/lib/security/security_connector/load_system_roots_linux.cc +2 -2
  208. data/src/core/lib/security/security_connector/local/local_security_connector.cc +31 -6
  209. data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +3 -15
  210. data/src/core/lib/security/security_connector/ssl_utils.cc +48 -4
  211. data/src/core/lib/security/security_connector/ssl_utils.h +12 -1
  212. data/src/core/lib/security/security_connector/tls/{spiffe_security_connector.cc → tls_security_connector.cc} +106 -70
  213. data/src/core/lib/security/security_connector/tls/{spiffe_security_connector.h → tls_security_connector.h} +22 -19
  214. data/src/core/lib/security/transport/client_auth_filter.cc +33 -0
  215. data/src/core/lib/security/transport/security_handshaker.cc +2 -2
  216. data/src/core/lib/security/util/json_util.cc +22 -15
  217. data/src/core/lib/security/util/json_util.h +2 -2
  218. data/src/core/lib/surface/completion_queue.cc +22 -1
  219. data/src/core/lib/surface/version.cc +1 -1
  220. data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +1 -1
  221. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +12 -2
  222. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +1 -1
  223. data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +3 -3
  224. data/src/core/tsi/fake_transport_security.cc +7 -3
  225. data/src/core/tsi/fake_transport_security.h +2 -0
  226. data/src/core/tsi/grpc_shadow_boringssl.h +1333 -1319
  227. data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
  228. data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +1 -1
  229. data/src/core/tsi/ssl_transport_security.cc +145 -8
  230. data/src/core/tsi/ssl_transport_security.h +15 -1
  231. data/src/core/tsi/transport_security.cc +13 -0
  232. data/src/core/tsi/transport_security_grpc.cc +2 -2
  233. data/src/core/tsi/transport_security_grpc.h +2 -2
  234. data/src/core/tsi/transport_security_interface.h +12 -0
  235. data/src/ruby/bin/math_pb.rb +5 -5
  236. data/src/ruby/ext/grpc/rb_call_credentials.c +4 -1
  237. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +2 -0
  238. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +4 -1
  239. data/src/ruby/lib/grpc/version.rb +1 -1
  240. data/src/ruby/pb/grpc/health/v1/health_pb.rb +3 -3
  241. data/src/ruby/pb/src/proto/grpc/testing/empty_pb.rb +1 -1
  242. data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +23 -13
  243. data/third_party/abseil-cpp/absl/algorithm/algorithm.h +159 -0
  244. data/third_party/abseil-cpp/absl/base/attributes.h +621 -0
  245. data/third_party/abseil-cpp/absl/base/call_once.h +226 -0
  246. data/third_party/abseil-cpp/absl/base/casts.h +184 -0
  247. data/third_party/abseil-cpp/absl/base/config.h +671 -0
  248. data/third_party/abseil-cpp/absl/base/const_init.h +76 -0
  249. data/third_party/abseil-cpp/absl/base/dynamic_annotations.cc +129 -0
  250. data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +389 -0
  251. data/third_party/abseil-cpp/absl/base/internal/atomic_hook.h +200 -0
  252. data/third_party/abseil-cpp/absl/base/internal/bits.h +218 -0
  253. data/third_party/abseil-cpp/absl/base/internal/cycleclock.cc +107 -0
  254. data/third_party/abseil-cpp/absl/base/internal/cycleclock.h +94 -0
  255. data/third_party/abseil-cpp/absl/base/internal/endian.h +266 -0
  256. data/third_party/abseil-cpp/absl/base/internal/errno_saver.h +43 -0
  257. data/third_party/abseil-cpp/absl/base/internal/hide_ptr.h +51 -0
  258. data/third_party/abseil-cpp/absl/base/internal/identity.h +37 -0
  259. data/third_party/abseil-cpp/absl/base/internal/inline_variable.h +107 -0
  260. data/third_party/abseil-cpp/absl/base/internal/invoke.h +187 -0
  261. data/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +107 -0
  262. data/third_party/abseil-cpp/absl/base/internal/per_thread_tls.h +52 -0
  263. data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +240 -0
  264. data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +183 -0
  265. data/third_party/abseil-cpp/absl/base/internal/scheduling_mode.h +58 -0
  266. data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +233 -0
  267. data/third_party/abseil-cpp/absl/base/internal/spinlock.h +243 -0
  268. data/third_party/abseil-cpp/absl/base/internal/spinlock_akaros.inc +35 -0
  269. data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +66 -0
  270. data/third_party/abseil-cpp/absl/base/internal/spinlock_posix.inc +46 -0
  271. data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.cc +81 -0
  272. data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.h +93 -0
  273. data/third_party/abseil-cpp/absl/base/internal/spinlock_win32.inc +37 -0
  274. data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +416 -0
  275. data/third_party/abseil-cpp/absl/base/internal/sysinfo.h +66 -0
  276. data/third_party/abseil-cpp/absl/base/internal/thread_annotations.h +271 -0
  277. data/third_party/abseil-cpp/absl/base/internal/thread_identity.cc +152 -0
  278. data/third_party/abseil-cpp/absl/base/internal/thread_identity.h +259 -0
  279. data/third_party/abseil-cpp/absl/base/internal/throw_delegate.cc +108 -0
  280. data/third_party/abseil-cpp/absl/base/internal/throw_delegate.h +75 -0
  281. data/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h +66 -0
  282. data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +158 -0
  283. data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +140 -0
  284. data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +124 -0
  285. data/third_party/abseil-cpp/absl/base/log_severity.cc +27 -0
  286. data/third_party/abseil-cpp/absl/base/log_severity.h +121 -0
  287. data/third_party/abseil-cpp/absl/base/macros.h +220 -0
  288. data/third_party/abseil-cpp/absl/base/optimization.h +181 -0
  289. data/third_party/abseil-cpp/absl/base/options.h +211 -0
  290. data/third_party/abseil-cpp/absl/base/policy_checks.h +111 -0
  291. data/third_party/abseil-cpp/absl/base/port.h +26 -0
  292. data/third_party/abseil-cpp/absl/base/thread_annotations.h +280 -0
  293. data/third_party/abseil-cpp/absl/container/inlined_vector.h +848 -0
  294. data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +265 -0
  295. data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +892 -0
  296. data/third_party/abseil-cpp/absl/memory/memory.h +695 -0
  297. data/third_party/abseil-cpp/absl/meta/type_traits.h +759 -0
  298. data/third_party/abseil-cpp/absl/numeric/int128.cc +404 -0
  299. data/third_party/abseil-cpp/absl/numeric/int128.h +1091 -0
  300. data/third_party/abseil-cpp/absl/numeric/int128_have_intrinsic.inc +302 -0
  301. data/third_party/abseil-cpp/absl/numeric/int128_no_intrinsic.inc +308 -0
  302. data/third_party/abseil-cpp/absl/strings/ascii.cc +200 -0
  303. data/third_party/abseil-cpp/absl/strings/ascii.h +242 -0
  304. data/third_party/abseil-cpp/absl/strings/charconv.cc +984 -0
  305. data/third_party/abseil-cpp/absl/strings/charconv.h +119 -0
  306. data/third_party/abseil-cpp/absl/strings/escaping.cc +949 -0
  307. data/third_party/abseil-cpp/absl/strings/escaping.h +164 -0
  308. data/third_party/abseil-cpp/absl/strings/internal/char_map.h +156 -0
  309. data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +359 -0
  310. data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h +423 -0
  311. data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +504 -0
  312. data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.h +99 -0
  313. data/third_party/abseil-cpp/absl/strings/internal/escaping.cc +180 -0
  314. data/third_party/abseil-cpp/absl/strings/internal/escaping.h +58 -0
  315. data/third_party/abseil-cpp/absl/strings/internal/memutil.cc +112 -0
  316. data/third_party/abseil-cpp/absl/strings/internal/memutil.h +148 -0
  317. data/third_party/abseil-cpp/absl/strings/internal/ostringstream.cc +36 -0
  318. data/third_party/abseil-cpp/absl/strings/internal/ostringstream.h +89 -0
  319. data/third_party/abseil-cpp/absl/strings/internal/resize_uninitialized.h +73 -0
  320. data/third_party/abseil-cpp/absl/strings/internal/stl_type_traits.h +248 -0
  321. data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +388 -0
  322. data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +432 -0
  323. data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +245 -0
  324. data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +209 -0
  325. data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +326 -0
  326. data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +51 -0
  327. data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +415 -0
  328. data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +493 -0
  329. data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +23 -0
  330. data/third_party/abseil-cpp/absl/strings/internal/str_format/output.cc +72 -0
  331. data/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +104 -0
  332. data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +334 -0
  333. data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +333 -0
  334. data/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +314 -0
  335. data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +455 -0
  336. data/third_party/abseil-cpp/absl/strings/internal/utf8.cc +53 -0
  337. data/third_party/abseil-cpp/absl/strings/internal/utf8.h +50 -0
  338. data/third_party/abseil-cpp/absl/strings/match.cc +40 -0
  339. data/third_party/abseil-cpp/absl/strings/match.h +90 -0
  340. data/third_party/abseil-cpp/absl/strings/numbers.cc +965 -0
  341. data/third_party/abseil-cpp/absl/strings/numbers.h +266 -0
  342. data/third_party/abseil-cpp/absl/strings/str_cat.cc +246 -0
  343. data/third_party/abseil-cpp/absl/strings/str_cat.h +408 -0
  344. data/third_party/abseil-cpp/absl/strings/str_format.h +537 -0
  345. data/third_party/abseil-cpp/absl/strings/str_join.h +293 -0
  346. data/third_party/abseil-cpp/absl/strings/str_replace.cc +82 -0
  347. data/third_party/abseil-cpp/absl/strings/str_replace.h +219 -0
  348. data/third_party/abseil-cpp/absl/strings/str_split.cc +139 -0
  349. data/third_party/abseil-cpp/absl/strings/str_split.h +513 -0
  350. data/third_party/abseil-cpp/absl/strings/string_view.cc +235 -0
  351. data/third_party/abseil-cpp/absl/strings/string_view.h +622 -0
  352. data/third_party/abseil-cpp/absl/strings/strip.h +91 -0
  353. data/third_party/abseil-cpp/absl/strings/substitute.cc +171 -0
  354. data/third_party/abseil-cpp/absl/strings/substitute.h +693 -0
  355. data/third_party/abseil-cpp/absl/types/bad_optional_access.cc +48 -0
  356. data/third_party/abseil-cpp/absl/types/bad_optional_access.h +78 -0
  357. data/third_party/abseil-cpp/absl/types/internal/optional.h +396 -0
  358. data/third_party/abseil-cpp/absl/types/internal/span.h +128 -0
  359. data/third_party/abseil-cpp/absl/types/optional.h +776 -0
  360. data/third_party/abseil-cpp/absl/types/span.h +713 -0
  361. data/third_party/abseil-cpp/absl/utility/utility.h +350 -0
  362. data/{src/boringssl → third_party/boringssl-with-bazel}/err_data.c +0 -0
  363. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_bitstr.c +0 -0
  364. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_bool.c +0 -0
  365. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_d2i_fp.c +0 -0
  366. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_dup.c +0 -0
  367. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_enum.c +0 -0
  368. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_gentm.c +0 -0
  369. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_i2d_fp.c +0 -0
  370. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_int.c +0 -0
  371. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_mbstr.c +0 -0
  372. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_object.c +0 -0
  373. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_octet.c +0 -0
  374. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_print.c +0 -0
  375. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_strnid.c +0 -0
  376. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_time.c +3 -4
  377. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_type.c +0 -0
  378. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_utctm.c +0 -0
  379. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_utf8.c +0 -0
  380. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn1_lib.c +0 -0
  381. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn1_locl.h +0 -0
  382. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn1_par.c +0 -0
  383. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn_pack.c +0 -0
  384. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/f_enum.c +0 -0
  385. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/f_int.c +0 -0
  386. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/f_string.c +0 -0
  387. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_dec.c +0 -0
  388. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_enc.c +0 -0
  389. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_fre.c +0 -0
  390. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_new.c +0 -0
  391. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_typ.c +0 -0
  392. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_utl.c +0 -0
  393. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/time_support.c +0 -0
  394. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/base64/base64.c +0 -0
  395. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/bio.c +0 -0
  396. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/bio_mem.c +0 -0
  397. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/connect.c +3 -4
  398. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/fd.c +0 -1
  399. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/file.c +5 -6
  400. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/hexdump.c +0 -0
  401. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/internal.h +0 -0
  402. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/pair.c +0 -1
  403. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/printf.c +0 -0
  404. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/socket.c +0 -0
  405. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/socket_helper.c +0 -0
  406. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bn_extra/bn_asn1.c +0 -0
  407. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bn_extra/convert.c +0 -0
  408. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/buf/buf.c +10 -69
  409. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/asn1_compat.c +0 -0
  410. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/ber.c +0 -0
  411. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/cbb.c +41 -2
  412. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/cbs.c +60 -3
  413. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/internal.h +0 -0
  414. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/unicode.c +0 -0
  415. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/chacha/chacha.c +0 -0
  416. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/chacha/internal.h +0 -0
  417. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/cipher_extra.c +0 -0
  418. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/derive_key.c +0 -0
  419. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_aesccm.c +0 -0
  420. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_aesctrhmac.c +0 -0
  421. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_aesgcmsiv.c +8 -0
  422. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_chacha20poly1305.c +0 -0
  423. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_null.c +0 -0
  424. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_rc2.c +0 -0
  425. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_rc4.c +0 -0
  426. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_tls.c +0 -0
  427. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/internal.h +0 -0
  428. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/tls_cbc.c +0 -0
  429. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cmac/cmac.c +0 -0
  430. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/conf/conf.c +0 -0
  431. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/conf/conf_def.h +0 -0
  432. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/conf/internal.h +0 -0
  433. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-aarch64-fuchsia.c +0 -0
  434. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-aarch64-linux.c +0 -0
  435. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-arm-linux.c +0 -1
  436. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-arm-linux.h +0 -0
  437. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-arm.c +0 -0
  438. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-intel.c +0 -0
  439. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-ppc64le.c +0 -0
  440. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/crypto.c +0 -0
  441. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/curve25519/spake25519.c +0 -0
  442. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/check.c +3 -3
  443. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/dh.c +1 -2
  444. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/dh_asn1.c +0 -0
  445. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/params.c +0 -0
  446. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/digest_extra/digest_extra.c +0 -0
  447. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dsa/dsa.c +0 -0
  448. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dsa/dsa_asn1.c +0 -0
  449. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ec_extra/ec_asn1.c +0 -0
  450. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ec_extra/ec_derive.c +2 -3
  451. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ecdh_extra/ecdh_extra.c +0 -0
  452. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ecdsa_extra/ecdsa_asn1.c +0 -0
  453. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/engine/engine.c +0 -0
  454. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/err/err.c +6 -6
  455. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/err/internal.h +0 -0
  456. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/digestsign.c +0 -0
  457. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/evp.c +0 -0
  458. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/evp_asn1.c +0 -0
  459. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/evp_ctx.c +0 -0
  460. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/internal.h +0 -0
  461. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_dsa_asn1.c +0 -0
  462. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ec.c +0 -1
  463. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ec_asn1.c +0 -0
  464. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ed25519.c +0 -0
  465. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ed25519_asn1.c +0 -0
  466. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_rsa.c +14 -2
  467. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_rsa_asn1.c +0 -0
  468. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_x25519.c +0 -0
  469. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_x25519_asn1.c +1 -2
  470. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/pbkdf.c +0 -0
  471. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/print.c +0 -0
  472. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/scrypt.c +0 -0
  473. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/sign.c +0 -0
  474. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ex_data.c +0 -0
  475. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes.c +108 -0
  476. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_nohw.c +1282 -0
  477. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/aes/internal.h +5 -7
  478. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/aes/key_wrap.c +0 -0
  479. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/aes/mode_wrappers.c +0 -2
  480. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bcm.c +2 -0
  481. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/add.c +0 -0
  482. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/asm/x86_64-gcc.c +0 -0
  483. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/bn.c +0 -0
  484. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/bytes.c +0 -0
  485. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/cmp.c +0 -0
  486. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/ctx.c +0 -0
  487. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/div.c +0 -0
  488. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/div_extra.c +0 -0
  489. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/exponentiation.c +0 -0
  490. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/gcd.c +0 -0
  491. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/gcd_extra.c +0 -0
  492. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/generic.c +0 -0
  493. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/internal.h +0 -0
  494. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/jacobi.c +0 -0
  495. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/montgomery.c +0 -0
  496. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/montgomery_inv.c +0 -0
  497. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/mul.c +0 -0
  498. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/prime.c +11 -12
  499. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/random.c +0 -0
  500. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/rsaz_exp.c +0 -0
  501. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/rsaz_exp.h +0 -0
  502. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/shift.c +0 -0
  503. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/sqrt.c +0 -0
  504. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/aead.c +0 -0
  505. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/cipher.c +0 -0
  506. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/e_aes.c +3 -5
  507. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/e_des.c +0 -0
  508. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/internal.h +0 -0
  509. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/delocate.h +0 -0
  510. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/des/des.c +0 -0
  511. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/des/internal.h +0 -0
  512. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/digest.c +0 -0
  513. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/digests.c +0 -0
  514. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/internal.h +0 -0
  515. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/md32_common.h +0 -0
  516. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/ec.c +0 -0
  517. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/ec_key.c +1 -1
  518. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/ec_montgomery.c +0 -0
  519. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/felem.c +0 -0
  520. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/internal.h +0 -0
  521. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/oct.c +0 -0
  522. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p224-64.c +0 -0
  523. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p256-x86_64-table.h +0 -0
  524. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p256-x86_64.c +0 -0
  525. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p256-x86_64.h +0 -0
  526. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/scalar.c +0 -0
  527. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/simple.c +0 -0
  528. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/simple_mul.c +0 -0
  529. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/util.c +0 -0
  530. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/wnaf.c +0 -0
  531. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ecdh/ecdh.c +0 -0
  532. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ecdsa/ecdsa.c +0 -0
  533. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/fips_shared_support.c +0 -0
  534. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/hmac/hmac.c +0 -0
  535. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/is_fips.c +0 -0
  536. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/md4/md4.c +0 -0
  537. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/md5/internal.h +0 -0
  538. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/md5/md5.c +0 -0
  539. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/cbc.c +0 -0
  540. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/cfb.c +0 -0
  541. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/ctr.c +0 -0
  542. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/gcm.c +45 -193
  543. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c +304 -0
  544. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/internal.h +8 -18
  545. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/ofb.c +0 -0
  546. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/polyval.c +0 -0
  547. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/ctrdrbg.c +0 -0
  548. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/internal.h +0 -0
  549. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/rand.c +0 -0
  550. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/urandom.c +0 -0
  551. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/blinding.c +0 -0
  552. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/internal.h +0 -0
  553. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/padding.c +0 -0
  554. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/rsa.c +7 -1
  555. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/rsa_impl.c +60 -51
  556. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/self_check/self_check.c +0 -0
  557. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/internal.h +0 -0
  558. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha1-altivec.c +0 -0
  559. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha1.c +0 -0
  560. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha256.c +0 -0
  561. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha512.c +0 -0
  562. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/tls/internal.h +0 -0
  563. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/tls/kdf.c +0 -0
  564. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/hkdf/hkdf.c +0 -0
  565. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/hrss/hrss.c +210 -311
  566. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/hrss/internal.h +0 -1
  567. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/internal.h +21 -1
  568. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/lhash/lhash.c +0 -0
  569. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/mem.c +70 -0
  570. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/obj/obj.c +16 -21
  571. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/obj/obj_dat.h +27 -6
  572. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/obj/obj_xref.c +0 -0
  573. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_all.c +0 -0
  574. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_info.c +0 -1
  575. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_lib.c +7 -7
  576. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_oth.c +0 -1
  577. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_pk8.c +0 -1
  578. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_pkey.c +0 -1
  579. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_x509.c +0 -0
  580. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_xaux.c +0 -0
  581. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs7/internal.h +0 -0
  582. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs7/pkcs7.c +0 -0
  583. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs7/pkcs7_x509.c +1 -1
  584. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/internal.h +0 -0
  585. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/p5_pbev2.c +0 -0
  586. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/pkcs8.c +0 -0
  587. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/pkcs8_x509.c +0 -0
  588. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/internal.h +0 -0
  589. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/poly1305.c +2 -2
  590. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/poly1305_arm.c +21 -20
  591. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/poly1305_vec.c +34 -17
  592. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pool/internal.h +0 -0
  593. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pool/pool.c +1 -2
  594. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/deterministic.c +0 -0
  595. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/forkunsafe.c +0 -0
  596. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/fuchsia.c +0 -0
  597. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/rand_extra.c +0 -0
  598. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/windows.c +0 -0
  599. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rc4/rc4.c +0 -0
  600. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/refcount_c11.c +0 -0
  601. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/refcount_lock.c +0 -0
  602. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rsa_extra/rsa_asn1.c +0 -0
  603. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rsa_extra/rsa_print.c +0 -0
  604. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/siphash/siphash.c +3 -1
  605. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/stack/stack.c +0 -0
  606. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread.c +0 -0
  607. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread_none.c +0 -0
  608. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread_pthread.c +0 -0
  609. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread_win.c +0 -0
  610. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_digest.c +0 -0
  611. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_sign.c +0 -0
  612. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_strex.c +0 -0
  613. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_verify.c +0 -1
  614. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/algorithm.c +0 -0
  615. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/asn1_gen.c +0 -0
  616. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/by_dir.c +1 -1
  617. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/by_file.c +0 -1
  618. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/charmap.h +0 -0
  619. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/i2d_pr.c +0 -0
  620. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/internal.h +0 -0
  621. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/rsa_pss.c +0 -0
  622. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_crl.c +0 -0
  623. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_req.c +0 -0
  624. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_x509.c +0 -0
  625. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_x509a.c +0 -0
  626. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/vpm_int.h +0 -0
  627. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509.c +0 -0
  628. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_att.c +0 -0
  629. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_cmp.c +0 -1
  630. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_d2.c +0 -0
  631. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_def.c +0 -0
  632. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_ext.c +0 -0
  633. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_lu.c +0 -0
  634. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_obj.c +1 -1
  635. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_r2x.c +0 -1
  636. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_req.c +0 -1
  637. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_set.c +0 -0
  638. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_trs.c +1 -2
  639. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_txt.c +0 -0
  640. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_v3.c +0 -0
  641. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_vfy.c +0 -1
  642. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_vpm.c +3 -4
  643. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509cset.c +0 -0
  644. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509name.c +0 -0
  645. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509rset.c +0 -0
  646. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509spki.c +0 -0
  647. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_algor.c +0 -0
  648. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_all.c +0 -1
  649. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_attrib.c +0 -0
  650. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_crl.c +0 -0
  651. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_exten.c +0 -0
  652. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_info.c +0 -0
  653. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_name.c +0 -0
  654. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_pkey.c +0 -0
  655. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_pubkey.c +0 -0
  656. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_req.c +0 -0
  657. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_sig.c +0 -0
  658. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_spki.c +0 -0
  659. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_val.c +0 -0
  660. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_x509.c +0 -0
  661. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_x509a.c +0 -0
  662. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/ext_dat.h +0 -0
  663. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/internal.h +0 -0
  664. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_cache.c +0 -0
  665. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_data.c +0 -0
  666. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_int.h +0 -0
  667. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_lib.c +0 -0
  668. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_map.c +0 -0
  669. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_node.c +0 -0
  670. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_tree.c +0 -0
  671. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_akey.c +0 -0
  672. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_akeya.c +0 -0
  673. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_alt.c +3 -3
  674. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_bcons.c +0 -0
  675. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_bitst.c +0 -0
  676. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_conf.c +0 -0
  677. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_cpols.c +0 -0
  678. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_crld.c +0 -0
  679. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_enum.c +2 -2
  680. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_extku.c +0 -0
  681. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_genn.c +0 -0
  682. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_ia5.c +0 -0
  683. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_info.c +4 -5
  684. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_int.c +0 -0
  685. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_lib.c +0 -0
  686. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_ncons.c +0 -0
  687. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_ocsp.c +0 -0
  688. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pci.c +0 -0
  689. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pcia.c +0 -0
  690. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pcons.c +0 -0
  691. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pku.c +0 -0
  692. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pmaps.c +0 -0
  693. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_prn.c +0 -0
  694. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_purp.c +2 -3
  695. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_skey.c +0 -0
  696. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_sxnet.c +0 -0
  697. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_utl.c +11 -12
  698. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/aead.h +0 -0
  699. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/aes.h +0 -0
  700. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/arm_arch.h +0 -0
  701. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/asn1.h +0 -0
  702. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/asn1_mac.h +0 -0
  703. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/asn1t.h +0 -0
  704. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/base.h +0 -0
  705. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/base64.h +0 -0
  706. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/bio.h +0 -0
  707. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/blowfish.h +0 -0
  708. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/bn.h +32 -20
  709. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/buf.h +9 -9
  710. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/buffer.h +0 -0
  711. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/bytestring.h +34 -0
  712. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cast.h +0 -0
  713. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/chacha.h +0 -0
  714. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cipher.h +0 -0
  715. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cmac.h +0 -0
  716. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/conf.h +0 -0
  717. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cpu.h +0 -0
  718. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/crypto.h +0 -0
  719. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/curve25519.h +0 -0
  720. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/des.h +0 -0
  721. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/dh.h +0 -0
  722. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/digest.h +0 -0
  723. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/dsa.h +0 -0
  724. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/dtls1.h +0 -0
  725. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/e_os2.h +0 -0
  726. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ec.h +11 -4
  727. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ec_key.h +4 -2
  728. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ecdh.h +0 -0
  729. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ecdsa.h +0 -0
  730. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/engine.h +0 -0
  731. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/err.h +11 -9
  732. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/evp.h +20 -0
  733. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ex_data.h +0 -0
  734. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/hkdf.h +0 -0
  735. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/hmac.h +0 -0
  736. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/hrss.h +0 -0
  737. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/is_boringssl.h +0 -0
  738. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/lhash.h +0 -0
  739. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/md4.h +0 -0
  740. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/md5.h +0 -0
  741. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/mem.h +17 -2
  742. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/nid.h +9 -0
  743. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/obj.h +0 -0
  744. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/obj_mac.h +0 -0
  745. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/objects.h +0 -0
  746. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/opensslconf.h +0 -0
  747. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/opensslv.h +0 -0
  748. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ossl_typ.h +0 -0
  749. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pem.h +0 -0
  750. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pkcs12.h +0 -0
  751. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pkcs7.h +0 -0
  752. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pkcs8.h +0 -0
  753. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/poly1305.h +5 -7
  754. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pool.h +0 -0
  755. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/rand.h +0 -0
  756. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/rc4.h +0 -0
  757. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ripemd.h +0 -0
  758. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/rsa.h +0 -0
  759. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/safestack.h +0 -0
  760. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/sha.h +0 -0
  761. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/siphash.h +0 -0
  762. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/span.h +0 -0
  763. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/srtp.h +0 -0
  764. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ssl.h +10 -20
  765. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ssl3.h +0 -0
  766. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/stack.h +0 -0
  767. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/thread.h +0 -0
  768. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/tls1.h +0 -3
  769. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/type_check.h +0 -0
  770. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/x509.h +0 -0
  771. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/x509_vfy.h +0 -0
  772. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/x509v3.h +0 -0
  773. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/bio_ssl.cc +0 -0
  774. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_both.cc +0 -1
  775. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_lib.cc +0 -0
  776. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_pkt.cc +0 -1
  777. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_srtp.cc +0 -0
  778. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/dtls_method.cc +0 -1
  779. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/dtls_record.cc +0 -0
  780. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handoff.cc +126 -29
  781. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handshake.cc +5 -4
  782. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handshake_client.cc +24 -13
  783. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handshake_server.cc +1 -5
  784. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/internal.h +32 -26
  785. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/s3_both.cc +0 -0
  786. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/s3_lib.cc +2 -3
  787. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/s3_pkt.cc +0 -1
  788. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_aead_ctx.cc +0 -0
  789. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_asn1.cc +1 -2
  790. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_buffer.cc +34 -15
  791. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_cert.cc +0 -1
  792. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_cipher.cc +0 -1
  793. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_file.cc +0 -0
  794. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_key_share.cc +0 -0
  795. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_lib.cc +13 -14
  796. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_privkey.cc +0 -0
  797. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_session.cc +2 -1
  798. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_stat.cc +0 -0
  799. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_transcript.cc +0 -0
  800. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_versions.cc +1 -1
  801. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_x509.cc +0 -0
  802. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/t1_enc.cc +0 -0
  803. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/t1_lib.cc +11 -171
  804. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_both.cc +0 -0
  805. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_client.cc +3 -4
  806. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_enc.cc +5 -1
  807. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_server.cc +78 -101
  808. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls_method.cc +1 -1
  809. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls_record.cc +7 -2
  810. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519.c +0 -0
  811. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519_32.h +0 -0
  812. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519_64.h +0 -0
  813. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519_tables.h +0 -0
  814. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/internal.h +0 -0
  815. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/p256.c +0 -0
  816. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/p256_32.h +0 -0
  817. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/p256_64.h +0 -0
  818. data/third_party/upb/upb/decode.c +4 -0
  819. data/third_party/upb/upb/port.c +0 -1
  820. data/third_party/upb/upb/port_def.inc +1 -3
  821. data/third_party/upb/upb/table.c +2 -1
  822. metadata +680 -505
  823. data/src/core/lib/iomgr/logical_thread.cc +0 -103
  824. data/src/core/lib/iomgr/logical_thread.h +0 -52
  825. data/src/core/lib/json/json.cc +0 -94
  826. data/src/core/lib/json/json_reader.h +0 -146
  827. data/src/core/lib/json/json_string.cc +0 -367
  828. data/src/core/lib/json/json_writer.h +0 -84
  829. data/third_party/boringssl/crypto/fipsmodule/aes/aes.c +0 -860
@@ -0,0 +1,226 @@
1
+ // Copyright 2017 The Abseil Authors.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // https://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ //
15
+ // -----------------------------------------------------------------------------
16
+ // File: call_once.h
17
+ // -----------------------------------------------------------------------------
18
+ //
19
+ // This header file provides an Abseil version of `std::call_once` for invoking
20
+ // a given function at most once, across all threads. This Abseil version is
21
+ // faster than the C++11 version and incorporates the C++17 argument-passing
22
+ // fix, so that (for example) non-const references may be passed to the invoked
23
+ // function.
24
+
25
+ #ifndef ABSL_BASE_CALL_ONCE_H_
26
+ #define ABSL_BASE_CALL_ONCE_H_
27
+
28
+ #include <algorithm>
29
+ #include <atomic>
30
+ #include <cstdint>
31
+ #include <type_traits>
32
+ #include <utility>
33
+
34
+ #include "absl/base/internal/invoke.h"
35
+ #include "absl/base/internal/low_level_scheduling.h"
36
+ #include "absl/base/internal/raw_logging.h"
37
+ #include "absl/base/internal/scheduling_mode.h"
38
+ #include "absl/base/internal/spinlock_wait.h"
39
+ #include "absl/base/macros.h"
40
+ #include "absl/base/optimization.h"
41
+ #include "absl/base/port.h"
42
+
43
+ namespace absl {
44
+ ABSL_NAMESPACE_BEGIN
45
+
46
+ class once_flag;
47
+
48
+ namespace base_internal {
49
+ std::atomic<uint32_t>* ControlWord(absl::once_flag* flag);
50
+ } // namespace base_internal
51
+
52
+ // call_once()
53
+ //
54
+ // For all invocations using a given `once_flag`, invokes a given `fn` exactly
55
+ // once across all threads. The first call to `call_once()` with a particular
56
+ // `once_flag` argument (that does not throw an exception) will run the
57
+ // specified function with the provided `args`; other calls with the same
58
+ // `once_flag` argument will not run the function, but will wait
59
+ // for the provided function to finish running (if it is still running).
60
+ //
61
+ // This mechanism provides a safe, simple, and fast mechanism for one-time
62
+ // initialization in a multi-threaded process.
63
+ //
64
+ // Example:
65
+ //
66
+ // class MyInitClass {
67
+ // public:
68
+ // ...
69
+ // mutable absl::once_flag once_;
70
+ //
71
+ // MyInitClass* init() const {
72
+ // absl::call_once(once_, &MyInitClass::Init, this);
73
+ // return ptr_;
74
+ // }
75
+ //
76
+ template <typename Callable, typename... Args>
77
+ void call_once(absl::once_flag& flag, Callable&& fn, Args&&... args);
78
+
79
+ // once_flag
80
+ //
81
+ // Objects of this type are used to distinguish calls to `call_once()` and
82
+ // ensure the provided function is only invoked once across all threads. This
83
+ // type is not copyable or movable. However, it has a `constexpr`
84
+ // constructor, and is safe to use as a namespace-scoped global variable.
85
+ class once_flag {
86
+ public:
87
+ constexpr once_flag() : control_(0) {}
88
+ once_flag(const once_flag&) = delete;
89
+ once_flag& operator=(const once_flag&) = delete;
90
+
91
+ private:
92
+ friend std::atomic<uint32_t>* base_internal::ControlWord(once_flag* flag);
93
+ std::atomic<uint32_t> control_;
94
+ };
95
+
96
+ //------------------------------------------------------------------------------
97
+ // End of public interfaces.
98
+ // Implementation details follow.
99
+ //------------------------------------------------------------------------------
100
+
101
+ namespace base_internal {
102
+
103
+ // Like call_once, but uses KERNEL_ONLY scheduling. Intended to be used to
104
+ // initialize entities used by the scheduler implementation.
105
+ template <typename Callable, typename... Args>
106
+ void LowLevelCallOnce(absl::once_flag* flag, Callable&& fn, Args&&... args);
107
+
108
+ // Disables scheduling while on stack when scheduling mode is non-cooperative.
109
+ // No effect for cooperative scheduling modes.
110
+ class SchedulingHelper {
111
+ public:
112
+ explicit SchedulingHelper(base_internal::SchedulingMode mode) : mode_(mode) {
113
+ if (mode_ == base_internal::SCHEDULE_KERNEL_ONLY) {
114
+ guard_result_ = base_internal::SchedulingGuard::DisableRescheduling();
115
+ }
116
+ }
117
+
118
+ ~SchedulingHelper() {
119
+ if (mode_ == base_internal::SCHEDULE_KERNEL_ONLY) {
120
+ base_internal::SchedulingGuard::EnableRescheduling(guard_result_);
121
+ }
122
+ }
123
+
124
+ private:
125
+ base_internal::SchedulingMode mode_;
126
+ bool guard_result_;
127
+ };
128
+
129
+ // Bit patterns for call_once state machine values. Internal implementation
130
+ // detail, not for use by clients.
131
+ //
132
+ // The bit patterns are arbitrarily chosen from unlikely values, to aid in
133
+ // debugging. However, kOnceInit must be 0, so that a zero-initialized
134
+ // once_flag will be valid for immediate use.
135
+ enum {
136
+ kOnceInit = 0,
137
+ kOnceRunning = 0x65C2937B,
138
+ kOnceWaiter = 0x05A308D2,
139
+ // A very small constant is chosen for kOnceDone so that it fit in a single
140
+ // compare with immediate instruction for most common ISAs. This is verified
141
+ // for x86, POWER and ARM.
142
+ kOnceDone = 221, // Random Number
143
+ };
144
+
145
+ template <typename Callable, typename... Args>
146
+ ABSL_ATTRIBUTE_NOINLINE
147
+ void CallOnceImpl(std::atomic<uint32_t>* control,
148
+ base_internal::SchedulingMode scheduling_mode, Callable&& fn,
149
+ Args&&... args) {
150
+ #ifndef NDEBUG
151
+ {
152
+ uint32_t old_control = control->load(std::memory_order_relaxed);
153
+ if (old_control != kOnceInit &&
154
+ old_control != kOnceRunning &&
155
+ old_control != kOnceWaiter &&
156
+ old_control != kOnceDone) {
157
+ ABSL_RAW_LOG(FATAL, "Unexpected value for control word: 0x%lx",
158
+ static_cast<unsigned long>(old_control)); // NOLINT
159
+ }
160
+ }
161
+ #endif // NDEBUG
162
+ static const base_internal::SpinLockWaitTransition trans[] = {
163
+ {kOnceInit, kOnceRunning, true},
164
+ {kOnceRunning, kOnceWaiter, false},
165
+ {kOnceDone, kOnceDone, true}};
166
+
167
+ // Must do this before potentially modifying control word's state.
168
+ base_internal::SchedulingHelper maybe_disable_scheduling(scheduling_mode);
169
+ // Short circuit the simplest case to avoid procedure call overhead.
170
+ // The base_internal::SpinLockWait() call returns either kOnceInit or
171
+ // kOnceDone. If it returns kOnceDone, it must have loaded the control word
172
+ // with std::memory_order_acquire and seen a value of kOnceDone.
173
+ uint32_t old_control = kOnceInit;
174
+ if (control->compare_exchange_strong(old_control, kOnceRunning,
175
+ std::memory_order_relaxed) ||
176
+ base_internal::SpinLockWait(control, ABSL_ARRAYSIZE(trans), trans,
177
+ scheduling_mode) == kOnceInit) {
178
+ base_internal::Invoke(std::forward<Callable>(fn),
179
+ std::forward<Args>(args)...);
180
+ // The call to SpinLockWake below is an optimization, because the waiter
181
+ // in SpinLockWait is waiting with a short timeout. The atomic load/store
182
+ // sequence is slightly faster than an atomic exchange:
183
+ // old_control = control->exchange(base_internal::kOnceDone,
184
+ // std::memory_order_release);
185
+ // We opt for a slightly faster case when there are no waiters, in spite
186
+ // of longer tail latency when there are waiters.
187
+ old_control = control->load(std::memory_order_relaxed);
188
+ control->store(base_internal::kOnceDone, std::memory_order_release);
189
+ if (old_control == base_internal::kOnceWaiter) {
190
+ base_internal::SpinLockWake(control, true);
191
+ }
192
+ } // else *control is already kOnceDone
193
+ }
194
+
195
+ inline std::atomic<uint32_t>* ControlWord(once_flag* flag) {
196
+ return &flag->control_;
197
+ }
198
+
199
+ template <typename Callable, typename... Args>
200
+ void LowLevelCallOnce(absl::once_flag* flag, Callable&& fn, Args&&... args) {
201
+ std::atomic<uint32_t>* once = base_internal::ControlWord(flag);
202
+ uint32_t s = once->load(std::memory_order_acquire);
203
+ if (ABSL_PREDICT_FALSE(s != base_internal::kOnceDone)) {
204
+ base_internal::CallOnceImpl(once, base_internal::SCHEDULE_KERNEL_ONLY,
205
+ std::forward<Callable>(fn),
206
+ std::forward<Args>(args)...);
207
+ }
208
+ }
209
+
210
+ } // namespace base_internal
211
+
212
+ template <typename Callable, typename... Args>
213
+ void call_once(absl::once_flag& flag, Callable&& fn, Args&&... args) {
214
+ std::atomic<uint32_t>* once = base_internal::ControlWord(&flag);
215
+ uint32_t s = once->load(std::memory_order_acquire);
216
+ if (ABSL_PREDICT_FALSE(s != base_internal::kOnceDone)) {
217
+ base_internal::CallOnceImpl(
218
+ once, base_internal::SCHEDULE_COOPERATIVE_AND_KERNEL,
219
+ std::forward<Callable>(fn), std::forward<Args>(args)...);
220
+ }
221
+ }
222
+
223
+ ABSL_NAMESPACE_END
224
+ } // namespace absl
225
+
226
+ #endif // ABSL_BASE_CALL_ONCE_H_
@@ -0,0 +1,184 @@
1
+ //
2
+ // Copyright 2017 The Abseil Authors.
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // -----------------------------------------------------------------------------
17
+ // File: casts.h
18
+ // -----------------------------------------------------------------------------
19
+ //
20
+ // This header file defines casting templates to fit use cases not covered by
21
+ // the standard casts provided in the C++ standard. As with all cast operations,
22
+ // use these with caution and only if alternatives do not exist.
23
+
24
+ #ifndef ABSL_BASE_CASTS_H_
25
+ #define ABSL_BASE_CASTS_H_
26
+
27
+ #include <cstring>
28
+ #include <memory>
29
+ #include <type_traits>
30
+ #include <utility>
31
+
32
+ #include "absl/base/internal/identity.h"
33
+ #include "absl/base/macros.h"
34
+ #include "absl/meta/type_traits.h"
35
+
36
+ namespace absl {
37
+ ABSL_NAMESPACE_BEGIN
38
+
39
+ namespace internal_casts {
40
+
41
+ template <class Dest, class Source>
42
+ struct is_bitcastable
43
+ : std::integral_constant<
44
+ bool,
45
+ sizeof(Dest) == sizeof(Source) &&
46
+ type_traits_internal::is_trivially_copyable<Source>::value &&
47
+ type_traits_internal::is_trivially_copyable<Dest>::value &&
48
+ std::is_default_constructible<Dest>::value> {};
49
+
50
+ } // namespace internal_casts
51
+
52
+ // implicit_cast()
53
+ //
54
+ // Performs an implicit conversion between types following the language
55
+ // rules for implicit conversion; if an implicit conversion is otherwise
56
+ // allowed by the language in the given context, this function performs such an
57
+ // implicit conversion.
58
+ //
59
+ // Example:
60
+ //
61
+ // // If the context allows implicit conversion:
62
+ // From from;
63
+ // To to = from;
64
+ //
65
+ // // Such code can be replaced by:
66
+ // implicit_cast<To>(from);
67
+ //
68
+ // An `implicit_cast()` may also be used to annotate numeric type conversions
69
+ // that, although safe, may produce compiler warnings (such as `long` to `int`).
70
+ // Additionally, an `implicit_cast()` is also useful within return statements to
71
+ // indicate a specific implicit conversion is being undertaken.
72
+ //
73
+ // Example:
74
+ //
75
+ // return implicit_cast<double>(size_in_bytes) / capacity_;
76
+ //
77
+ // Annotating code with `implicit_cast()` allows you to explicitly select
78
+ // particular overloads and template instantiations, while providing a safer
79
+ // cast than `reinterpret_cast()` or `static_cast()`.
80
+ //
81
+ // Additionally, an `implicit_cast()` can be used to allow upcasting within a
82
+ // type hierarchy where incorrect use of `static_cast()` could accidentally
83
+ // allow downcasting.
84
+ //
85
+ // Finally, an `implicit_cast()` can be used to perform implicit conversions
86
+ // from unrelated types that otherwise couldn't be implicitly cast directly;
87
+ // C++ will normally only implicitly cast "one step" in such conversions.
88
+ //
89
+ // That is, if C is a type which can be implicitly converted to B, with B being
90
+ // a type that can be implicitly converted to A, an `implicit_cast()` can be
91
+ // used to convert C to B (which the compiler can then implicitly convert to A
92
+ // using language rules).
93
+ //
94
+ // Example:
95
+ //
96
+ // // Assume an object C is convertible to B, which is implicitly convertible
97
+ // // to A
98
+ // A a = implicit_cast<B>(C);
99
+ //
100
+ // Such implicit cast chaining may be useful within template logic.
101
+ template <typename To>
102
+ constexpr To implicit_cast(typename absl::internal::identity_t<To> to) {
103
+ return to;
104
+ }
105
+
106
+ // bit_cast()
107
+ //
108
+ // Performs a bitwise cast on a type without changing the underlying bit
109
+ // representation of that type's value. The two types must be of the same size
110
+ // and both types must be trivially copyable. As with most casts, use with
111
+ // caution. A `bit_cast()` might be needed when you need to temporarily treat a
112
+ // type as some other type, such as in the following cases:
113
+ //
114
+ // * Serialization (casting temporarily to `char *` for those purposes is
115
+ // always allowed by the C++ standard)
116
+ // * Managing the individual bits of a type within mathematical operations
117
+ // that are not normally accessible through that type
118
+ // * Casting non-pointer types to pointer types (casting the other way is
119
+ // allowed by `reinterpret_cast()` but round-trips cannot occur the other
120
+ // way).
121
+ //
122
+ // Example:
123
+ //
124
+ // float f = 3.14159265358979;
125
+ // int i = bit_cast<int32_t>(f);
126
+ // // i = 0x40490fdb
127
+ //
128
+ // Casting non-pointer types to pointer types and then dereferencing them
129
+ // traditionally produces undefined behavior.
130
+ //
131
+ // Example:
132
+ //
133
+ // // WRONG
134
+ // float f = 3.14159265358979; // WRONG
135
+ // int i = * reinterpret_cast<int*>(&f); // WRONG
136
+ //
137
+ // The address-casting method produces undefined behavior according to the ISO
138
+ // C++ specification section [basic.lval]. Roughly, this section says: if an
139
+ // object in memory has one type, and a program accesses it with a different
140
+ // type, the result is undefined behavior for most values of "different type".
141
+ //
142
+ // Such casting results in type punning: holding an object in memory of one type
143
+ // and reading its bits back using a different type. A `bit_cast()` avoids this
144
+ // issue by implementing its casts using `memcpy()`, which avoids introducing
145
+ // this undefined behavior.
146
+ //
147
+ // NOTE: The requirements here are more strict than the bit_cast of standard
148
+ // proposal p0476 due to the need for workarounds and lack of intrinsics.
149
+ // Specifically, this implementation also requires `Dest` to be
150
+ // default-constructible.
151
+ template <
152
+ typename Dest, typename Source,
153
+ typename std::enable_if<internal_casts::is_bitcastable<Dest, Source>::value,
154
+ int>::type = 0>
155
+ inline Dest bit_cast(const Source& source) {
156
+ Dest dest;
157
+ memcpy(static_cast<void*>(std::addressof(dest)),
158
+ static_cast<const void*>(std::addressof(source)), sizeof(dest));
159
+ return dest;
160
+ }
161
+
162
+ // NOTE: This overload is only picked if the requirements of bit_cast are not
163
+ // met. It is therefore UB, but is provided temporarily as previous versions of
164
+ // this function template were unchecked. Do not use this in new code.
165
+ template <
166
+ typename Dest, typename Source,
167
+ typename std::enable_if<
168
+ !internal_casts::is_bitcastable<Dest, Source>::value, int>::type = 0>
169
+ ABSL_DEPRECATED(
170
+ "absl::bit_cast type requirements were violated. Update the types being "
171
+ "used such that they are the same size and are both TriviallyCopyable.")
172
+ inline Dest bit_cast(const Source& source) {
173
+ static_assert(sizeof(Dest) == sizeof(Source),
174
+ "Source and destination types should have equal sizes.");
175
+
176
+ Dest dest;
177
+ memcpy(&dest, &source, sizeof(dest));
178
+ return dest;
179
+ }
180
+
181
+ ABSL_NAMESPACE_END
182
+ } // namespace absl
183
+
184
+ #endif // ABSL_BASE_CASTS_H_
@@ -0,0 +1,671 @@
1
+ //
2
+ // Copyright 2017 The Abseil Authors.
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // -----------------------------------------------------------------------------
17
+ // File: config.h
18
+ // -----------------------------------------------------------------------------
19
+ //
20
+ // This header file defines a set of macros for checking the presence of
21
+ // important compiler and platform features. Such macros can be used to
22
+ // produce portable code by parameterizing compilation based on the presence or
23
+ // lack of a given feature.
24
+ //
25
+ // We define a "feature" as some interface we wish to program to: for example,
26
+ // a library function or system call. A value of `1` indicates support for
27
+ // that feature; any other value indicates the feature support is undefined.
28
+ //
29
+ // Example:
30
+ //
31
+ // Suppose a programmer wants to write a program that uses the 'mmap()' system
32
+ // call. The Abseil macro for that feature (`ABSL_HAVE_MMAP`) allows you to
33
+ // selectively include the `mmap.h` header and bracket code using that feature
34
+ // in the macro:
35
+ //
36
+ // #include "absl/base/config.h"
37
+ //
38
+ // #ifdef ABSL_HAVE_MMAP
39
+ // #include "sys/mman.h"
40
+ // #endif //ABSL_HAVE_MMAP
41
+ //
42
+ // ...
43
+ // #ifdef ABSL_HAVE_MMAP
44
+ // void *ptr = mmap(...);
45
+ // ...
46
+ // #endif // ABSL_HAVE_MMAP
47
+
48
+ #ifndef ABSL_BASE_CONFIG_H_
49
+ #define ABSL_BASE_CONFIG_H_
50
+
51
+ // Included for the __GLIBC__ macro (or similar macros on other systems).
52
+ #include <limits.h>
53
+
54
+ #ifdef __cplusplus
55
+ // Included for __GLIBCXX__, _LIBCPP_VERSION
56
+ #include <cstddef>
57
+ #endif // __cplusplus
58
+
59
+ #if defined(__APPLE__)
60
+ // Included for TARGET_OS_IPHONE, __IPHONE_OS_VERSION_MIN_REQUIRED,
61
+ // __IPHONE_8_0.
62
+ #include <Availability.h>
63
+ #include <TargetConditionals.h>
64
+ #endif
65
+
66
+ #include "absl/base/options.h"
67
+ #include "absl/base/policy_checks.h"
68
+
69
+ // Helper macro to convert a CPP variable to a string literal.
70
+ #define ABSL_INTERNAL_DO_TOKEN_STR(x) #x
71
+ #define ABSL_INTERNAL_TOKEN_STR(x) ABSL_INTERNAL_DO_TOKEN_STR(x)
72
+
73
+ // -----------------------------------------------------------------------------
74
+ // Abseil namespace annotations
75
+ // -----------------------------------------------------------------------------
76
+
77
+ // ABSL_NAMESPACE_BEGIN/ABSL_NAMESPACE_END
78
+ //
79
+ // An annotation placed at the beginning/end of each `namespace absl` scope.
80
+ // This is used to inject an inline namespace.
81
+ //
82
+ // The proper way to write Abseil code in the `absl` namespace is:
83
+ //
84
+ // namespace absl {
85
+ // ABSL_NAMESPACE_BEGIN
86
+ //
87
+ // void Foo(); // absl::Foo().
88
+ //
89
+ // ABSL_NAMESPACE_END
90
+ // } // namespace absl
91
+ //
92
+ // Users of Abseil should not use these macros, because users of Abseil should
93
+ // not write `namespace absl {` in their own code for any reason. (Abseil does
94
+ // not support forward declarations of its own types, nor does it support
95
+ // user-provided specialization of Abseil templates. Code that violates these
96
+ // rules may be broken without warning.)
97
+ #if !defined(ABSL_OPTION_USE_INLINE_NAMESPACE) || \
98
+ !defined(ABSL_OPTION_INLINE_NAMESPACE_NAME)
99
+ #error options.h is misconfigured.
100
+ #endif
101
+
102
+ // Check that ABSL_OPTION_INLINE_NAMESPACE_NAME is neither "head" nor ""
103
+ #if defined(__cplusplus) && ABSL_OPTION_USE_INLINE_NAMESPACE == 1
104
+
105
+ #define ABSL_INTERNAL_INLINE_NAMESPACE_STR \
106
+ ABSL_INTERNAL_TOKEN_STR(ABSL_OPTION_INLINE_NAMESPACE_NAME)
107
+
108
+ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != '\0',
109
+ "options.h misconfigured: ABSL_OPTION_INLINE_NAMESPACE_NAME must "
110
+ "not be empty.");
111
+ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
112
+ ABSL_INTERNAL_INLINE_NAMESPACE_STR[1] != 'e' ||
113
+ ABSL_INTERNAL_INLINE_NAMESPACE_STR[2] != 'a' ||
114
+ ABSL_INTERNAL_INLINE_NAMESPACE_STR[3] != 'd' ||
115
+ ABSL_INTERNAL_INLINE_NAMESPACE_STR[4] != '\0',
116
+ "options.h misconfigured: ABSL_OPTION_INLINE_NAMESPACE_NAME must "
117
+ "be changed to a new, unique identifier name.");
118
+
119
+ #endif
120
+
121
+ #if ABSL_OPTION_USE_INLINE_NAMESPACE == 0
122
+ #define ABSL_NAMESPACE_BEGIN
123
+ #define ABSL_NAMESPACE_END
124
+ #elif ABSL_OPTION_USE_INLINE_NAMESPACE == 1
125
+ #define ABSL_NAMESPACE_BEGIN \
126
+ inline namespace ABSL_OPTION_INLINE_NAMESPACE_NAME {
127
+ #define ABSL_NAMESPACE_END }
128
+ #else
129
+ #error options.h is misconfigured.
130
+ #endif
131
+
132
+ // -----------------------------------------------------------------------------
133
+ // Compiler Feature Checks
134
+ // -----------------------------------------------------------------------------
135
+
136
+ // ABSL_HAVE_BUILTIN()
137
+ //
138
+ // Checks whether the compiler supports a Clang Feature Checking Macro, and if
139
+ // so, checks whether it supports the provided builtin function "x" where x
140
+ // is one of the functions noted in
141
+ // https://clang.llvm.org/docs/LanguageExtensions.html
142
+ //
143
+ // Note: Use this macro to avoid an extra level of #ifdef __has_builtin check.
144
+ // http://releases.llvm.org/3.3/tools/clang/docs/LanguageExtensions.html
145
+ #ifdef __has_builtin
146
+ #define ABSL_HAVE_BUILTIN(x) __has_builtin(x)
147
+ #else
148
+ #define ABSL_HAVE_BUILTIN(x) 0
149
+ #endif
150
+
151
+ #if defined(__is_identifier)
152
+ #define ABSL_INTERNAL_HAS_KEYWORD(x) !(__is_identifier(x))
153
+ #else
154
+ #define ABSL_INTERNAL_HAS_KEYWORD(x) 0
155
+ #endif
156
+
157
+ // ABSL_HAVE_TLS is defined to 1 when __thread should be supported.
158
+ // We assume __thread is supported on Linux when compiled with Clang or compiled
159
+ // against libstdc++ with _GLIBCXX_HAVE_TLS defined.
160
+ #ifdef ABSL_HAVE_TLS
161
+ #error ABSL_HAVE_TLS cannot be directly set
162
+ #elif defined(__linux__) && (defined(__clang__) || defined(_GLIBCXX_HAVE_TLS))
163
+ #define ABSL_HAVE_TLS 1
164
+ #endif
165
+
166
+ // ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE
167
+ //
168
+ // Checks whether `std::is_trivially_destructible<T>` is supported.
169
+ //
170
+ // Notes: All supported compilers using libc++ support this feature, as does
171
+ // gcc >= 4.8.1 using libstdc++, and Visual Studio.
172
+ #ifdef ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE
173
+ #error ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE cannot be directly set
174
+ #elif defined(_LIBCPP_VERSION) || \
175
+ (!defined(__clang__) && defined(__GNUC__) && defined(__GLIBCXX__) && \
176
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) || \
177
+ defined(_MSC_VER)
178
+ #define ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE 1
179
+ #endif
180
+
181
+ // ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE
182
+ //
183
+ // Checks whether `std::is_trivially_default_constructible<T>` and
184
+ // `std::is_trivially_copy_constructible<T>` are supported.
185
+
186
+ // ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE
187
+ //
188
+ // Checks whether `std::is_trivially_copy_assignable<T>` is supported.
189
+
190
+ // Notes: Clang with libc++ supports these features, as does gcc >= 5.1 with
191
+ // either libc++ or libstdc++, and Visual Studio (but not NVCC).
192
+ #if defined(ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE)
193
+ #error ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE cannot be directly set
194
+ #elif defined(ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE)
195
+ #error ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE cannot directly set
196
+ #elif (defined(__clang__) && defined(_LIBCPP_VERSION)) || \
197
+ (!defined(__clang__) && defined(__GNUC__) && \
198
+ (__GNUC__ > 7 || (__GNUC__ == 7 && __GNUC_MINOR__ >= 4)) && \
199
+ (defined(_LIBCPP_VERSION) || defined(__GLIBCXX__))) || \
200
+ (defined(_MSC_VER) && !defined(__NVCC__))
201
+ #define ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE 1
202
+ #define ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE 1
203
+ #endif
204
+
205
+ // ABSL_HAVE_SOURCE_LOCATION_CURRENT
206
+ //
207
+ // Indicates whether `absl::SourceLocation::current()` will return useful
208
+ // information in some contexts.
209
+ #ifndef ABSL_HAVE_SOURCE_LOCATION_CURRENT
210
+ #if ABSL_INTERNAL_HAS_KEYWORD(__builtin_LINE) && \
211
+ ABSL_INTERNAL_HAS_KEYWORD(__builtin_FILE)
212
+ #define ABSL_HAVE_SOURCE_LOCATION_CURRENT 1
213
+ #endif
214
+ #endif
215
+
216
+ // ABSL_HAVE_THREAD_LOCAL
217
+ //
218
+ // Checks whether C++11's `thread_local` storage duration specifier is
219
+ // supported.
220
+ #ifdef ABSL_HAVE_THREAD_LOCAL
221
+ #error ABSL_HAVE_THREAD_LOCAL cannot be directly set
222
+ #elif defined(__APPLE__)
223
+ // Notes:
224
+ // * Xcode's clang did not support `thread_local` until version 8, and
225
+ // even then not for all iOS < 9.0.
226
+ // * Xcode 9.3 started disallowing `thread_local` for 32-bit iOS simulator
227
+ // targeting iOS 9.x.
228
+ // * Xcode 10 moves the deployment target check for iOS < 9.0 to link time
229
+ // making __has_feature unreliable there.
230
+ //
231
+ // Otherwise, `__has_feature` is only supported by Clang so it has be inside
232
+ // `defined(__APPLE__)` check.
233
+ #if __has_feature(cxx_thread_local) && \
234
+ !(TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_9_0)
235
+ #define ABSL_HAVE_THREAD_LOCAL 1
236
+ #endif
237
+ #else // !defined(__APPLE__)
238
+ #define ABSL_HAVE_THREAD_LOCAL 1
239
+ #endif
240
+
241
+ // There are platforms for which TLS should not be used even though the compiler
242
+ // makes it seem like it's supported (Android NDK < r12b for example).
243
+ // This is primarily because of linker problems and toolchain misconfiguration:
244
+ // Abseil does not intend to support this indefinitely. Currently, the newest
245
+ // toolchain that we intend to support that requires this behavior is the
246
+ // r11 NDK - allowing for a 5 year support window on that means this option
247
+ // is likely to be removed around June of 2021.
248
+ // TLS isn't supported until NDK r12b per
249
+ // https://developer.android.com/ndk/downloads/revision_history.html
250
+ // Since NDK r16, `__NDK_MAJOR__` and `__NDK_MINOR__` are defined in
251
+ // <android/ndk-version.h>. For NDK < r16, users should define these macros,
252
+ // e.g. `-D__NDK_MAJOR__=11 -D__NKD_MINOR__=0` for NDK r11.
253
+ #if defined(__ANDROID__) && defined(__clang__)
254
+ #if __has_include(<android/ndk-version.h>)
255
+ #include <android/ndk-version.h>
256
+ #endif // __has_include(<android/ndk-version.h>)
257
+ #if defined(__ANDROID__) && defined(__clang__) && defined(__NDK_MAJOR__) && \
258
+ defined(__NDK_MINOR__) && \
259
+ ((__NDK_MAJOR__ < 12) || ((__NDK_MAJOR__ == 12) && (__NDK_MINOR__ < 1)))
260
+ #undef ABSL_HAVE_TLS
261
+ #undef ABSL_HAVE_THREAD_LOCAL
262
+ #endif
263
+ #endif // defined(__ANDROID__) && defined(__clang__)
264
+
265
+ // Emscripten doesn't yet support `thread_local` or `__thread`.
266
+ // https://github.com/emscripten-core/emscripten/issues/3502
267
+ #if defined(__EMSCRIPTEN__)
268
+ #undef ABSL_HAVE_TLS
269
+ #undef ABSL_HAVE_THREAD_LOCAL
270
+ #endif // defined(__EMSCRIPTEN__)
271
+
272
+ // ABSL_HAVE_INTRINSIC_INT128
273
+ //
274
+ // Checks whether the __int128 compiler extension for a 128-bit integral type is
275
+ // supported.
276
+ //
277
+ // Note: __SIZEOF_INT128__ is defined by Clang and GCC when __int128 is
278
+ // supported, but we avoid using it in certain cases:
279
+ // * On Clang:
280
+ // * Building using Clang for Windows, where the Clang runtime library has
281
+ // 128-bit support only on LP64 architectures, but Windows is LLP64.
282
+ // * On Nvidia's nvcc:
283
+ // * nvcc also defines __GNUC__ and __SIZEOF_INT128__, but not all versions
284
+ // actually support __int128.
285
+ #ifdef ABSL_HAVE_INTRINSIC_INT128
286
+ #error ABSL_HAVE_INTRINSIC_INT128 cannot be directly set
287
+ #elif defined(__SIZEOF_INT128__)
288
+ #if (defined(__clang__) && !defined(_WIN32)) || \
289
+ (defined(__CUDACC__) && __CUDACC_VER_MAJOR__ >= 9) || \
290
+ (defined(__GNUC__) && !defined(__clang__) && !defined(__CUDACC__))
291
+ #define ABSL_HAVE_INTRINSIC_INT128 1
292
+ #elif defined(__CUDACC__)
293
+ // __CUDACC_VER__ is a full version number before CUDA 9, and is defined to a
294
+ // string explaining that it has been removed starting with CUDA 9. We use
295
+ // nested #ifs because there is no short-circuiting in the preprocessor.
296
+ // NOTE: `__CUDACC__` could be undefined while `__CUDACC_VER__` is defined.
297
+ #if __CUDACC_VER__ >= 70000
298
+ #define ABSL_HAVE_INTRINSIC_INT128 1
299
+ #endif // __CUDACC_VER__ >= 70000
300
+ #endif // defined(__CUDACC__)
301
+ #endif // ABSL_HAVE_INTRINSIC_INT128
302
+
303
+ // ABSL_HAVE_EXCEPTIONS
304
+ //
305
+ // Checks whether the compiler both supports and enables exceptions. Many
306
+ // compilers support a "no exceptions" mode that disables exceptions.
307
+ //
308
+ // Generally, when ABSL_HAVE_EXCEPTIONS is not defined:
309
+ //
310
+ // * Code using `throw` and `try` may not compile.
311
+ // * The `noexcept` specifier will still compile and behave as normal.
312
+ // * The `noexcept` operator may still return `false`.
313
+ //
314
+ // For further details, consult the compiler's documentation.
315
+ #ifdef ABSL_HAVE_EXCEPTIONS
316
+ #error ABSL_HAVE_EXCEPTIONS cannot be directly set.
317
+
318
+ #elif defined(__clang__)
319
+
320
+ #if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 6)
321
+ // Clang >= 3.6
322
+ #if __has_feature(cxx_exceptions)
323
+ #define ABSL_HAVE_EXCEPTIONS 1
324
+ #endif // __has_feature(cxx_exceptions)
325
+ #else
326
+ // Clang < 3.6
327
+ // http://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html#the-exceptions-macro
328
+ #if defined(__EXCEPTIONS) && __has_feature(cxx_exceptions)
329
+ #define ABSL_HAVE_EXCEPTIONS 1
330
+ #endif // defined(__EXCEPTIONS) && __has_feature(cxx_exceptions)
331
+ #endif // __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 6)
332
+
333
+ // Handle remaining special cases and default to exceptions being supported.
334
+ #elif !(defined(__GNUC__) && (__GNUC__ < 5) && !defined(__EXCEPTIONS)) && \
335
+ !(defined(__GNUC__) && (__GNUC__ >= 5) && !defined(__cpp_exceptions)) && \
336
+ !(defined(_MSC_VER) && !defined(_CPPUNWIND))
337
+ #define ABSL_HAVE_EXCEPTIONS 1
338
+ #endif
339
+
340
+ // -----------------------------------------------------------------------------
341
+ // Platform Feature Checks
342
+ // -----------------------------------------------------------------------------
343
+
344
+ // Currently supported operating systems and associated preprocessor
345
+ // symbols:
346
+ //
347
+ // Linux and Linux-derived __linux__
348
+ // Android __ANDROID__ (implies __linux__)
349
+ // Linux (non-Android) __linux__ && !__ANDROID__
350
+ // Darwin (macOS and iOS) __APPLE__
351
+ // Akaros (http://akaros.org) __ros__
352
+ // Windows _WIN32
353
+ // NaCL __native_client__
354
+ // AsmJS __asmjs__
355
+ // WebAssembly __wasm__
356
+ // Fuchsia __Fuchsia__
357
+ //
358
+ // Note that since Android defines both __ANDROID__ and __linux__, one
359
+ // may probe for either Linux or Android by simply testing for __linux__.
360
+
361
+ // ABSL_HAVE_MMAP
362
+ //
363
+ // Checks whether the platform has an mmap(2) implementation as defined in
364
+ // POSIX.1-2001.
365
+ #ifdef ABSL_HAVE_MMAP
366
+ #error ABSL_HAVE_MMAP cannot be directly set
367
+ #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
368
+ defined(__ros__) || defined(__native_client__) || defined(__asmjs__) || \
369
+ defined(__wasm__) || defined(__Fuchsia__) || defined(__sun) || \
370
+ defined(__ASYLO__)
371
+ #define ABSL_HAVE_MMAP 1
372
+ #endif
373
+
374
+ // ABSL_HAVE_PTHREAD_GETSCHEDPARAM
375
+ //
376
+ // Checks whether the platform implements the pthread_(get|set)schedparam(3)
377
+ // functions as defined in POSIX.1-2001.
378
+ #ifdef ABSL_HAVE_PTHREAD_GETSCHEDPARAM
379
+ #error ABSL_HAVE_PTHREAD_GETSCHEDPARAM cannot be directly set
380
+ #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
381
+ defined(__ros__)
382
+ #define ABSL_HAVE_PTHREAD_GETSCHEDPARAM 1
383
+ #endif
384
+
385
+ // ABSL_HAVE_SCHED_YIELD
386
+ //
387
+ // Checks whether the platform implements sched_yield(2) as defined in
388
+ // POSIX.1-2001.
389
+ #ifdef ABSL_HAVE_SCHED_YIELD
390
+ #error ABSL_HAVE_SCHED_YIELD cannot be directly set
391
+ #elif defined(__linux__) || defined(__ros__) || defined(__native_client__)
392
+ #define ABSL_HAVE_SCHED_YIELD 1
393
+ #endif
394
+
395
+ // ABSL_HAVE_SEMAPHORE_H
396
+ //
397
+ // Checks whether the platform supports the <semaphore.h> header and sem_init(3)
398
+ // family of functions as standardized in POSIX.1-2001.
399
+ //
400
+ // Note: While Apple provides <semaphore.h> for both iOS and macOS, it is
401
+ // explicitly deprecated and will cause build failures if enabled for those
402
+ // platforms. We side-step the issue by not defining it here for Apple
403
+ // platforms.
404
+ #ifdef ABSL_HAVE_SEMAPHORE_H
405
+ #error ABSL_HAVE_SEMAPHORE_H cannot be directly set
406
+ #elif defined(__linux__) || defined(__ros__)
407
+ #define ABSL_HAVE_SEMAPHORE_H 1
408
+ #endif
409
+
410
+ // ABSL_HAVE_ALARM
411
+ //
412
+ // Checks whether the platform supports the <signal.h> header and alarm(2)
413
+ // function as standardized in POSIX.1-2001.
414
+ #ifdef ABSL_HAVE_ALARM
415
+ #error ABSL_HAVE_ALARM cannot be directly set
416
+ #elif defined(__GOOGLE_GRTE_VERSION__)
417
+ // feature tests for Google's GRTE
418
+ #define ABSL_HAVE_ALARM 1
419
+ #elif defined(__GLIBC__)
420
+ // feature test for glibc
421
+ #define ABSL_HAVE_ALARM 1
422
+ #elif defined(_MSC_VER)
423
+ // feature tests for Microsoft's library
424
+ #elif defined(__MINGW32__)
425
+ // mingw32 doesn't provide alarm(2):
426
+ // https://osdn.net/projects/mingw/scm/git/mingw-org-wsl/blobs/5.2-trunk/mingwrt/include/unistd.h
427
+ // mingw-w64 provides a no-op implementation:
428
+ // https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/misc/alarm.c
429
+ #elif defined(__EMSCRIPTEN__)
430
+ // emscripten doesn't support signals
431
+ #elif defined(__Fuchsia__)
432
+ // Signals don't exist on fuchsia.
433
+ #elif defined(__native_client__)
434
+ #else
435
+ // other standard libraries
436
+ #define ABSL_HAVE_ALARM 1
437
+ #endif
438
+
439
+ // ABSL_IS_LITTLE_ENDIAN
440
+ // ABSL_IS_BIG_ENDIAN
441
+ //
442
+ // Checks the endianness of the platform.
443
+ //
444
+ // Notes: uses the built in endian macros provided by GCC (since 4.6) and
445
+ // Clang (since 3.2); see
446
+ // https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html.
447
+ // Otherwise, if _WIN32, assume little endian. Otherwise, bail with an error.
448
+ #if defined(ABSL_IS_BIG_ENDIAN)
449
+ #error "ABSL_IS_BIG_ENDIAN cannot be directly set."
450
+ #endif
451
+ #if defined(ABSL_IS_LITTLE_ENDIAN)
452
+ #error "ABSL_IS_LITTLE_ENDIAN cannot be directly set."
453
+ #endif
454
+
455
+ #if (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
456
+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
457
+ #define ABSL_IS_LITTLE_ENDIAN 1
458
+ #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && \
459
+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
460
+ #define ABSL_IS_BIG_ENDIAN 1
461
+ #elif defined(_WIN32)
462
+ #define ABSL_IS_LITTLE_ENDIAN 1
463
+ #else
464
+ #error "absl endian detection needs to be set up for your compiler"
465
+ #endif
466
+
467
+ // macOS 10.13 and iOS 10.11 don't let you use <any>, <optional>, or <variant>
468
+ // even though the headers exist and are publicly noted to work. See
469
+ // https://github.com/abseil/abseil-cpp/issues/207 and
470
+ // https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes
471
+ // libc++ spells out the availability requirements in the file
472
+ // llvm-project/libcxx/include/__config via the #define
473
+ // _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS.
474
+ #if defined(__APPLE__) && defined(_LIBCPP_VERSION) && \
475
+ ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \
476
+ __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101400) || \
477
+ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \
478
+ __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 120000) || \
479
+ (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && \
480
+ __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 120000) || \
481
+ (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && \
482
+ __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 50000))
483
+ #define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 1
484
+ #else
485
+ #define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 0
486
+ #endif
487
+
488
+ // ABSL_HAVE_STD_ANY
489
+ //
490
+ // Checks whether C++17 std::any is available by checking whether <any> exists.
491
+ #ifdef ABSL_HAVE_STD_ANY
492
+ #error "ABSL_HAVE_STD_ANY cannot be directly set."
493
+ #endif
494
+
495
+ #ifdef __has_include
496
+ #if __has_include(<any>) && __cplusplus >= 201703L && \
497
+ !ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE
498
+ #define ABSL_HAVE_STD_ANY 1
499
+ #endif
500
+ #endif
501
+
502
+ // ABSL_HAVE_STD_OPTIONAL
503
+ //
504
+ // Checks whether C++17 std::optional is available.
505
+ #ifdef ABSL_HAVE_STD_OPTIONAL
506
+ #error "ABSL_HAVE_STD_OPTIONAL cannot be directly set."
507
+ #endif
508
+
509
+ #ifdef __has_include
510
+ #if __has_include(<optional>) && __cplusplus >= 201703L && \
511
+ !ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE
512
+ #define ABSL_HAVE_STD_OPTIONAL 1
513
+ #endif
514
+ #endif
515
+
516
+ // ABSL_HAVE_STD_VARIANT
517
+ //
518
+ // Checks whether C++17 std::variant is available.
519
+ #ifdef ABSL_HAVE_STD_VARIANT
520
+ #error "ABSL_HAVE_STD_VARIANT cannot be directly set."
521
+ #endif
522
+
523
+ #ifdef __has_include
524
+ #if __has_include(<variant>) && __cplusplus >= 201703L && \
525
+ !ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE
526
+ #define ABSL_HAVE_STD_VARIANT 1
527
+ #endif
528
+ #endif
529
+
530
+ // ABSL_HAVE_STD_STRING_VIEW
531
+ //
532
+ // Checks whether C++17 std::string_view is available.
533
+ #ifdef ABSL_HAVE_STD_STRING_VIEW
534
+ #error "ABSL_HAVE_STD_STRING_VIEW cannot be directly set."
535
+ #endif
536
+
537
+ #ifdef __has_include
538
+ #if __has_include(<string_view>) && __cplusplus >= 201703L
539
+ #define ABSL_HAVE_STD_STRING_VIEW 1
540
+ #endif
541
+ #endif
542
+
543
+ // For MSVC, `__has_include` is supported in VS 2017 15.3, which is later than
544
+ // the support for <optional>, <any>, <string_view>, <variant>. So we use
545
+ // _MSC_VER to check whether we have VS 2017 RTM (when <optional>, <any>,
546
+ // <string_view>, <variant> is implemented) or higher. Also, `__cplusplus` is
547
+ // not correctly set by MSVC, so we use `_MSVC_LANG` to check the language
548
+ // version.
549
+ // TODO(zhangxy): fix tests before enabling aliasing for `std::any`.
550
+ #if defined(_MSC_VER) && _MSC_VER >= 1910 && \
551
+ ((defined(_MSVC_LANG) && _MSVC_LANG > 201402) || __cplusplus > 201402)
552
+ // #define ABSL_HAVE_STD_ANY 1
553
+ #define ABSL_HAVE_STD_OPTIONAL 1
554
+ #define ABSL_HAVE_STD_VARIANT 1
555
+ #define ABSL_HAVE_STD_STRING_VIEW 1
556
+ #endif
557
+
558
+ // ABSL_USES_STD_ANY
559
+ //
560
+ // Indicates whether absl::any is an alias for std::any.
561
+ #if !defined(ABSL_OPTION_USE_STD_ANY)
562
+ #error options.h is misconfigured.
563
+ #elif ABSL_OPTION_USE_STD_ANY == 0 || \
564
+ (ABSL_OPTION_USE_STD_ANY == 2 && !defined(ABSL_HAVE_STD_ANY))
565
+ #undef ABSL_USES_STD_ANY
566
+ #elif ABSL_OPTION_USE_STD_ANY == 1 || \
567
+ (ABSL_OPTION_USE_STD_ANY == 2 && defined(ABSL_HAVE_STD_ANY))
568
+ #define ABSL_USES_STD_ANY 1
569
+ #else
570
+ #error options.h is misconfigured.
571
+ #endif
572
+
573
+ // ABSL_USES_STD_OPTIONAL
574
+ //
575
+ // Indicates whether absl::optional is an alias for std::optional.
576
+ #if !defined(ABSL_OPTION_USE_STD_OPTIONAL)
577
+ #error options.h is misconfigured.
578
+ #elif ABSL_OPTION_USE_STD_OPTIONAL == 0 || \
579
+ (ABSL_OPTION_USE_STD_OPTIONAL == 2 && !defined(ABSL_HAVE_STD_OPTIONAL))
580
+ #undef ABSL_USES_STD_OPTIONAL
581
+ #elif ABSL_OPTION_USE_STD_OPTIONAL == 1 || \
582
+ (ABSL_OPTION_USE_STD_OPTIONAL == 2 && defined(ABSL_HAVE_STD_OPTIONAL))
583
+ #define ABSL_USES_STD_OPTIONAL 1
584
+ #else
585
+ #error options.h is misconfigured.
586
+ #endif
587
+
588
+ // ABSL_USES_STD_VARIANT
589
+ //
590
+ // Indicates whether absl::variant is an alias for std::variant.
591
+ #if !defined(ABSL_OPTION_USE_STD_VARIANT)
592
+ #error options.h is misconfigured.
593
+ #elif ABSL_OPTION_USE_STD_VARIANT == 0 || \
594
+ (ABSL_OPTION_USE_STD_VARIANT == 2 && !defined(ABSL_HAVE_STD_VARIANT))
595
+ #undef ABSL_USES_STD_VARIANT
596
+ #elif ABSL_OPTION_USE_STD_VARIANT == 1 || \
597
+ (ABSL_OPTION_USE_STD_VARIANT == 2 && defined(ABSL_HAVE_STD_VARIANT))
598
+ #define ABSL_USES_STD_VARIANT 1
599
+ #else
600
+ #error options.h is misconfigured.
601
+ #endif
602
+
603
+ // ABSL_USES_STD_STRING_VIEW
604
+ //
605
+ // Indicates whether absl::string_view is an alias for std::string_view.
606
+ #if !defined(ABSL_OPTION_USE_STD_STRING_VIEW)
607
+ #error options.h is misconfigured.
608
+ #elif ABSL_OPTION_USE_STD_STRING_VIEW == 0 || \
609
+ (ABSL_OPTION_USE_STD_STRING_VIEW == 2 && \
610
+ !defined(ABSL_HAVE_STD_STRING_VIEW))
611
+ #undef ABSL_USES_STD_STRING_VIEW
612
+ #elif ABSL_OPTION_USE_STD_STRING_VIEW == 1 || \
613
+ (ABSL_OPTION_USE_STD_STRING_VIEW == 2 && \
614
+ defined(ABSL_HAVE_STD_STRING_VIEW))
615
+ #define ABSL_USES_STD_STRING_VIEW 1
616
+ #else
617
+ #error options.h is misconfigured.
618
+ #endif
619
+
620
+ // In debug mode, MSVC 2017's std::variant throws a EXCEPTION_ACCESS_VIOLATION
621
+ // SEH exception from emplace for variant<SomeStruct> when constructing the
622
+ // struct can throw. This defeats some of variant_test and
623
+ // variant_exception_safety_test.
624
+ #if defined(_MSC_VER) && _MSC_VER >= 1700 && defined(_DEBUG)
625
+ #define ABSL_INTERNAL_MSVC_2017_DBG_MODE
626
+ #endif
627
+
628
+ // ABSL_INTERNAL_MANGLED_NS
629
+ // ABSL_INTERNAL_MANGLED_BACKREFERENCE
630
+ //
631
+ // Internal macros for building up mangled names in our internal fork of CCTZ.
632
+ // This implementation detail is only needed and provided for the MSVC build.
633
+ //
634
+ // These macros both expand to string literals. ABSL_INTERNAL_MANGLED_NS is
635
+ // the mangled spelling of the `absl` namespace, and
636
+ // ABSL_INTERNAL_MANGLED_BACKREFERENCE is a back-reference integer representing
637
+ // the proper count to skip past the CCTZ fork namespace names. (This number
638
+ // is one larger when there is an inline namespace name to skip.)
639
+ #if defined(_MSC_VER)
640
+ #if ABSL_OPTION_USE_INLINE_NAMESPACE == 0
641
+ #define ABSL_INTERNAL_MANGLED_NS "absl"
642
+ #define ABSL_INTERNAL_MANGLED_BACKREFERENCE "5"
643
+ #else
644
+ #define ABSL_INTERNAL_MANGLED_NS \
645
+ ABSL_INTERNAL_TOKEN_STR(ABSL_OPTION_INLINE_NAMESPACE_NAME) "@absl"
646
+ #define ABSL_INTERNAL_MANGLED_BACKREFERENCE "6"
647
+ #endif
648
+ #endif
649
+
650
+ #undef ABSL_INTERNAL_HAS_KEYWORD
651
+
652
+ // ABSL_DLL
653
+ //
654
+ // When building Abseil as a DLL, this macro expands to `__declspec(dllexport)`
655
+ // so we can annotate symbols appropriately as being exported. When used in
656
+ // headers consuming a DLL, this macro expands to `__declspec(dllimport)` so
657
+ // that consumers know the symbol is defined inside the DLL. In all other cases,
658
+ // the macro expands to nothing.
659
+ #if defined(_MSC_VER)
660
+ #if defined(ABSL_BUILD_DLL)
661
+ #define ABSL_DLL __declspec(dllexport)
662
+ #elif defined(ABSL_CONSUME_DLL)
663
+ #define ABSL_DLL __declspec(dllimport)
664
+ #else
665
+ #define ABSL_DLL
666
+ #endif
667
+ #else
668
+ #define ABSL_DLL
669
+ #endif // defined(_MSC_VER)
670
+
671
+ #endif // ABSL_BASE_CONFIG_H_