datadog-ruby_core_source 3.4.3 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. checksums.yaml +4 -4
  2. data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/extension.h +1 -1
  3. data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/options.h +4 -1
  4. data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/version.h +2 -2
  5. data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/vm_core.h +9 -0
  6. data/lib/datadog/ruby_core_source/version.rb +1 -1
  7. metadata +108 -211
  8. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/id.h +0 -352
  9. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/id_table.h +0 -39
  10. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/array.h +0 -152
  11. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/basic_operators.h +0 -65
  12. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/bignum.h +0 -244
  13. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/bits.h +0 -650
  14. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/class.h +0 -283
  15. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/cmdlineopt.h +0 -61
  16. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/cont.h +0 -35
  17. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/encoding.h +0 -38
  18. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/error.h +0 -244
  19. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/eval.h +0 -33
  20. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/gc.h +0 -333
  21. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/hash.h +0 -193
  22. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/imemo.h +0 -257
  23. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/inits.h +0 -47
  24. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/io.h +0 -143
  25. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/load.h +0 -18
  26. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/numeric.h +0 -274
  27. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/object.h +0 -63
  28. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/re.h +0 -28
  29. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/sanitizers.h +0 -330
  30. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/signal.h +0 -24
  31. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/st.h +0 -11
  32. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/string.h +0 -199
  33. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/struct.h +0 -119
  34. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/symbol.h +0 -47
  35. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/thread.h +0 -108
  36. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/time.h +0 -37
  37. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/variable.h +0 -70
  38. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal/vm.h +0 -137
  39. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/internal.h +0 -108
  40. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/iseq.h +0 -351
  41. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/method.h +0 -258
  42. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/ast.h +0 -7964
  43. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/diagnostic.h +0 -451
  44. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/options.h +0 -442
  45. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/parser.h +0 -933
  46. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/prism.h +0 -383
  47. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/regexp.h +0 -43
  48. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/util/pm_buffer.h +0 -228
  49. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/util/pm_integer.h +0 -126
  50. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/util/pm_list.h +0 -97
  51. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/util/pm_string.h +0 -190
  52. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism/version.h +0 -29
  53. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/prism_compile.h +0 -105
  54. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/ractor_core.h +0 -382
  55. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/ruby_atomic.h +0 -23
  56. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/rubyparser.h +0 -1380
  57. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/shape.h +0 -234
  58. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/thread_pthread.h +0 -167
  59. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/vm_core.h +0 -2235
  60. data/lib/datadog/ruby_core_source/ruby-3.5.0-preview1/vm_debug.h +0 -124
  61. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/ccan/build_assert/build_assert.h +0 -40
  62. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/ccan/check_type/check_type.h +0 -63
  63. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/ccan/container_of/container_of.h +0 -142
  64. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/ccan/list/list.h +0 -791
  65. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/ccan/str/str.h +0 -17
  66. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/compar.h +0 -29
  67. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/compile.h +0 -34
  68. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/compilers.h +0 -107
  69. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/complex.h +0 -29
  70. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/dir.h +0 -16
  71. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/enc.h +0 -19
  72. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/enum.h +0 -18
  73. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/enumerator.h +0 -21
  74. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/file.h +0 -38
  75. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/fixnum.h +0 -185
  76. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/loadpath.h +0 -16
  77. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/math.h +0 -23
  78. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/missing.h +0 -19
  79. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/parse.h +0 -131
  80. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/proc.h +0 -30
  81. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/process.h +0 -124
  82. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/ractor.h +0 -10
  83. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/random.h +0 -17
  84. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/range.h +0 -40
  85. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/rational.h +0 -71
  86. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/ruby_parser.h +0 -102
  87. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/serial.h +0 -23
  88. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/static_assert.h +0 -16
  89. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/transcode.h +0 -23
  90. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/util.h +0 -27
  91. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/internal/warnings.h +0 -16
  92. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/node.h +0 -122
  93. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/parser_st.h +0 -162
  94. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/parser_value.h +0 -106
  95. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/defines.h +0 -260
  96. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/encoding.h +0 -283
  97. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/extension.h +0 -19
  98. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/node.h +0 -129
  99. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/pack.h +0 -163
  100. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/prettyprint.h +0 -34
  101. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/static_literals.h +0 -121
  102. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/util/pm_char.h +0 -204
  103. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/util/pm_constant_pool.h +0 -218
  104. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/util/pm_memchr.h +0 -29
  105. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/util/pm_newline_list.h +0 -113
  106. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/util/pm_strncasecmp.h +0 -32
  107. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/prism/util/pm_strpbrk.h +0 -46
  108. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/ruby_assert.h +0 -14
  109. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/thread_none.h +0 -21
  110. data/lib/datadog/ruby_core_source/ruby-4.0.0-preview3/vm_opts.h +0 -67
  111. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/ccan/build_assert/build_assert.h +0 -0
  112. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/ccan/check_type/check_type.h +0 -0
  113. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/ccan/container_of/container_of.h +0 -0
  114. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/ccan/list/list.h +0 -0
  115. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/ccan/str/str.h +0 -0
  116. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/id.h +0 -0
  117. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/id_table.h +0 -0
  118. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/array.h +0 -0
  119. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/basic_operators.h +0 -0
  120. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/bignum.h +0 -0
  121. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/bits.h +0 -0
  122. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/box.h +0 -0
  123. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/class.h +0 -0
  124. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/cmdlineopt.h +0 -0
  125. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/compar.h +0 -0
  126. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/compile.h +0 -0
  127. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/compilers.h +0 -0
  128. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/complex.h +0 -0
  129. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/concurrent_set.h +0 -0
  130. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/cont.h +0 -0
  131. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/dir.h +0 -0
  132. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/enc.h +0 -0
  133. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/encoding.h +0 -0
  134. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/enum.h +0 -0
  135. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/enumerator.h +0 -0
  136. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/error.h +0 -0
  137. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/eval.h +0 -0
  138. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/file.h +0 -0
  139. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/fixnum.h +0 -0
  140. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/gc.h +0 -0
  141. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/hash.h +0 -0
  142. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/imemo.h +0 -0
  143. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/inits.h +0 -0
  144. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/io.h +0 -0
  145. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/load.h +0 -0
  146. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/loadpath.h +0 -0
  147. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/math.h +0 -0
  148. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/missing.h +0 -0
  149. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/numeric.h +0 -0
  150. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/object.h +0 -0
  151. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/parse.h +0 -0
  152. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/proc.h +0 -0
  153. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/process.h +0 -0
  154. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/ractor.h +0 -0
  155. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/random.h +0 -0
  156. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/range.h +0 -0
  157. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/rational.h +0 -0
  158. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/re.h +0 -0
  159. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/ruby_parser.h +0 -0
  160. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/sanitizers.h +0 -0
  161. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/serial.h +0 -0
  162. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/set_table.h +0 -0
  163. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/signal.h +0 -0
  164. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/st.h +0 -0
  165. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/static_assert.h +0 -0
  166. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/string.h +0 -0
  167. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/struct.h +0 -0
  168. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/symbol.h +0 -0
  169. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/thread.h +0 -0
  170. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/time.h +0 -0
  171. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/transcode.h +0 -0
  172. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/util.h +0 -0
  173. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/variable.h +0 -0
  174. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal/vm.h +0 -0
  175. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/internal/warnings.h +0 -0
  176. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/internal.h +0 -0
  177. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/iseq.h +0 -0
  178. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/method.h +0 -0
  179. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/node.h +0 -0
  180. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/parser_st.h +0 -0
  181. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/parser_value.h +0 -0
  182. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/ast.h +0 -0
  183. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/defines.h +0 -0
  184. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/diagnostic.h +0 -0
  185. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/encoding.h +0 -0
  186. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/node.h +0 -0
  187. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/pack.h +0 -0
  188. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/parser.h +0 -0
  189. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/prettyprint.h +0 -0
  190. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/prism.h +0 -0
  191. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/regexp.h +0 -0
  192. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/static_literals.h +0 -0
  193. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/util/pm_buffer.h +0 -0
  194. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_char.h +0 -0
  195. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_constant_pool.h +0 -0
  196. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/util/pm_integer.h +0 -0
  197. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/util/pm_list.h +0 -0
  198. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_memchr.h +0 -0
  199. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_newline_list.h +0 -0
  200. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism/util/pm_string.h +0 -0
  201. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_strncasecmp.h +0 -0
  202. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/prism/util/pm_strpbrk.h +0 -0
  203. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/prism_compile.h +0 -0
  204. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/ractor_core.h +0 -0
  205. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/ruby_assert.h +0 -0
  206. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/ruby_atomic.h +0 -0
  207. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/rubyparser.h +0 -0
  208. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/shape.h +0 -0
  209. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/thread_none.h +0 -0
  210. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/thread_pthread.h +0 -0
  211. /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview3 → ruby-4.0.0-p0}/vm_debug.h +0 -0
  212. /data/lib/datadog/ruby_core_source/{ruby-3.5.0-preview1 → ruby-4.0.0-p0}/vm_opts.h +0 -0
