datadog-ruby_core_source 3.5.3 → 3.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. checksums.yaml +4 -4
  2. data/datadog-ruby_core_source.gemspec +1 -1
  3. data/lib/datadog/ruby_core_source/ruby-2.5.0-p0/thread_win32.h +36 -0
  4. data/lib/datadog/ruby_core_source/ruby-2.5.1-p57/thread_win32.h +36 -0
  5. data/lib/datadog/ruby_core_source/ruby-2.5.4-p155/thread_win32.h +36 -0
  6. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/build_assert/build_assert.h +40 -0
  7. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/check_type/check_type.h +63 -0
  8. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/container_of/container_of.h +142 -0
  9. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/list/list.h +788 -0
  10. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ccan/str/str.h +16 -0
  11. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/id.h +252 -0
  12. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/internal.h +2465 -0
  13. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/iseq.h +304 -0
  14. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/method.h +229 -0
  15. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/node.h +449 -0
  16. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ruby_assert.h +60 -0
  17. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/ruby_atomic.h +244 -0
  18. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/thread_pthread.h +75 -0
  19. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/thread_win32.h +36 -0
  20. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/vm_core.h +1902 -0
  21. data/lib/datadog/ruby_core_source/ruby-2.6.0-p0/vm_opts.h +70 -0
  22. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/build_assert/build_assert.h +40 -0
  23. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/check_type/check_type.h +63 -0
  24. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/container_of/container_of.h +142 -0
  25. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/list/list.h +788 -0
  26. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ccan/str/str.h +16 -0
  27. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/id.h +290 -0
  28. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/internal.h +2697 -0
  29. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/iseq.h +312 -0
  30. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/method.h +229 -0
  31. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/node.h +476 -0
  32. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ruby_assert.h +15 -0
  33. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/ruby_atomic.h +244 -0
  34. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/thread_pthread.h +75 -0
  35. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/thread_win32.h +36 -0
  36. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/vm_core.h +1968 -0
  37. data/lib/datadog/ruby_core_source/ruby-2.7.0-p0/vm_opts.h +72 -0
  38. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/build_assert/build_assert.h +40 -0
  39. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/check_type/check_type.h +63 -0
  40. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/container_of/container_of.h +142 -0
  41. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/list/list.h +788 -0
  42. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ccan/str/str.h +16 -0
  43. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/id.h +290 -0
  44. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/id_table.h +36 -0
  45. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/array.h +119 -0
  46. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/class.h +174 -0
  47. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/compilers.h +108 -0
  48. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/gc.h +161 -0
  49. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/imemo.h +243 -0
  50. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/serial.h +24 -0
  51. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/static_assert.h +17 -0
  52. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/vm.h +136 -0
  53. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal/warnings.h +17 -0
  54. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/internal.h +107 -0
  55. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/iseq.h +305 -0
  56. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/method.h +245 -0
  57. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/node.h +484 -0
  58. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ractor_core.h +343 -0
  59. data/lib/datadog/ruby_core_source/{ruby-3.4.0-p0/internal/dir.h → ruby-3.0.0-p0/ruby_assert.h} +7 -8
  60. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/ruby_atomic.h +23 -0
  61. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/thread_pthread.h +115 -0
  62. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/thread_win32.h +61 -0
  63. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/vm_core.h +2023 -0
  64. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/vm_debug.h +116 -0
  65. data/lib/datadog/ruby_core_source/ruby-3.0.0-p0/vm_opts.h +73 -0
  66. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/build_assert/build_assert.h +40 -0
  67. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/check_type/check_type.h +63 -0
  68. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/container_of/container_of.h +142 -0
  69. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/list/list.h +788 -0
  70. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ccan/str/str.h +16 -0
  71. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/darray.h +198 -0
  72. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/id.h +293 -0
  73. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/id_table.h +36 -0
  74. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/array.h +113 -0
  75. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/class.h +196 -0
  76. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/compilers.h +107 -0
  77. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/gc.h +186 -0
  78. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/imemo.h +243 -0
  79. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/serial.h +23 -0
  80. data/lib/datadog/ruby_core_source/{ruby-3.3.5-p100/internal/loadpath.h → ruby-3.1.0-p0/internal/static_assert.h} +8 -8
  81. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/vm.h +133 -0
  82. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal/warnings.h +16 -0
  83. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/internal.h +109 -0
  84. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/iseq.h +322 -0
  85. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/method.h +253 -0
  86. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/node.h +510 -0
  87. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ractor_core.h +346 -0
  88. data/lib/datadog/ruby_core_source/{ruby-3.3.0-p0/internal/dir.h → ruby-3.1.0-p0/ruby_assert.h} +6 -8
  89. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/ruby_atomic.h +23 -0
  90. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/thread_pthread.h +115 -0
  91. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/vm_core.h +2107 -0
  92. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/vm_debug.h +124 -0
  93. data/lib/datadog/ruby_core_source/ruby-3.1.0-p0/vm_opts.h +73 -0
  94. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/build_assert/build_assert.h +40 -0
  95. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/check_type/check_type.h +63 -0
  96. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/container_of/container_of.h +142 -0
  97. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/list/list.h +789 -0
  98. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ccan/str/str.h +17 -0
  99. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/id.h +299 -0
  100. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/id_table.h +39 -0
  101. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/array.h +163 -0
  102. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/basic_operators.h +64 -0
  103. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/class.h +182 -0
  104. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/compilers.h +107 -0
  105. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/gc.h +192 -0
  106. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/imemo.h +242 -0
  107. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/serial.h +23 -0
  108. data/lib/datadog/ruby_core_source/{ruby-3.3.0-p0/internal/loadpath.h → ruby-3.2.0-p0/internal/static_assert.h} +8 -8
  109. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/vm.h +134 -0
  110. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal/warnings.h +16 -0
  111. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/internal.h +113 -0
  112. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/iseq.h +329 -0
  113. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/method.h +254 -0
  114. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/node.h +514 -0
  115. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ractor_core.h +342 -0
  116. data/lib/datadog/ruby_core_source/{ruby-3.3.5-p100/internal/dir.h → ruby-3.2.0-p0/ruby_assert.h} +6 -8
  117. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/ruby_atomic.h +23 -0
  118. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/shape.h +232 -0
  119. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/thread_none.h +20 -0
  120. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/thread_pthread.h +133 -0
  121. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/vm_core.h +2106 -0
  122. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/vm_debug.h +122 -0
  123. data/lib/datadog/ruby_core_source/ruby-3.2.0-p0/vm_opts.h +73 -0
  124. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/constant.h +53 -0
  125. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/debug_counter.h +423 -0
  126. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/vm_sync.h +137 -0
  127. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/constant.h +53 -0
  128. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/debug_counter.h +423 -0
  129. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/vm_sync.h +137 -0
  130. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/constant.h +53 -0
  131. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/debug_counter.h +423 -0
  132. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/vm_sync.h +137 -0
  133. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/constant.h +53 -0
  134. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/debug_counter.h +425 -0
  135. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/vm_sync.h +160 -0
  136. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/constant.h +53 -0
  137. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/debug_counter.h +426 -0
  138. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/vm_sync.h +160 -0
  139. data/lib/datadog/ruby_core_source/version.rb +1 -1
  140. metadata +140 -226
  141. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/bignum.h +0 -244
  142. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/bits.h +0 -568
  143. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/cmdlineopt.h +0 -65
  144. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/compar.h +0 -29
  145. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/compile.h +0 -34
  146. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/complex.h +0 -29
  147. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/cont.h +0 -35
  148. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/enc.h +0 -19
  149. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/encoding.h +0 -35
  150. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/enum.h +0 -18
  151. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/enumerator.h +0 -21
  152. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/error.h +0 -216
  153. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/eval.h +0 -32
  154. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/file.h +0 -38
  155. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/fixnum.h +0 -184
  156. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/hash.h +0 -191
  157. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/inits.h +0 -50
  158. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/io.h +0 -137
  159. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/load.h +0 -18
  160. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/math.h +0 -23
  161. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/missing.h +0 -18
  162. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/numeric.h +0 -273
  163. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/object.h +0 -60
  164. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/parse.h +0 -108
  165. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/proc.h +0 -30
  166. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/process.h +0 -124
  167. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/ractor.h +0 -6
  168. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/random.h +0 -17
  169. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/range.h +0 -40
  170. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/rational.h +0 -71
  171. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/re.h +0 -28
  172. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/ruby_parser.h +0 -69
  173. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/sanitizers.h +0 -186
  174. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/signal.h +0 -25
  175. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/string.h +0 -159
  176. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/struct.h +0 -127
  177. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/symbol.h +0 -45
  178. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/thread.h +0 -78
  179. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/time.h +0 -34
  180. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/transcode.h +0 -23
  181. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/internal/util.h +0 -27
  182. data/lib/datadog/ruby_core_source/ruby-3.3.0-p0/prism/extension.h +0 -18
  183. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/bignum.h +0 -244
  184. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/bits.h +0 -568
  185. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/cmdlineopt.h +0 -65
  186. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/compar.h +0 -29
  187. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/compile.h +0 -34
  188. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/complex.h +0 -29
  189. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/cont.h +0 -35
  190. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/enc.h +0 -19
  191. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/encoding.h +0 -35
  192. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/enum.h +0 -18
  193. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/enumerator.h +0 -21
  194. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/error.h +0 -216
  195. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/eval.h +0 -33
  196. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/file.h +0 -38
  197. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/fixnum.h +0 -184
  198. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/hash.h +0 -191
  199. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/inits.h +0 -50
  200. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/io.h +0 -137
  201. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/load.h +0 -18
  202. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/math.h +0 -23
  203. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/missing.h +0 -18
  204. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/numeric.h +0 -273
  205. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/object.h +0 -62
  206. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/parse.h +0 -108
  207. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/proc.h +0 -30
  208. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/process.h +0 -124
  209. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/ractor.h +0 -6
  210. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/random.h +0 -17
  211. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/range.h +0 -40
  212. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/rational.h +0 -71
  213. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/re.h +0 -28
  214. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/ruby_parser.h +0 -69
  215. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/sanitizers.h +0 -186
  216. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/signal.h +0 -25
  217. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/string.h +0 -160
  218. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/struct.h +0 -127
  219. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/symbol.h +0 -45
  220. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/thread.h +0 -78
  221. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/time.h +0 -34
  222. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/transcode.h +0 -23
  223. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/internal/util.h +0 -27
  224. data/lib/datadog/ruby_core_source/ruby-3.3.5-p100/prism/extension.h +0 -18
  225. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/bignum.h +0 -244
  226. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/bits.h +0 -650
  227. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/cmdlineopt.h +0 -65
  228. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/compar.h +0 -29
  229. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/compile.h +0 -34
  230. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/complex.h +0 -29
  231. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/cont.h +0 -35
  232. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/enc.h +0 -19
  233. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/encoding.h +0 -38
  234. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/enum.h +0 -18
  235. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/enumerator.h +0 -21
  236. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/error.h +0 -244
  237. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/eval.h +0 -33
  238. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/file.h +0 -38
  239. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/fixnum.h +0 -185
  240. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/hash.h +0 -192
  241. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/inits.h +0 -47
  242. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/io.h +0 -143
  243. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/load.h +0 -18
  244. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/loadpath.h +0 -16
  245. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/math.h +0 -23
  246. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/missing.h +0 -19
  247. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/numeric.h +0 -274
  248. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/object.h +0 -63
  249. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/parse.h +0 -130
  250. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/proc.h +0 -31
  251. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/process.h +0 -124
  252. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/ractor.h +0 -10
  253. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/random.h +0 -17
  254. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/range.h +0 -40
  255. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/rational.h +0 -71
  256. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/re.h +0 -28
  257. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/ruby_parser.h +0 -102
  258. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/signal.h +0 -24
  259. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/st.h +0 -11
  260. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/string.h +0 -198
  261. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/struct.h +0 -127
  262. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/symbol.h +0 -45
  263. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/thread.h +0 -108
  264. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/time.h +0 -34
  265. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/transcode.h +0 -23
  266. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/internal/util.h +0 -27
  267. data/lib/datadog/ruby_core_source/ruby-3.4.0-p0/prism/extension.h +0 -19
  268. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/bignum.h +0 -256
  269. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/bits.h +0 -647
  270. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/cmdlineopt.h +0 -64
  271. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/compar.h +0 -29
  272. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/compile.h +0 -34
  273. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/complex.h +0 -29
  274. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/concurrent_set.h +0 -21
  275. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/cont.h +0 -34
  276. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/dir.h +0 -16
  277. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/enc.h +0 -19
  278. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/encoding.h +0 -39
  279. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/enum.h +0 -18
  280. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/enumerator.h +0 -21
  281. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/error.h +0 -251
  282. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/eval.h +0 -43
  283. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/file.h +0 -38
  284. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/fixnum.h +0 -185
  285. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/hash.h +0 -194
  286. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/inits.h +0 -51
  287. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/io.h +0 -163
  288. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/load.h +0 -20
  289. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/loadpath.h +0 -16
  290. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/math.h +0 -23
  291. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/missing.h +0 -19
  292. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/numeric.h +0 -323
  293. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/object.h +0 -63
  294. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/parse.h +0 -131
  295. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/proc.h +0 -30
  296. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/process.h +0 -124
  297. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/ractor.h +0 -10
  298. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/random.h +0 -17
  299. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/range.h +0 -40
  300. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/rational.h +0 -71
  301. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/re.h +0 -33
  302. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/ruby_parser.h +0 -102
  303. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/signal.h +0 -25
  304. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/st.h +0 -11
  305. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/string.h +0 -203
  306. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/struct.h +0 -160
  307. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/symbol.h +0 -46
  308. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/thread.h +0 -112
  309. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/time.h +0 -34
  310. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/transcode.h +0 -23
  311. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/internal/util.h +0 -27
  312. data/lib/datadog/ruby_core_source/ruby-4.0.0-p0/prism/extension.h +0 -19
  313. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/bignum.h +0 -256
  314. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/bits.h +0 -647
  315. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/cmdlineopt.h +0 -64
  316. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/compar.h +0 -29
  317. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/compile.h +0 -34
  318. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/complex.h +0 -29
  319. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/concurrent_set.h +0 -21
  320. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/cont.h +0 -34
  321. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/dir.h +0 -16
  322. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/enc.h +0 -19
  323. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/encoding.h +0 -39
  324. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/enum.h +0 -18
  325. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/enumerator.h +0 -21
  326. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/error.h +0 -251
  327. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/eval.h +0 -43
  328. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/file.h +0 -38
  329. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/fixnum.h +0 -185
  330. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/hash.h +0 -194
  331. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/inits.h +0 -51
  332. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/io.h +0 -163
  333. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/load.h +0 -20
  334. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/loadpath.h +0 -16
  335. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/math.h +0 -23
  336. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/missing.h +0 -19
  337. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/numeric.h +0 -323
  338. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/object.h +0 -63
  339. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/parse.h +0 -131
  340. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/proc.h +0 -30
  341. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/process.h +0 -124
  342. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/ractor.h +0 -10
  343. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/random.h +0 -17
  344. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/range.h +0 -40
  345. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/rational.h +0 -73
  346. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/re.h +0 -33
  347. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/ruby_parser.h +0 -102
  348. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/signal.h +0 -25
  349. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/st.h +0 -11
  350. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/string.h +0 -203
  351. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/struct.h +0 -160
  352. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/symbol.h +0 -46
  353. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/thread.h +0 -112
  354. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/time.h +0 -34
  355. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/transcode.h +0 -23
  356. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/util.h +0 -27
  357. data/lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/extension.h +0 -19