@@ -1,122 +0,0 @@
1
- #ifndef RUBY_NODE_H
2
- #define RUBY_NODE_H 1
3
- /**********************************************************************
4
-
5
- node.h -
6
-
7
- $Author$
8
- created at: Fri May 28 15:14:02 JST 1993
9
-
10
- Copyright (C) 1993-2007 Yukihiro Matsumoto
11
-
12
- **********************************************************************/
13
-
14
- #include <stdbool.h>
15
- #include "rubyparser.h"
16
- #include "ruby/backward/2/attributes.h"
17
-
18
- typedef void (*bug_report_func)(const char *fmt, ...) RUBYPARSER_ATTRIBUTE_FORMAT(1, 2);
19
- typedef struct node_buffer_elem_struct {
20
- struct node_buffer_elem_struct *next;
21
- long len; /* Length of nodes */
22
- size_t allocated; /* Total memory size of allocated buf */
23
- size_t used; /* Current usage of buf */
24
- NODE **nodes; /* Array of node pointers */
25
- NODE *buf[FLEX_ARY_LEN];
26
- } node_buffer_elem_t;
27
-
28
- typedef struct {
29
- node_buffer_elem_t *head;
30
- node_buffer_elem_t *last;
31
- } node_buffer_list_t;
32
-
33
- struct node_buffer_struct {
34
- node_buffer_list_t buffer_list;
35
- struct rb_ast_local_table_link *local_tables;
36
- // - id (sequence number)
37
- // - token_type
38
- // - text of token
39
- // - location info
40
- // Array, whose entry is array
41
- rb_parser_ary_t *tokens;
42
- };
43
-
44
- RUBY_SYMBOL_EXPORT_BEGIN
45
-
46
- #ifdef UNIVERSAL_PARSER
47
- rb_ast_t *rb_ast_new(const rb_parser_config_t *config);
48
- #else
49
- rb_ast_t *rb_ast_new(void);
50
- #endif
51
- size_t rb_ast_memsize(const rb_ast_t*);
52
- void rb_ast_dispose(rb_ast_t*);
53
- const char *ruby_node_name(int node);
54
- void rb_node_init(NODE *n, enum node_type type);
55
-
56
- void rb_ast_update_references(rb_ast_t*);
57
- void rb_ast_free(rb_ast_t*);
58
- NODE *rb_ast_newnode(rb_ast_t*, enum node_type type, size_t size, size_t alignment);
59
- void rb_ast_delete_node(rb_ast_t*, NODE *n);
60
- rb_ast_id_table_t *rb_ast_new_local_table(rb_ast_t*, int);
61
- rb_ast_id_table_t *rb_ast_resize_latest_local_table(rb_ast_t*, int);
62
-
63
- VALUE rb_parser_dump_tree(const NODE *node, int comment);
64
-
65
- const struct kwtable *rb_reserved_word(const char *, unsigned int);
66
-
67
- struct parser_params;
68
- PRINTF_ARGS(void rb_parser_printf(struct parser_params *parser, const char *fmt, ...), 2, 3);
69
- VALUE rb_node_set_type(NODE *n, enum node_type t);
70
- enum node_type rb_node_get_type(const NODE *n);
71
-
72
- RUBY_SYMBOL_EXPORT_END
73
-
74
- #define NODE_LSHIFT (NODE_TYPESHIFT+7)
75
- #define NODE_LMASK (((SIGNED_VALUE)1<<(sizeof(VALUE)*CHAR_BIT-NODE_LSHIFT))-1)
76
-
77
- static inline int
78
- nd_line(const NODE *n)
79
- {
80
- if (!n) return -1;
81
- SIGNED_VALUE flags = (SIGNED_VALUE)n->flags;
82
- return (int)(flags >> NODE_LSHIFT);
83
- }
84
-
85
- static inline void
86
- nd_set_line(NODE *n, SIGNED_VALUE l)
87
- {
88
- n->flags &= ~(~(VALUE)0 << NODE_LSHIFT);
89
- n->flags |= ((VALUE)(l & NODE_LMASK) << NODE_LSHIFT);
90
- }
91
-
92
- #define NODE_SPECIAL_REQUIRED_KEYWORD ((NODE *)-1)
93
- #define NODE_REQUIRED_KEYWORD_P(node) ((node) == NODE_SPECIAL_REQUIRED_KEYWORD)
94
- #define NODE_SPECIAL_NO_NAME_REST ((NODE *)-1)
95
- #define NODE_NAMED_REST_P(node) ((node) != NODE_SPECIAL_NO_NAME_REST)
96
- #define NODE_SPECIAL_EXCESSIVE_COMMA ((ID)1)
97
- #define NODE_SPECIAL_NO_REST_KEYWORD ((NODE *)-1)
98
-
99
- #define nd_code_loc(n) (&RNODE(n)->nd_loc)
100
- #define nd_first_column(n) ((int)(RNODE(n)->nd_loc.beg_pos.column))
101
- #define nd_set_first_column(n, v) (RNODE(n)->nd_loc.beg_pos.column = (v))
102
- #define nd_first_lineno(n) ((int)(RNODE(n)->nd_loc.beg_pos.lineno))
103
- #define nd_set_first_lineno(n, v) (RNODE(n)->nd_loc.beg_pos.lineno = (v))
104
- #define nd_first_loc(n) (RNODE(n)->nd_loc.beg_pos)
105
- #define nd_set_first_loc(n, v) (nd_first_loc(n) = (v))
106
-
107
- #define nd_last_column(n) ((int)(RNODE(n)->nd_loc.end_pos.column))
108
- #define nd_set_last_column(n, v) (RNODE(n)->nd_loc.end_pos.column = (v))
109
- #define nd_last_lineno(n) ((int)(RNODE(n)->nd_loc.end_pos.lineno))
110
- #define nd_set_last_lineno(n, v) (RNODE(n)->nd_loc.end_pos.lineno = (v))
111
- #define nd_last_loc(n) (RNODE(n)->nd_loc.end_pos)
112
- #define nd_set_last_loc(n, v) (nd_last_loc(n) = (v))
113
- #define nd_node_id(n) (RNODE(n)->node_id)
114
- #define nd_set_node_id(n,id) (RNODE(n)->node_id = (id))
115
-
116
- static inline bool
117
- nd_type_p(const NODE *n, enum node_type t)
118
- {
119
- return (enum node_type)nd_type(n) == t;
120
- }
121
-
122
- #endif /* RUBY_NODE_H */
@@ -1,162 +0,0 @@
1
- /* This is a public domain general purpose hash table package
2
- originally written by Peter Moore @ UCB.
3
-
4
- The hash table data structures were redesigned and the package was
5
- rewritten by Vladimir Makarov <vmakarov@redhat.com>. */
6
-
7
- #ifndef RUBY_ST2_H
8
- #define RUBY_ST2_H 1
9
-
10
- #if defined(__cplusplus)
11
- extern "C" {
12
- #if 0
13
- } /* satisfy cc-mode */
14
- #endif
15
- #endif
16
-
17
- #include <stddef.h>
18
- #include <stdint.h>
19
- #include "ruby/config.h"
20
- #include "ruby/backward/2/long_long.h"
21
- #include "ruby/defines.h"
22
-
23
- RUBY_SYMBOL_EXPORT_BEGIN
24
-
25
- #if SIZEOF_LONG == SIZEOF_VOIDP
26
- typedef unsigned long parser_st_data_t;
27
- #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
28
- typedef unsigned LONG_LONG parser_st_data_t;
29
- #else
30
- # error ---->> parser_st.c requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<----
31
- #endif
32
- #define ST2_DATA_T_DEFINED
33
-
34
- #ifndef CHAR_BIT
35
- # ifdef HAVE_LIMITS_H
36
- # include <limits.h>
37
- # else
38
- # define CHAR_BIT 8
39
- # endif
40
- #endif
41
- #ifndef _
42
- # define _(args) args
43
- #endif
44
- #ifndef ANYARGS
45
- # ifdef __cplusplus
46
- # define ANYARGS ...
47
- # else
48
- # define ANYARGS
49
- # endif
50
- #endif
51
-
52
- typedef struct parser_st_table parser_st_table;
53
-
54
- typedef parser_st_data_t parser_st_index_t;
55
-
56
- /* Maximal value of unsigned integer type parser_st_index_t. */
57
- #define MAX_ST2_INDEX_VAL (~(parser_st_index_t) 0)
58
-
59
- typedef int parser_st_compare_func(parser_st_data_t, parser_st_data_t);
60
- typedef parser_st_index_t parser_st_hash_func(parser_st_data_t);
61
-
62
- typedef char st_check_for_sizeof_parser_st_index_t[SIZEOF_VOIDP == (int)sizeof(parser_st_index_t) ? 1 : -1];
63
- #define SIZEOF_ST_INDEX_T SIZEOF_VOIDP
64
-
65
- struct parser_st_hash_type {
66
- int (*compare)(parser_st_data_t, parser_st_data_t); /* parser_st_compare_func* */
67
- parser_st_index_t (*hash)(parser_st_data_t); /* parser_st_hash_func* */
68
- };
69
-
70
- #define ST_INDEX_BITS (SIZEOF_ST_INDEX_T * CHAR_BIT)
71
-
72
- #if defined(HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR) && defined(HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P)
73
- # define ST2_DATA_COMPATIBLE_P(type) \
74
- __builtin_choose_expr(__builtin_types_compatible_p(type, parser_st_data_t), 1, 0)
75
- #else
76
- # define ST2_DATA_COMPATIBLE_P(type) 0
77
- #endif
78
-
79
- typedef struct parser_st_table_entry parser_st_table_entry;
80
-
81
- struct parser_st_table_entry; /* defined in parser_st.c */
82
-
83
- struct parser_st_table {
84
- /* Cached features of the table -- see st.c for more details. */
85
- unsigned char entry_power, bin_power, size_ind;
86
- /* How many times the table was rebuilt. */
87
- unsigned int rebuilds_num;
88
- const struct parser_st_hash_type *type;
89
- /* Number of entries currently in the table. */
90
- parser_st_index_t num_entries;
91
- /* Array of bins used for access by keys. */
92
- parser_st_index_t *bins;
93
- /* Start and bound index of entries in array entries.
94
- entries_starts and entries_bound are in interval
95
- [0,allocated_entries]. */
96
- parser_st_index_t entries_start, entries_bound;
97
- /* Array of size 2^entry_power. */
98
- parser_st_table_entry *entries;
99
- };
100
-
101
- #define parser_st_is_member(table,key) rb_parser_st_lookup((table),(key),(parser_st_data_t *)0)
102
-
103
- enum parser_st_retval {ST2_CONTINUE, ST2_STOP, ST2_DELETE, ST2_CHECK, ST2_REPLACE};
104
-
105
- size_t rb_parser_st_table_size(const struct parser_st_table *tbl);
106
- parser_st_table *rb_parser_st_init_table(const struct parser_st_hash_type *);
107
- parser_st_table *rb_parser_st_init_table_with_size(const struct parser_st_hash_type *, parser_st_index_t);
108
- parser_st_table *rb_parser_st_init_existing_table_with_size(parser_st_table *, const struct parser_st_hash_type *, parser_st_index_t);
109
- parser_st_table *rb_parser_st_init_numtable(void);
110
- parser_st_table *rb_parser_st_init_numtable_with_size(parser_st_index_t);
111
- parser_st_table *rb_parser_st_init_strtable(void);
112
- parser_st_table *rb_parser_st_init_strtable_with_size(parser_st_index_t);
113
- parser_st_table *rb_parser_st_init_strcasetable(void);
114
- parser_st_table *rb_parser_st_init_strcasetable_with_size(parser_st_index_t);
115
- int rb_parser_st_delete(parser_st_table *, parser_st_data_t *, parser_st_data_t *); /* returns 0:notfound 1:deleted */
116
- int rb_parser_st_delete_safe(parser_st_table *, parser_st_data_t *, parser_st_data_t *, parser_st_data_t);
117
- int rb_parser_st_shift(parser_st_table *, parser_st_data_t *, parser_st_data_t *); /* returns 0:notfound 1:deleted */
118
- int rb_parser_st_insert(parser_st_table *, parser_st_data_t, parser_st_data_t);
119
- int rb_parser_st_insert2(parser_st_table *, parser_st_data_t, parser_st_data_t, parser_st_data_t (*)(parser_st_data_t));
120
- int rb_parser_st_lookup(parser_st_table *, parser_st_data_t, parser_st_data_t *);
121
- int rb_parser_st_get_key(parser_st_table *, parser_st_data_t, parser_st_data_t *);
122
- typedef int parser_st_update_callback_func(parser_st_data_t *key, parser_st_data_t *value, parser_st_data_t arg, int existing);
123
- /* *key may be altered, but must equal to the old key, i.e., the
124
- * results of hash() are same and compare() returns 0, otherwise the
125
- * behavior is undefined */
126
- int rb_parser_st_update(parser_st_table *table, parser_st_data_t key, parser_st_update_callback_func *func, parser_st_data_t arg);
127
- typedef int parser_st_foreach_callback_func(parser_st_data_t, parser_st_data_t, parser_st_data_t);
128
- typedef int parser_st_foreach_check_callback_func(parser_st_data_t, parser_st_data_t, parser_st_data_t, int);
129
- int rb_parser_st_foreach_with_replace(parser_st_table *tab, parser_st_foreach_check_callback_func *func, parser_st_update_callback_func *replace, parser_st_data_t arg);
130
- int rb_parser_st_foreach(parser_st_table *, parser_st_foreach_callback_func *, parser_st_data_t);
131
- int rb_parser_st_foreach_check(parser_st_table *, parser_st_foreach_check_callback_func *, parser_st_data_t, parser_st_data_t);
132
- parser_st_index_t rb_parser_st_keys(parser_st_table *table, parser_st_data_t *keys, parser_st_index_t size);
133
- parser_st_index_t rb_parser_st_keys_check(parser_st_table *table, parser_st_data_t *keys, parser_st_index_t size, parser_st_data_t never);
134
- parser_st_index_t rb_parser_st_values(parser_st_table *table, parser_st_data_t *values, parser_st_index_t size);
135
- parser_st_index_t rb_parser_st_values_check(parser_st_table *table, parser_st_data_t *values, parser_st_index_t size, parser_st_data_t never);
136
- void rb_parser_st_add_direct(parser_st_table *, parser_st_data_t, parser_st_data_t);
137
- void rb_parser_st_free_table(parser_st_table *);
138
- void rb_parser_st_cleanup_safe(parser_st_table *, parser_st_data_t);
139
- void rb_parser_st_clear(parser_st_table *);
140
- parser_st_table *rb_parser_st_replace(parser_st_table *, parser_st_table *);
141
- parser_st_table *rb_parser_st_copy(parser_st_table *);
142
- CONSTFUNC(int rb_parser_st_numcmp(parser_st_data_t, parser_st_data_t));
143
- CONSTFUNC(parser_st_index_t rb_parser_st_numhash(parser_st_data_t));
144
- PUREFUNC(int rb_parser_st_locale_insensitive_strcasecmp(const char *s1, const char *s2));
145
- PUREFUNC(int rb_parser_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n));
146
- PUREFUNC(size_t rb_parser_st_memsize(const parser_st_table *));
147
- PUREFUNC(parser_st_index_t rb_parser_st_hash(const void *ptr, size_t len, parser_st_index_t h));
148
- CONSTFUNC(parser_st_index_t rb_parser_st_hash_uint32(parser_st_index_t h, uint32_t i));
149
- CONSTFUNC(parser_st_index_t rb_parser_st_hash_uint(parser_st_index_t h, parser_st_index_t i));
150
- CONSTFUNC(parser_st_index_t rb_parser_st_hash_end(parser_st_index_t h));
151
- CONSTFUNC(parser_st_index_t rb_parser_st_hash_start(parser_st_index_t h));
152
-
153
- RUBY_SYMBOL_EXPORT_END
154
-
155
- #if defined(__cplusplus)
156
- #if 0
157
- { /* satisfy cc-mode */
158
- #endif
159
- } /* extern "C" { */
160
- #endif
161
-
162
- #endif /* RUBY_ST2_H */
@@ -1,106 +0,0 @@
1
- #ifndef EXTERNAL_VALUE_H
2
- #define EXTERNAL_VALUE_H
3
-
4
- #include "ruby/config.h"
5
-
6
- #if defined(__DOXYGEN__)
7
-
8
- /**
9
- * Type that represents a Ruby object. It is an unsigned integer of some kind,
10
- * depending on platforms.
11
- *
12
- * ```CXX
13
- * VALUE value = rb_eval_string("ARGF.readlines.map.with_index");
14
- * ```
15
- *
16
- * @warning ::VALUE is not a pointer.
17
- * @warning ::VALUE can be wider than `long`.
18
- */
19
- typedef uintptr_t VALUE;
20
-
21
- /**
22
- * Type that represents a Ruby identifier such as a variable name.
23
- *
24
- * ```CXX
25
- * ID method = rb_intern("method");
26
- * VALUE result = rb_funcall(obj, method, 0);
27
- * ```
28
- *
29
- * @note ::rb_cSymbol is a Ruby-level data type for the same thing.
30
- */
31
- typedef uintptr_t ID;
32
-
33
- /**
34
- * A signed integer type that has the same width with ::VALUE.
35
- *
36
- * @internal
37
- *
38
- * @shyouhei wonders: is it guaranteed that `uintptr_t` and `intptr_t` are the
39
- * same width? As far as I read ISO/IEC 9899:2018 section 7.20.1.4 paragraph 1
40
- * no such description is given... or defined elsewhere?
41
- */
42
- typedef intptr_t SIGNED_VALUE;
43
-
44
- /**
45
- * Identical to `sizeof(VALUE)`, except it is a macro that can also be used
46
- * inside of preprocessor directives such as `#if`. Handy on occasions.
47
- */
48
- #define SIZEOF_VALUE SIZEOF_UINTPTR_T
49
-
50
- /**
51
- * @private
52
- *
53
- * A compile-time constant of type ::VALUE whose value is 0.
54
- */
55
- #define RBIMPL_VALUE_NULL UINTPTR_C(0)
56
-
57
- /**
58
- * @private
59
- *
60
- * A compile-time constant of type ::VALUE whose value is 1.
61
- */
62
- #define RBIMPL_VALUE_ONE UINTPTR_C(1)
63
-
64
- /**
65
- * @private
66
- *
67
- * Maximum possible value that a ::VALUE can take.
68
- */
69
- #define RBIMPL_VALUE_FULL UINTPTR_MAX
70
-
71
- #elif defined HAVE_UINTPTR_T && 0
72
- typedef uintptr_t VALUE;
73
- typedef uintptr_t ID;
74
- # define SIGNED_VALUE intptr_t
75
- # define SIZEOF_VALUE SIZEOF_UINTPTR_T
76
- # undef PRI_VALUE_PREFIX
77
- # define RBIMPL_VALUE_NULL UINTPTR_C(0)
78
- # define RBIMPL_VALUE_ONE UINTPTR_C(1)
79
- # define RBIMPL_VALUE_FULL UINTPTR_MAX
80
-
81
- #elif SIZEOF_LONG == SIZEOF_VOIDP
82
- typedef unsigned long VALUE;
83
- typedef unsigned long ID;
84
- # define SIGNED_VALUE long
85
- # define SIZEOF_VALUE SIZEOF_LONG
86
- # define PRI_VALUE_PREFIX "l"
87
- # define RBIMPL_VALUE_NULL 0UL
88
- # define RBIMPL_VALUE_ONE 1UL
89
- # define RBIMPL_VALUE_FULL ULONG_MAX
90
-
91
- #elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
92
- typedef unsigned LONG_LONG VALUE;
93
- typedef unsigned LONG_LONG ID;
94
- # define SIGNED_VALUE LONG_LONG
95
- # define LONG_LONG_VALUE 1
96
- # define SIZEOF_VALUE SIZEOF_LONG_LONG
97
- # define PRI_VALUE_PREFIX PRI_LL_PREFIX
98
- # define RBIMPL_VALUE_NULL 0ULL
99
- # define RBIMPL_VALUE_ONE 1ULL
100
- # define RBIMPL_VALUE_FULL ULLONG_MAX
101
-
102
- #else
103
- # error ---->> ruby requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<----
104
- #endif
105
-
106
- #endif /* EXTERNAL_VALUE_H */
@@ -1,260 +0,0 @@
1
- /**
2
- * @file defines.h
3
- *
4
- * Macro definitions used throughout the prism library.
5
- *
6
- * This file should be included first by any *.h or *.c in prism for consistency
7
- * and to ensure that the macros are defined before they are used.
8
- */
9
- #ifndef PRISM_DEFINES_H
10
- #define PRISM_DEFINES_H
11
-
12
- #include <ctype.h>
13
- #include <limits.h>
14
- #include <math.h>
15
- #include <stdarg.h>
16
- #include <stddef.h>
17
- #include <stdint.h>
18
- #include <stdio.h>
19
- #include <string.h>
20
-
21
- /**
22
- * We want to be able to use the PRI* macros for printing out integers, but on
23
- * some platforms they aren't included unless this is already defined.
24
- */
25
- #define __STDC_FORMAT_MACROS
26
- // Include sys/types.h before inttypes.h to work around issue with
27
- // certain versions of GCC and newlib which causes omission of PRIx64
28
- #include <sys/types.h>
29
- #include <inttypes.h>
30
-
31
- /**
32
- * When we are parsing using recursive descent, we want to protect against
33
- * malicious payloads that could attempt to crash our parser. We do this by
34
- * specifying a maximum depth to which we are allowed to recurse.
35
- */
36
- #ifndef PRISM_DEPTH_MAXIMUM
37
- #define PRISM_DEPTH_MAXIMUM 10000
38
- #endif
39
-
40
- /**
41
- * By default, we compile with -fvisibility=hidden. When this is enabled, we
42
- * need to mark certain functions as being publically-visible. This macro does
43
- * that in a compiler-agnostic way.
44
- */
45
- #ifndef PRISM_EXPORTED_FUNCTION
46
- # ifdef PRISM_EXPORT_SYMBOLS
47
- # ifdef _WIN32
48
- # define PRISM_EXPORTED_FUNCTION __declspec(dllexport) extern
49
- # else
50
- # define PRISM_EXPORTED_FUNCTION __attribute__((__visibility__("default"))) extern
51
- # endif
52
- # else
53
- # define PRISM_EXPORTED_FUNCTION
54
- # endif
55
- #endif
56
-
57
- /**
58
- * Certain compilers support specifying that a function accepts variadic
59
- * parameters that look like printf format strings to provide a better developer
60
- * experience when someone is using the function. This macro does that in a
61
- * compiler-agnostic way.
62
- */
63
- #if defined(__GNUC__)
64
- # if defined(__MINGW_PRINTF_FORMAT)
65
- # define PRISM_ATTRIBUTE_FORMAT(string_index, argument_index) __attribute__((format(__MINGW_PRINTF_FORMAT, string_index, argument_index)))
66
- # else
67
- # define PRISM_ATTRIBUTE_FORMAT(string_index, argument_index) __attribute__((format(printf, string_index, argument_index)))
68
- # endif
69
- #elif defined(__clang__)
70
- # define PRISM_ATTRIBUTE_FORMAT(string_index, argument_index) __attribute__((__format__(__printf__, string_index, argument_index)))
71
- #else
72
- # define PRISM_ATTRIBUTE_FORMAT(string_index, argument_index)
73
- #endif
74
-
75
- /**
76
- * GCC will warn if you specify a function or parameter that is unused at
77
- * runtime. This macro allows you to mark a function or parameter as unused in a
78
- * compiler-agnostic way.
79
- */
80
- #if defined(__GNUC__)
81
- # define PRISM_ATTRIBUTE_UNUSED __attribute__((unused))
82
- #else
83
- # define PRISM_ATTRIBUTE_UNUSED
84
- #endif
85
-
86
- /**
87
- * Old Visual Studio versions do not support the inline keyword, so we need to
88
- * define it to be __inline.
89
- */
90
- #if defined(_MSC_VER) && !defined(inline)
91
- # define inline __inline
92
- #endif
93
-
94
- /**
95
- * Old Visual Studio versions before 2015 do not implement sprintf, but instead
96
- * implement _snprintf. We standard that here.
97
- */
98
- #if !defined(snprintf) && defined(_MSC_VER) && (_MSC_VER < 1900)
99
- # define snprintf _snprintf
100
- #endif
101
-
102
- /**
103
- * A simple utility macro to concatenate two tokens together, necessary when one
104
- * of the tokens is itself a macro.
105
- */
106
- #define PM_CONCATENATE(left, right) left ## right
107
-
108
- /**
109
- * We want to be able to use static assertions, but they weren't standardized
110
- * until C11. As such, we polyfill it here by making a hacky typedef that will
111
- * fail to compile due to a negative array size if the condition is false.
112
- */
113
- #if defined(_Static_assert)
114
- # define PM_STATIC_ASSERT(line, condition, message) _Static_assert(condition, message)
115
- #else
116
- # define PM_STATIC_ASSERT(line, condition, message) typedef char PM_CONCATENATE(static_assert_, line)[(condition) ? 1 : -1]
117
- #endif
118
-
119
- /**
120
- * In general, libc for embedded systems does not support memory-mapped files.
121
- * If the target platform is POSIX or Windows, we can map a file in memory and
122
- * read it in a more efficient manner.
123
- */
124
- #ifdef _WIN32
125
- # define PRISM_HAS_MMAP
126
- #else
127
- # include <unistd.h>
128
- # ifdef _POSIX_MAPPED_FILES
129
- # define PRISM_HAS_MMAP
130
- # endif
131
- #endif
132
-
133
- /**
134
- * If PRISM_HAS_NO_FILESYSTEM is defined, then we want to exclude all filesystem
135
- * related code from the library. All filesystem related code should be guarded
136
- * by PRISM_HAS_FILESYSTEM.
137
- */
138
- #ifndef PRISM_HAS_NO_FILESYSTEM
139
- # define PRISM_HAS_FILESYSTEM
140
- #endif
141
-
142
- /**
143
- * isinf on POSIX systems it accepts a float, a double, or a long double.
144
- * But mingw didn't provide an isinf macro, only an isinf function that only
145
- * accepts floats, so we need to use _finite instead.
146
- */
147
- #ifdef __MINGW64__
148
- #include <float.h>
149
- #define PRISM_ISINF(x) (!_finite(x))
150
- #else
151
- #define PRISM_ISINF(x) isinf(x)
152
- #endif
153
-
154
- /**
155
- * If you build prism with a custom allocator, configure it with
156
- * "-D PRISM_XALLOCATOR" to use your own allocator that defines xmalloc,
157
- * xrealloc, xcalloc, and xfree.
158
- *
159
- * For example, your `prism_xallocator.h` file could look like this:
160
- *
161
- * ```
162
- * #ifndef PRISM_XALLOCATOR_H
163
- * #define PRISM_XALLOCATOR_H
164
- * #define xmalloc my_malloc
165
- * #define xrealloc my_realloc
166
- * #define xcalloc my_calloc
167
- * #define xfree my_free
168
- * #endif
169
- * ```
170
- */
171
- #ifdef PRISM_XALLOCATOR
172
- #include "prism_xallocator.h"
173
- #else
174
- #ifndef xmalloc
175
- /**
176
- * The malloc function that should be used. This can be overridden with
177
- * the PRISM_XALLOCATOR define.
178
- */
179
- #define xmalloc malloc
180
- #endif
181
-
182
- #ifndef xrealloc
183
- /**
184
- * The realloc function that should be used. This can be overridden with
185
- * the PRISM_XALLOCATOR define.
186
- */
187
- #define xrealloc realloc
188
- #endif
189
-
190
- #ifndef xcalloc
191
- /**
192
- * The calloc function that should be used. This can be overridden with
193
- * the PRISM_XALLOCATOR define.
194
- */
195
- #define xcalloc calloc
196
- #endif
197
-
198
- #ifndef xfree
199
- /**
200
- * The free function that should be used. This can be overridden with the
201
- * PRISM_XALLOCATOR define.
202
- */
203
- #define xfree free
204
- #endif
205
- #endif
206
-
207
- /**
208
- * If PRISM_BUILD_MINIMAL is defined, then we're going to define every possible
209
- * switch that will turn off certain features of prism.
210
- */
211
- #ifdef PRISM_BUILD_MINIMAL
212
- /** Exclude the serialization API. */
213
- #define PRISM_EXCLUDE_SERIALIZATION
214
-
215
- /** Exclude the JSON serialization API. */
216
- #define PRISM_EXCLUDE_JSON
217
-
218
- /** Exclude the Array#pack parser API. */
219
- #define PRISM_EXCLUDE_PACK
220
-
221
- /** Exclude the prettyprint API. */
222
- #define PRISM_EXCLUDE_PRETTYPRINT
223
-
224
- /** Exclude the full set of encodings, using the minimal only. */
225
- #define PRISM_ENCODING_EXCLUDE_FULL
226
- #endif
227
-
228
- /**
229
- * Support PRISM_LIKELY and PRISM_UNLIKELY to help the compiler optimize its
230
- * branch predication.
231
- */
232
- #if defined(__GNUC__) || defined(__clang__)
233
- /** The compiler should predicate that this branch will be taken. */
234
- #define PRISM_LIKELY(x) __builtin_expect(!!(x), 1)
235
-
236
- /** The compiler should predicate that this branch will not be taken. */
237
- #define PRISM_UNLIKELY(x) __builtin_expect(!!(x), 0)
238
- #else
239
- /** Void because this platform does not support branch prediction hints. */
240
- #define PRISM_LIKELY(x) (x)
241
-
242
- /** Void because this platform does not support branch prediction hints. */
243
- #define PRISM_UNLIKELY(x) (x)
244
- #endif
245
-
246
- /**
247
- * We use -Wimplicit-fallthrough to guard potentially unintended fall-through between cases of a switch.
248
- * Use PRISM_FALLTHROUGH to explicitly annotate cases where the fallthrough is intentional.
249
- */
250
- #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L // C23 or later
251
- #define PRISM_FALLTHROUGH [[fallthrough]];
252
- #elif defined(__GNUC__) || defined(__clang__)
253
- #define PRISM_FALLTHROUGH __attribute__((fallthrough));
254
- #elif defined(_MSC_VER)
255
- #define PRISM_FALLTHROUGH __fallthrough;
256
- #else
257
- #define PRISM_FALLTHROUGH
258
- #endif
259
-
260
- #endif