@@ -1,647 +0,0 @@
1
- #ifndef INTERNAL_BITS_H /*-*-C-*-vi:se ft=c:*/
2
- #define INTERNAL_BITS_H
3
- /**
4
- * @author Ruby developers <ruby-core@ruby-lang.org>
5
- * @copyright This file is a part of the programming language Ruby.
6
- * Permission is hereby granted, to either redistribute and/or
7
- * modify this file, provided that the conditions mentioned in the
8
- * file COPYING are met. Consult the file for details.
9
- * @brief Internal header for bitwise integer algorithms.
10
- * @see Henry S. Warren Jr., "Hacker's Delight" (2nd ed.), 2013.
11
- * @see SEI CERT C Coding Standard INT32-C. "Ensure that operations on
12
- * signed integers do not result in overflow"
13
- * @see https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
14
- * @see https://clang.llvm.org/docs/LanguageExtensions.html#builtin-rotateleft
15
- * @see https://clang.llvm.org/docs/LanguageExtensions.html#builtin-rotateright
16
- * @see https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/byteswap-uint64-byteswap-ulong-byteswap-ushort
17
- * @see https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/rotl-rotl64-rotr-rotr64
18
- * @see https://docs.microsoft.com/en-us/cpp/intrinsics/bitscanforward-bitscanforward64
19
- * @see https://docs.microsoft.com/en-us/cpp/intrinsics/bitscanreverse-bitscanreverse64
20
- * @see https://docs.microsoft.com/en-us/cpp/intrinsics/lzcnt16-lzcnt-lzcnt64
21
- * @see https://docs.microsoft.com/en-us/cpp/intrinsics/popcnt16-popcnt-popcnt64
22
- * @see https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_lzcnt_u32
23
- * @see https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_tzcnt_u32
24
- * @see https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_rotl64
25
- * @see https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_rotr64
26
- * @see https://stackoverflow.com/a/776523
27
- */
28
- #include "ruby/internal/config.h"
29
- #include <limits.h> /* for CHAR_BITS */
30
- #include <stdint.h> /* for uintptr_t */
31
- #include "internal/compilers.h" /* for MSC_VERSION_SINCE */
32
-
33
- #ifdef _MSC_VER
34
- # include <stdlib.h> /* for _byteswap_uint64 */
35
- #endif
36
-
37
- #if defined(HAVE_X86INTRIN_H)
38
- # include <x86intrin.h> /* for _lzcnt_u64 */
39
- #elif defined(_MSC_VER)
40
- # include <intrin.h> /* for the following intrinsics */
41
- #endif
42
-
43
- #if defined(_MSC_VER) && defined(__AVX__)
44
- # pragma intrinsic(__popcnt)
45
- # pragma intrinsic(__popcnt64)
46
- #endif
47
-
48
- #if defined(_MSC_VER) && defined(__AVX2__)
49
- # pragma intrinsic(__lzcnt)
50
- # pragma intrinsic(__lzcnt64)
51
- #endif
52
-
53
- #if defined(_MSC_VER)
54
- # pragma intrinsic(_rotl)
55
- # pragma intrinsic(_rotr)
56
- # ifdef _WIN64
57
- # pragma intrinsic(_rotl64)
58
- # pragma intrinsic(_rotr64)
59
- # endif
60
- # pragma intrinsic(_BitScanForward)
61
- # pragma intrinsic(_BitScanReverse)
62
- # ifdef _WIN64
63
- # pragma intrinsic(_BitScanForward64)
64
- # pragma intrinsic(_BitScanReverse64)
65
- # endif
66
- #endif
67
-
68
- #include "ruby/ruby.h" /* for VALUE */
69
- #include "internal/static_assert.h" /* for STATIC_ASSERT */
70
-
71
- /* The most significant bit of the lower part of half-long integer.
72
- * If sizeof(long) == 4, this is 0x8000.
73
- * If sizeof(long) == 8, this is 0x80000000.
74
- */
75
- #define HALF_LONG_MSB ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2))
76
-
77
- #define SIGNED_INTEGER_TYPE_P(T) (0 > ((T)0)-1)
78
-
79
- #define SIGNED_INTEGER_MIN(T) \
80
- ((sizeof(T) == sizeof(int8_t)) ? ((T)INT8_MIN) : \
81
- ((sizeof(T) == sizeof(int16_t)) ? ((T)INT16_MIN) : \
82
- ((sizeof(T) == sizeof(int32_t)) ? ((T)INT32_MIN) : \
83
- ((sizeof(T) == sizeof(int64_t)) ? ((T)INT64_MIN) : \
84
- 0))))
85
-
86
- #define SIGNED_INTEGER_MAX(T) ((T)(SIGNED_INTEGER_MIN(T) ^ ((T)~(T)0)))
87
-
88
- #define UNSIGNED_INTEGER_MAX(T) ((T)~(T)0)
89
-
90
- #ifndef MUL_OVERFLOW_SIGNED_INTEGER_P
91
- #if __has_builtin(__builtin_mul_overflow_p)
92
- # define MUL_OVERFLOW_P(a, b) \
93
- __builtin_mul_overflow_p((a), (b), (__typeof__(a * b))0)
94
- #elif __has_builtin(__builtin_mul_overflow)
95
- # define MUL_OVERFLOW_P(a, b) \
96
- __extension__ ({ __typeof__(a) c; __builtin_mul_overflow((a), (b), &c); })
97
- #endif
98
-
99
- #define MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \
100
- (a) == 0 ? 0 : \
101
- (a) == -1 ? (b) < -(max) : \
102
- (a) > 0 ? \
103
- ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : \
104
- ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
105
-
106
- #if __has_builtin(__builtin_mul_overflow_p)
107
- /* __builtin_mul_overflow_p can take bitfield */
108
- /* and GCC permits bitfields for integers other than int */
109
- # define MUL_OVERFLOW_FIXNUM_P(a, b) \
110
- __extension__ ({ \
111
- struct { long fixnum : sizeof(long) * CHAR_BIT - 1; } c = { 0 }; \
112
- __builtin_mul_overflow_p((a), (b), c.fixnum); \
113
- })
114
- #else
115
- # define MUL_OVERFLOW_FIXNUM_P(a, b) \
116
- MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, FIXNUM_MIN, FIXNUM_MAX)
117
- #endif
118
-
119
- #if defined(MUL_OVERFLOW_P) && defined(USE___BUILTIN_MUL_OVERFLOW_LONG_LONG)
120
- # define MUL_OVERFLOW_LONG_LONG_P(a, b) MUL_OVERFLOW_P(a, b)
121
- #else
122
- # define MUL_OVERFLOW_LONG_LONG_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, LLONG_MIN, LLONG_MAX)
123
- #endif
124
-
125
- #ifdef MUL_OVERFLOW_P
126
- # define MUL_OVERFLOW_LONG_P(a, b) MUL_OVERFLOW_P(a, b)
127
- # define MUL_OVERFLOW_INT_P(a, b) MUL_OVERFLOW_P(a, b)
128
- #else
129
- # define MUL_OVERFLOW_LONG_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, LONG_MIN, LONG_MAX)
130
- # define MUL_OVERFLOW_INT_P(a, b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, INT_MIN, INT_MAX)
131
- #endif
132
- #endif
133
-
134
- #ifndef ADD_OVERFLOW_SIGNED_INTEGER_P
135
- #if __has_builtin(__builtin_add_overflow_p)
136
- # define ADD_OVERFLOW_P(a, b) \
137
- __builtin_add_overflow_p((a), (b), (__typeof__(a * b))0)
138
- #elif __has_builtin(__builtin_add_overflow)
139
- # define ADD_OVERFLOW_P(a, b) \
140
- __extension__ ({ __typeof__(a) c; __builtin_add_overflow((a), (b), &c); })
141
- #endif
142
-
143
- #define ADD_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \
144
- (a) > 0 ? (b) > (max) - (a) : (b) < (min) - (a))
145
-
146
- #if __has_builtin(__builtin_add_overflow_p)
147
- /* __builtin_add_overflow_p can take bitfield */
148
- /* and GCC permits bitfields for integers other than int */
149
- # define ADD_OVERFLOW_FIXNUM_P(a, b) \
150
- __extension__ ({ \
151
- struct { long fixnum : sizeof(long) * CHAR_BIT - 1; } c = { 0 }; \
152
- __builtin_add_overflow_p((a), (b), c.fixnum); \
153
- })
154
- #else
155
- # define ADD_OVERFLOW_FIXNUM_P(a, b) \
156
- ADD_OVERFLOW_SIGNED_INTEGER_P(a, b, FIXNUM_MIN, FIXNUM_MAX)
157
- #endif
158
-
159
- #if defined(ADD_OVERFLOW_P) && defined(USE___BUILTIN_ADD_OVERFLOW_LONG_LONG)
160
- # define ADD_OVERFLOW_LONG_LONG_P(a, b) ADD_OVERFLOW_P(a, b)
161
- #else
162
- # define ADD_OVERFLOW_LONG_LONG_P(a, b) ADD_OVERFLOW_SIGNED_INTEGER_P(a, b, LLONG_MIN, LLONG_MAX)
163
- #endif
164
-
165
- #ifdef ADD_OVERFLOW_P
166
- # define ADD_OVERFLOW_LONG_P(a, b) ADD_OVERFLOW_P(a, b)
167
- # define ADD_OVERFLOW_INT_P(a, b) ADD_OVERFLOW_P(a, b)
168
- #else
169
- # define ADD_OVERFLOW_LONG_P(a, b) ADD_OVERFLOW_SIGNED_INTEGER_P(a, b, LONG_MIN, LONG_MAX)
170
- # define ADD_OVERFLOW_INT_P(a, b) ADD_OVERFLOW_SIGNED_INTEGER_P(a, b, INT_MIN, INT_MAX)
171
- #endif
172
- #endif
173
-
174
- #ifndef SUB_OVERFLOW_SIGNED_INTEGER_P
175
- #if __has_builtin(__builtin_sub_overflow_p)
176
- # define SUB_OVERFLOW_P(a, b) \
177
- __builtin_sub_overflow_p((a), (b), (__typeof__(a * b))0)
178
- #elif __has_builtin(__builtin_sub_overflow)
179
- # define SUB_OVERFLOW_P(a, b) \
180
- __extension__ ({ __typeof__(a) c; __builtin_sub_overflow((a), (b), &c); })
181
- #endif
182
-
183
- #define SUB_OVERFLOW_SIGNED_INTEGER_P(a, b, min, max) ( \
184
- (b) > 0 ? (a) < (min) + (b) : (a) > (max) + (b))
185
-
186
- #if __has_builtin(__builtin_sub_overflow_p)
187
- /* __builtin_sub_overflow_p can take bitfield */
188
- /* and GCC permits bitfields for integers other than int */
189
- # define SUB_OVERFLOW_FIXNUM_P(a, b) \
190
- __extension__ ({ \
191
- struct { long fixnum : sizeof(long) * CHAR_BIT - 1; } c = { 0 }; \
192
- __builtin_sub_overflow_p((a), (b), c.fixnum); \
193
- })
194
- #else
195
- # define SUB_OVERFLOW_FIXNUM_P(a, b) \
196
- SUB_OVERFLOW_SIGNED_INTEGER_P(a, b, FIXNUM_MIN, FIXNUM_MAX)
197
- #endif
198
-
199
- #if defined(SUB_OVERFLOW_P) && defined(USE___BUILTIN_SUB_OVERFLOW_LONG_LONG)
200
- # define SUB_OVERFLOW_LONG_LONG_P(a, b) SUB_OVERFLOW_P(a, b)
201
- #else
202
- # define SUB_OVERFLOW_LONG_LONG_P(a, b) SUB_OVERFLOW_SIGNED_INTEGER_P(a, b, LLONG_MIN, LLONG_MAX)
203
- #endif
204
-
205
- #ifdef SUB_OVERFLOW_P
206
- # define SUB_OVERFLOW_LONG_P(a, b) SUB_OVERFLOW_P(a, b)
207
- # define SUB_OVERFLOW_INT_P(a, b) SUB_OVERFLOW_P(a, b)
208
- #else
209
- # define SUB_OVERFLOW_LONG_P(a, b) SUB_OVERFLOW_SIGNED_INTEGER_P(a, b, LONG_MIN, LONG_MAX)
210
- # define SUB_OVERFLOW_INT_P(a, b) SUB_OVERFLOW_SIGNED_INTEGER_P(a, b, INT_MIN, INT_MAX)
211
- #endif
212
- #endif
213
-
214
- #ifdef HAVE_UINT128_T
215
- # define bit_length(x) \
216
- (unsigned int) \
217
- (sizeof(x) <= sizeof(int32_t) ? 32 - nlz_int32((uint32_t)(x)) : \
218
- sizeof(x) <= sizeof(int64_t) ? 64 - nlz_int64((uint64_t)(x)) : \
219
- 128 - nlz_int128((uint128_t)(x)))
220
- #else
221
- # define bit_length(x) \
222
- (unsigned int) \
223
- (sizeof(x) <= sizeof(int32_t) ? 32 - nlz_int32((uint32_t)(x)) : \
224
- 64 - nlz_int64((uint64_t)(x)))
225
- #endif
226
-
227
- #ifndef swap16
228
- # define swap16 ruby_swap16
229
- #endif
230
-
231
- #ifndef swap32
232
- # define swap32 ruby_swap32
233
- #endif
234
-
235
- #ifndef swap64
236
- # define swap64 ruby_swap64
237
- #endif
238
-
239
- static inline uint16_t ruby_swap16(uint16_t);
240
- static inline uint32_t ruby_swap32(uint32_t);
241
- static inline uint64_t ruby_swap64(uint64_t);
242
- static inline unsigned nlz_int(unsigned x);
243
- static inline unsigned nlz_long(unsigned long x);
244
- static inline unsigned nlz_long_long(unsigned long long x);
245
- static inline unsigned nlz_intptr(uintptr_t x);
246
- static inline unsigned nlz_int32(uint32_t x);
247
- static inline unsigned nlz_int64(uint64_t x);
248
- #ifdef HAVE_UINT128_T
249
- static inline unsigned nlz_int128(uint128_t x);
250
- #endif
251
- static inline unsigned rb_popcount32(uint32_t x);
252
- static inline unsigned rb_popcount64(uint64_t x);
253
- static inline unsigned rb_popcount_intptr(uintptr_t x);
254
- static inline int ntz_int32(uint32_t x);
255
- static inline int ntz_int64(uint64_t x);
256
- static inline int ntz_intptr(uintptr_t x);
257
- static inline VALUE RUBY_BIT_ROTL(VALUE, int);
258
- static inline VALUE RUBY_BIT_ROTR(VALUE, int);
259
-
260
- static inline uint16_t
261
- ruby_swap16(uint16_t x)
262
- {
263
- #if __has_builtin(__builtin_bswap16)
264
- return __builtin_bswap16(x);
265
-
266
- #elif defined(_MSC_VER)
267
- return _byteswap_ushort(x);
268
-
269
- #else
270
- return (x << 8) | (x >> 8);
271
-
272
- #endif
273
- }
274
-
275
- static inline uint32_t
276
- ruby_swap32(uint32_t x)
277
- {
278
- #if __has_builtin(__builtin_bswap32)
279
- return __builtin_bswap32(x);
280
-
281
- #elif defined(_MSC_VER)
282
- return _byteswap_ulong(x);
283
-
284
- #else
285
- x = ((x & 0x0000FFFF) << 16) | ((x & 0xFFFF0000) >> 16);
286
- x = ((x & 0x00FF00FF) << 8) | ((x & 0xFF00FF00) >> 8);
287
- return x;
288
-
289
- #endif
290
- }
291
-
292
- static inline uint64_t
293
- ruby_swap64(uint64_t x)
294
- {
295
- #if __has_builtin(__builtin_bswap64)
296
- return __builtin_bswap64(x);
297
-
298
- #elif defined(_MSC_VER)
299
- return _byteswap_uint64(x);
300
-
301
- #else
302
- x = ((x & 0x00000000FFFFFFFFULL) << 32) | ((x & 0xFFFFFFFF00000000ULL) >> 32);
303
- x = ((x & 0x0000FFFF0000FFFFULL) << 16) | ((x & 0xFFFF0000FFFF0000ULL) >> 16);
304
- x = ((x & 0x00FF00FF00FF00FFULL) << 8) | ((x & 0xFF00FF00FF00FF00ULL) >> 8);
305
- return x;
306
-
307
- #endif
308
- }
309
-
310
- static inline unsigned int
311
- nlz_int32(uint32_t x)
312
- {
313
- #if defined(_MSC_VER) && defined(__AVX2__)
314
- /* Note: It seems there is no such thing like __LZCNT__ predefined in MSVC.
315
- * AMD CPUs have had this instruction for decades (since K10) but for
316
- * Intel, Haswell is the oldest one. We need to use __AVX2__ for maximum
317
- * safety. */
318
- return (unsigned int)__lzcnt(x);
319
-
320
- #elif defined(__x86_64__) && defined(__LZCNT__)
321
- return (unsigned int)_lzcnt_u32(x);
322
-
323
- #elif defined(_MSC_VER) /* &&! defined(__AVX2__) */
324
- unsigned long r;
325
- return _BitScanReverse(&r, x) ? (31 - (int)r) : 32;
326
-
327
- #elif __has_builtin(__builtin_clz)
328
- STATIC_ASSERT(sizeof_int, sizeof(int) * CHAR_BIT == 32);
329
- return x ? (unsigned int)__builtin_clz(x) : 32;
330
-
331
- #else
332
- uint32_t y;
333
- unsigned n = 32;
334
- y = x >> 16; if (y) {n -= 16; x = y;}
335
- y = x >> 8; if (y) {n -= 8; x = y;}
336
- y = x >> 4; if (y) {n -= 4; x = y;}
337
- y = x >> 2; if (y) {n -= 2; x = y;}
338
- y = x >> 1; if (y) {return n - 2;}
339
- return (unsigned int)(n - x);
340
- #endif
341
- }
342
-
343
- static inline unsigned int
344
- nlz_int64(uint64_t x)
345
- {
346
- #if defined(_MSC_VER) && defined(__AVX2__)
347
- return (unsigned int)__lzcnt64(x);
348
-
349
- #elif defined(__x86_64__) && defined(__LZCNT__)
350
- return (unsigned int)_lzcnt_u64(x);
351
-
352
- #elif defined(_WIN64) && defined(_MSC_VER) /* &&! defined(__AVX2__) */
353
- unsigned long r;
354
- return _BitScanReverse64(&r, x) ? (63u - (unsigned int)r) : 64;
355
-
356
- #elif __has_builtin(__builtin_clzl)
357
- if (x == 0) {
358
- return 64;
359
- }
360
- else if (sizeof(long) * CHAR_BIT == 64) {
361
- return (unsigned int)__builtin_clzl((unsigned long)x);
362
- }
363
- else if (sizeof(long long) * CHAR_BIT == 64) {
364
- return (unsigned int)__builtin_clzll((unsigned long long)x);
365
- }
366
- else {
367
- /* :FIXME: Is there a way to make this branch a compile-time error? */
368
- UNREACHABLE_RETURN(~0);
369
- }
370
-
371
- #else
372
- uint64_t y;
373
- unsigned int n = 64;
374
- y = x >> 32; if (y) {n -= 32; x = y;}
375
- y = x >> 16; if (y) {n -= 16; x = y;}
376
- y = x >> 8; if (y) {n -= 8; x = y;}
377
- y = x >> 4; if (y) {n -= 4; x = y;}
378
- y = x >> 2; if (y) {n -= 2; x = y;}
379
- y = x >> 1; if (y) {return n - 2;}
380
- return (unsigned int)(n - x);
381
-
382
- #endif
383
- }
384
-
385
- #ifdef HAVE_UINT128_T
386
- static inline unsigned int
387
- nlz_int128(uint128_t x)
388
- {
389
- uint64_t y = (uint64_t)(x >> 64);
390
-
391
- if (x == 0) {
392
- return 128;
393
- }
394
- else if (y == 0) {
395
- return (unsigned int)nlz_int64(x) + 64;
396
- }
397
- else {
398
- return (unsigned int)nlz_int64(y);
399
- }
400
- }
401
- #endif
402
-
403
- static inline unsigned int
404
- nlz_int(unsigned int x)
405
- {
406
- if (sizeof(unsigned int) * CHAR_BIT == 32) {
407
- return nlz_int32((uint32_t)x);
408
- }
409
- else if (sizeof(unsigned int) * CHAR_BIT == 64) {
410
- return nlz_int64((uint64_t)x);
411
- }
412
- else {
413
- UNREACHABLE_RETURN(~0);
414
- }
415
- }
416
-
417
- static inline unsigned int
418
- nlz_long(unsigned long x)
419
- {
420
- if (sizeof(unsigned long) * CHAR_BIT == 32) {
421
- return nlz_int32((uint32_t)x);
422
- }
423
- else if (sizeof(unsigned long) * CHAR_BIT == 64) {
424
- return nlz_int64((uint64_t)x);
425
- }
426
- else {
427
- UNREACHABLE_RETURN(~0);
428
- }
429
- }
430
-
431
- static inline unsigned int
432
- nlz_long_long(unsigned long long x)
433
- {
434
- if (sizeof(unsigned long long) * CHAR_BIT == 64) {
435
- return nlz_int64((uint64_t)x);
436
- }
437
- #ifdef HAVE_UINT128_T
438
- else if (sizeof(unsigned long long) * CHAR_BIT == 128) {
439
- return nlz_int128((uint128_t)x);
440
- }
441
- #endif
442
- else {
443
- UNREACHABLE_RETURN(~0);
444
- }
445
- }
446
-
447
- static inline unsigned int
448
- nlz_intptr(uintptr_t x)
449
- {
450
- if (sizeof(uintptr_t) == sizeof(unsigned int)) {
451
- return nlz_int((unsigned int)x);
452
- }
453
- if (sizeof(uintptr_t) == sizeof(unsigned long)) {
454
- return nlz_long((unsigned long)x);
455
- }
456
- if (sizeof(uintptr_t) == sizeof(unsigned long long)) {
457
- return nlz_long_long((unsigned long long)x);
458
- }
459
- else {
460
- UNREACHABLE_RETURN(~0);
461
- }
462
- }
463
-
464
- static inline unsigned int
465
- rb_popcount32(uint32_t x)
466
- {
467
- #if defined(_MSC_VER) && defined(__AVX__)
468
- /* Note: CPUs since Nehalem and Barcelona have had this instruction so SSE
469
- * 4.2 should suffice, but it seems there is no such thing like __SSE_4_2__
470
- * predefined macro in MSVC. They do have __AVX__ so use it instead. */
471
- return (unsigned int)__popcnt(x);
472
-
473
- #elif __has_builtin(__builtin_popcount)
474
- STATIC_ASSERT(sizeof_int, sizeof(int) * CHAR_BIT >= 32);
475
- return (unsigned int)__builtin_popcount(x);
476
-
477
- #else
478
- x = (x & 0x55555555) + (x >> 1 & 0x55555555);
479
- x = (x & 0x33333333) + (x >> 2 & 0x33333333);
480
- x = (x & 0x07070707) + (x >> 4 & 0x07070707);
481
- x = (x & 0x000f000f) + (x >> 8 & 0x000f000f);
482
- x = (x & 0x0000001f) + (x >>16 & 0x0000001f);
483
- return (unsigned int)x;
484
-
485
- #endif
486
- }
487
-
488
- static inline unsigned int
489
- rb_popcount64(uint64_t x)
490
- {
491
- #if defined(_MSC_VER) && defined(__AVX__)
492
- return (unsigned int)__popcnt64(x);
493
-
494
- #elif __has_builtin(__builtin_popcount)
495
- if (sizeof(long) * CHAR_BIT == 64) {
496
- return (unsigned int)__builtin_popcountl((unsigned long)x);
497
- }
498
- else if (sizeof(long long) * CHAR_BIT == 64) {
499
- return (unsigned int)__builtin_popcountll((unsigned long long)x);
500
- }
501
- else {
502
- /* :FIXME: Is there a way to make this branch a compile-time error? */
503
- UNREACHABLE_RETURN(~0);
504
- }
505
-
506
- #else
507
- x = (x & 0x5555555555555555) + (x >> 1 & 0x5555555555555555);
508
- x = (x & 0x3333333333333333) + (x >> 2 & 0x3333333333333333);
509
- x = (x & 0x0707070707070707) + (x >> 4 & 0x0707070707070707);
510
- x = (x & 0x000f000f000f000f) + (x >> 8 & 0x000f000f000f000f);
511
- x = (x & 0x0000001f0000001f) + (x >>16 & 0x0000001f0000001f);
512
- x = (x & 0x000000000000003f) + (x >>32 & 0x000000000000003f);
513
- return (unsigned int)x;
514
-
515
- #endif
516
- }
517
-
518
- static inline unsigned int
519
- rb_popcount_intptr(uintptr_t x)
520
- {
521
- if (sizeof(uintptr_t) * CHAR_BIT == 64) {
522
- return rb_popcount64((uint64_t)x);
523
- }
524
- else if (sizeof(uintptr_t) * CHAR_BIT == 32) {
525
- return rb_popcount32((uint32_t)x);
526
- }
527
- else {
528
- UNREACHABLE_RETURN(~0);
529
- }
530
- }
531
-
532
- static inline int
533
- ntz_int32(uint32_t x)
534
- {
535
- #if defined(__x86_64__) && defined(__BMI__)
536
- return (unsigned)_tzcnt_u32(x);
537
-
538
- #elif defined(_MSC_VER)
539
- /* :FIXME: Is there any way to issue TZCNT instead of BSF, apart from using
540
- * assembly? Because issuing LZCNT seems possible (see nlz.h). */
541
- unsigned long r;
542
- return _BitScanForward(&r, x) ? (int)r : 32;
543
-
544
- #elif __has_builtin(__builtin_ctz)
545
- STATIC_ASSERT(sizeof_int, sizeof(int) * CHAR_BIT == 32);
546
- return x ? (unsigned)__builtin_ctz(x) : 32;
547
-
548
- #else
549
- return rb_popcount32((~x) & (x-1));
550
-
551
- #endif
552
- }
553
-
554
- static inline int
555
- ntz_int64(uint64_t x)
556
- {
557
- #if defined(__x86_64__) && defined(__BMI__)
558
- return (unsigned)_tzcnt_u64(x);
559
-
560
- #elif defined(_WIN64) && defined(_MSC_VER)
561
- unsigned long r;
562
- return _BitScanForward64(&r, x) ? (int)r : 64;
563
-
564
- #elif __has_builtin(__builtin_ctzl)
565
- if (x == 0) {
566
- return 64;
567
- }
568
- else if (sizeof(long) * CHAR_BIT == 64) {
569
- return (unsigned)__builtin_ctzl((unsigned long)x);
570
- }
571
- else if (sizeof(long long) * CHAR_BIT == 64) {
572
- return (unsigned)__builtin_ctzll((unsigned long long)x);
573
- }
574
- else {
575
- /* :FIXME: Is there a way to make this branch a compile-time error? */
576
- UNREACHABLE_RETURN(~0);
577
- }
578
-
579
- #else
580
- return rb_popcount64((~x) & (x-1));
581
-
582
- #endif
583
- }
584
-
585
- static inline int
586
- ntz_intptr(uintptr_t x)
587
- {
588
- if (sizeof(uintptr_t) * CHAR_BIT == 64) {
589
- return ntz_int64((uint64_t)x);
590
- }
591
- else if (sizeof(uintptr_t) * CHAR_BIT == 32) {
592
- return ntz_int32((uint32_t)x);
593
- }
594
- else {
595
- UNREACHABLE_RETURN(~0);
596
- }
597
- }
598
-
599
- static inline VALUE
600
- RUBY_BIT_ROTL(VALUE v, int n)
601
- {
602
- #if __has_builtin(__builtin_rotateleft32) && (SIZEOF_VALUE * CHAR_BIT == 32)
603
- return __builtin_rotateleft32(v, n);
604
-
605
- #elif __has_builtin(__builtin_rotateleft64) && (SIZEOF_VALUE * CHAR_BIT == 64)
606
- return __builtin_rotateleft64(v, n);
607
-
608
- #elif defined(_MSC_VER) && (SIZEOF_VALUE * CHAR_BIT == 32)
609
- return _rotl(v, n);
610
-
611
- #elif defined(_MSC_VER) && (SIZEOF_VALUE * CHAR_BIT == 64)
612
- return _rotl64(v, n);
613
-
614
- #elif defined(_lrotl) && (SIZEOF_VALUE == SIZEOF_LONG)
615
- return _lrotl(v, n);
616
-
617
- #else
618
- const int m = (sizeof(VALUE) * CHAR_BIT) - 1;
619
- return (v << (n & m)) | (v >> (-n & m));
620
- #endif
621
- }
622
-
623
- static inline VALUE
624
- RUBY_BIT_ROTR(VALUE v, int n)
625
- {
626
- #if __has_builtin(__builtin_rotateright32) && (SIZEOF_VALUE * CHAR_BIT == 32)
627
- return __builtin_rotateright32(v, n);
628
-
629
- #elif __has_builtin(__builtin_rotateright64) && (SIZEOF_VALUE * CHAR_BIT == 64)
630
- return __builtin_rotateright64(v, n);
631
-
632
- #elif defined(_MSC_VER) && (SIZEOF_VALUE * CHAR_BIT == 32)
633
- return _rotr(v, n);
634
-
635
- #elif defined(_MSC_VER) && (SIZEOF_VALUE * CHAR_BIT == 64)
636
- return _rotr64(v, n);
637
-
638
- #elif defined(_lrotr) && (SIZEOF_VALUE == SIZEOF_LONG)
639
- return _lrotr(v, n);
640
-
641
- #else
642
- const int m = (sizeof(VALUE) * CHAR_BIT) - 1;
643
- return (v << (-n & m)) | (v >> (n & m));
644
- #endif
645
- }
646
-
647
- #endif /* INTERNAL_BITS_H */
@@ -1,64 +0,0 @@
1
- #ifndef INTERNAL_CMDLINEOPT_H /*-*-C-*-vi:se ft=c:*/
2
- #define INTERNAL_CMDLINEOPT_H
3
-
4
- #include "yjit.h"
5
-
6
- typedef struct {
7
- unsigned int mask;
8
- unsigned int set;
9
- } ruby_features_t;
10
-
11
- typedef struct ruby_cmdline_options {
12
- const char *script;
13
- VALUE script_name;
14
- VALUE e_script;
15
- struct {
16
- struct {
17
- VALUE name;
18
- int index;
19
- } enc;
20
- } src, ext, intern;
21
- VALUE req_list;
22
- ruby_features_t features;
23
- ruby_features_t warn;
24
- unsigned int dump;
25
- long backtrace_length_limit;
26
-
27
- const char *crash_report;
28
-
29
- signed int sflag: 2;
30
- unsigned int xflag: 1;
31
- unsigned int warning: 1;
32
- unsigned int verbose: 1;
33
- unsigned int do_loop: 1;
34
- unsigned int do_print: 1;
35
- unsigned int do_line: 1;
36
- unsigned int do_split: 1;
37
- unsigned int do_search: 1;
38
- unsigned int setids: 2;
39
- #if USE_YJIT
40
- unsigned int yjit: 1;
41
- #endif
42
- #if USE_ZJIT
43
- unsigned int zjit: 1;
44
- #endif
45
- } ruby_cmdline_options_t;
46
-
47
- struct ruby_opt_message {
48
- const char *str;
49
- unsigned short namelen, secondlen;
50
- };
51
-
52
- #define RUBY_OPT_MESSAGE(shortopt, longopt, desc) { \
53
- shortopt " " longopt " " desc, \
54
- (unsigned short)sizeof(shortopt), \
55
- (unsigned short)sizeof(longopt), \
56
- }
57
-
58
- #define opt_match(s, l, name) \
59
- ((((l) > rb_strlen_lit(name)) ? (s)[rb_strlen_lit(name)] == '=' : \
60
- (l) == rb_strlen_lit(name)) && \
61
- memcmp((s), name, rb_strlen_lit(name)) == 0 && \
62
- (((s) += rb_strlen_lit(name)), 1))
63
-
64
- #endif