datadog-ruby_core_source 3.3.7 → 3.4.1

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/CHANGELOG.datadog.md +9 -0
  3. data/README.md +8 -5
  4. data/datadog-ruby_core_source.gemspec +1 -1
  5. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/id.h +2 -0
  6. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/error.h +26 -0
  7. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/internal/gc.h +1 -0
  8. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/parse.h +2 -1
  9. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/proc.h +1 -0
  10. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/internal/sanitizers.h +24 -36
  11. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/prism/ast.h +10 -0
  12. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/extension.h +1 -1
  13. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/prism/version.h +2 -2
  14. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/ractor_core.h +1 -0
  15. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/rubyparser.h +3 -1
  16. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/id.h +5 -0
  17. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/internal/basic_operators.h +1 -0
  18. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/internal/bits.h +82 -0
  19. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/cmdlineopt.h +0 -4
  20. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/internal/encoding.h +2 -0
  21. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/error.h +26 -0
  22. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/internal/fixnum.h +1 -0
  23. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/internal/gc.h +20 -9
  24. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/hash.h +1 -0
  25. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/internal/imemo.h +9 -13
  26. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/internal/io.h +2 -2
  27. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/parse.h +4 -2
  28. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/proc.h +1 -1
  29. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/internal/ractor.h +4 -0
  30. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/re.h +2 -2
  31. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/internal/sanitizers.h +43 -39
  32. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/internal/string.h +23 -10
  33. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/struct.h +0 -8
  34. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/symbol.h +2 -0
  35. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/internal/thread.h +23 -0
  36. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/time.h +4 -1
  37. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/variable.h +0 -2
  38. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/internal/vm.h +1 -1
  39. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/iseq.h +12 -1
  40. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/method.h +4 -1
  41. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/node.h +14 -3
  42. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/prism/ast.h +443 -3
  43. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/prism/defines.h +26 -8
  44. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/prism/diagnostic.h +1 -0
  45. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/extension.h +4 -4
  46. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/options.h +47 -1
  47. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/prism/prism.h +51 -4
  48. data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/util/pm_buffer.h +10 -0
  49. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/prism/version.h +2 -2
  50. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/prism_compile.h +11 -5
  51. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/ractor_core.h +6 -6
  52. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/rubyparser.h +39 -9
  53. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/thread_pthread.h +2 -3
  54. data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.5.0-preview1}/vm_core.h +43 -30
  55. data/lib/datadog/ruby_core_source/version.rb +1 -1
  56. metadata +209 -209
  57. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/ccan/build_assert/build_assert.h +0 -0
  58. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/ccan/check_type/check_type.h +0 -0
  59. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/ccan/container_of/container_of.h +0 -0
  60. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/ccan/list/list.h +0 -0
  61. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/ccan/str/str.h +0 -0
  62. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/id_table.h +0 -0
  63. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/array.h +0 -0
  64. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/internal/basic_operators.h +0 -0
  65. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/bignum.h +0 -0
  66. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/internal/bits.h +0 -0
  67. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/class.h +0 -0
  68. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/cmdlineopt.h +0 -0
  69. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/compar.h +0 -0
  70. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/compile.h +0 -0
  71. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/compilers.h +0 -0
  72. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/complex.h +0 -0
  73. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/cont.h +0 -0
  74. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/dir.h +0 -0
  75. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/enc.h +0 -0
  76. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/internal/encoding.h +0 -0
  77. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/enum.h +0 -0
  78. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/enumerator.h +0 -0
  79. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/eval.h +0 -0
  80. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/file.h +0 -0
  81. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/internal/fixnum.h +0 -0
  82. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/hash.h +0 -0
  83. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/internal/imemo.h +0 -0
  84. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/inits.h +0 -0
  85. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/internal/io.h +0 -0
  86. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/load.h +0 -0
  87. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/loadpath.h +0 -0
  88. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/math.h +0 -0
  89. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/missing.h +0 -0
  90. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/numeric.h +0 -0
  91. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/object.h +0 -0
  92. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/process.h +0 -0
  93. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/internal/ractor.h +0 -0
  94. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/random.h +0 -0
  95. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/range.h +0 -0
  96. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/rational.h +0 -0
  97. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/re.h +0 -0
  98. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/ruby_parser.h +0 -0
  99. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/serial.h +0 -0
  100. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/signal.h +0 -0
  101. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/st.h +0 -0
  102. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/static_assert.h +0 -0
  103. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/internal/string.h +0 -0
  104. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/struct.h +0 -0
  105. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/symbol.h +0 -0
  106. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/internal/thread.h +0 -0
  107. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/time.h +0 -0
  108. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/transcode.h +0 -0
  109. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/util.h +0 -0
  110. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/variable.h +0 -0
  111. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/internal/vm.h +0 -0
  112. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal/warnings.h +0 -0
  113. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/internal.h +0 -0
  114. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/iseq.h +0 -0
  115. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/method.h +0 -0
  116. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/node.h +0 -0
  117. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/parser_st.h +0 -0
  118. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/parser_value.h +0 -0
  119. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/prism/defines.h +0 -0
  120. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/prism/diagnostic.h +0 -0
  121. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/encoding.h +0 -0
  122. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/node.h +0 -0
  123. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/options.h +0 -0
  124. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/pack.h +0 -0
  125. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/parser.h +0 -0
  126. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/prettyprint.h +0 -0
  127. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/prism/prism.h +0 -0
  128. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/regexp.h +0 -0
  129. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/static_literals.h +0 -0
  130. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/util/pm_buffer.h +0 -0
  131. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/util/pm_char.h +0 -0
  132. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/util/pm_constant_pool.h +0 -0
  133. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/util/pm_integer.h +0 -0
  134. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/util/pm_list.h +0 -0
  135. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/util/pm_memchr.h +0 -0
  136. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/util/pm_newline_list.h +0 -0
  137. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/util/pm_string.h +0 -0
  138. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/util/pm_strncasecmp.h +0 -0
  139. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/prism/util/pm_strpbrk.h +0 -0
  140. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/prism_compile.h +0 -0
  141. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/ruby_assert.h +0 -0
  142. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/ruby_atomic.h +0 -0
  143. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/shape.h +0 -0
  144. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/thread_none.h +0 -0
  145. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/thread_pthread.h +0 -0
  146. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.4.0-p0}/vm_core.h +0 -0
  147. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/vm_debug.h +0 -0
  148. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0-p0}/vm_opts.h +0 -0
  149. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/ccan/build_assert/build_assert.h +0 -0
  150. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/ccan/check_type/check_type.h +0 -0
  151. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/ccan/container_of/container_of.h +0 -0
  152. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/ccan/list/list.h +0 -0
  153. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/ccan/str/str.h +0 -0
  154. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/id_table.h +0 -0
  155. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/array.h +0 -0
  156. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/bignum.h +0 -0
  157. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/class.h +0 -0
  158. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/compar.h +0 -0
  159. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/compile.h +0 -0
  160. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/compilers.h +0 -0
  161. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/complex.h +0 -0
  162. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/cont.h +0 -0
  163. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/dir.h +0 -0
  164. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/enc.h +0 -0
  165. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/enum.h +0 -0
  166. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/enumerator.h +0 -0
  167. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/eval.h +0 -0
  168. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/file.h +0 -0
  169. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/inits.h +0 -0
  170. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/load.h +0 -0
  171. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/loadpath.h +0 -0
  172. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/math.h +0 -0
  173. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/missing.h +0 -0
  174. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/numeric.h +0 -0
  175. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/object.h +0 -0
  176. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/process.h +0 -0
  177. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/random.h +0 -0
  178. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/range.h +0 -0
  179. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/rational.h +0 -0
  180. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/ruby_parser.h +0 -0
  181. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/serial.h +0 -0
  182. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/signal.h +0 -0
  183. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/st.h +0 -0
  184. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/static_assert.h +0 -0
  185. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/transcode.h +0 -0
  186. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/util.h +0 -0
  187. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal/warnings.h +0 -0
  188. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/internal.h +0 -0
  189. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/parser_st.h +0 -0
  190. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/parser_value.h +0 -0
  191. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/encoding.h +0 -0
  192. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/node.h +0 -0
  193. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/pack.h +0 -0
  194. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/parser.h +0 -0
  195. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/prettyprint.h +0 -0
  196. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/regexp.h +0 -0
  197. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/static_literals.h +0 -0
  198. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/util/pm_char.h +0 -0
  199. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/util/pm_constant_pool.h +0 -0
  200. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/util/pm_integer.h +0 -0
  201. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/util/pm_list.h +0 -0
  202. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/util/pm_memchr.h +0 -0
  203. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/util/pm_newline_list.h +0 -0
  204. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/util/pm_string.h +0 -0
  205. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/util/pm_strncasecmp.h +0 -0
  206. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/prism/util/pm_strpbrk.h +0 -0
  207. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/ruby_assert.h +0 -0
  208. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/ruby_atomic.h +0 -0
  209. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/shape.h +0 -0
  210. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/thread_none.h +0 -0
  211. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/vm_debug.h +0 -0
  212. /data/lib/datadog/ruby_core_source/{ruby-3.4.0-rc1 → ruby-3.5.0-preview1}/vm_opts.h +0 -0
@@ -23,6 +23,9 @@
23
23
  * some platforms they aren't included unless this is already defined.
24
24
  */
25
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>
26
29
  #include <inttypes.h>
27
30
 
28
31
  /**
@@ -31,7 +34,7 @@
31
34
  * specifying a maximum depth to which we are allowed to recurse.
32
35
  */
33
36
  #ifndef PRISM_DEPTH_MAXIMUM
34
- #define PRISM_DEPTH_MAXIMUM 1000
37
+ #define PRISM_DEPTH_MAXIMUM 10000
35
38
  #endif
36
39
 
37
40
  /**
@@ -137,14 +140,15 @@
137
140
  #endif
138
141
 
139
142
  /**
140
- * isinf on Windows is defined as accepting a float, but on POSIX systems it
141
- * accepts a float, a double, or a long double. We want to mirror this behavior
142
- * on windows.
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.
143
146
  */
144
- #ifdef _WIN32
145
- # include <float.h>
146
- # undef isinf
147
- # define isinf(x) (sizeof(x) == sizeof(float) ? !_finitef(x) : !_finite(x))
147
+ #ifdef __MINGW64__
148
+ #include <float.h>
149
+ #define PRISM_ISINF(x) (!_finite(x))
150
+ #else
151
+ #define PRISM_ISINF(x) isinf(x)
148
152
  #endif
149
153
 
150
154
  /**
@@ -239,4 +243,18 @@
239
243
  #define PRISM_UNLIKELY(x) (x)
240
244
  #endif
241
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
+
242
260
  #endif
@@ -170,6 +170,7 @@ typedef enum {
170
170
  PM_ERR_INSTANCE_VARIABLE_BARE,
171
171
  PM_ERR_INVALID_BLOCK_EXIT,
172
172
  PM_ERR_INVALID_CHARACTER,
173
+ PM_ERR_INVALID_COMMA,
173
174
  PM_ERR_INVALID_ENCODING_MAGIC_COMMENT,
174
175
  PM_ERR_INVALID_ESCAPE_CHARACTER,
175
176
  PM_ERR_INVALID_FLOAT_EXPONENT,
@@ -1,15 +1,15 @@
1
1
  #ifndef PRISM_EXT_NODE_H
2
2
  #define PRISM_EXT_NODE_H
3
3
 
4
- #define EXPECTED_PRISM_VERSION "1.0.0"
4
+ #define EXPECTED_PRISM_VERSION "1.4.0"
5
5
 
6
6
  #include <ruby.h>
7
7
  #include <ruby/encoding.h>
8
8
  #include "prism.h"
9
9
 
10
- VALUE pm_source_new(const pm_parser_t *parser, rb_encoding *encoding);
11
- VALUE pm_token_new(const pm_parser_t *parser, const pm_token_t *token, rb_encoding *encoding, VALUE source);
12
- VALUE pm_ast_new(const pm_parser_t *parser, const pm_node_t *node, rb_encoding *encoding, VALUE source);
10
+ VALUE pm_source_new(const pm_parser_t *parser, rb_encoding *encoding, bool freeze);
11
+ VALUE pm_token_new(const pm_parser_t *parser, const pm_token_t *token, rb_encoding *encoding, VALUE source, bool freeze);
12
+ VALUE pm_ast_new(const pm_parser_t *parser, const pm_node_t *node, rb_encoding *encoding, VALUE source, bool freeze);
13
13
  VALUE pm_integer_new(const pm_integer_t *integer);
14
14
 
15
15
  void Init_prism_api_node(void);
@@ -39,8 +39,26 @@ typedef struct pm_options_scope {
39
39
 
40
40
  /** The names of the locals in the scope. */
41
41
  pm_string_t *locals;
42
+
43
+ /** Flags for the set of forwarding parameters in this scope. */
44
+ uint8_t forwarding;
42
45
  } pm_options_scope_t;
43
46
 
47
+ /** The default value for parameters. */
48
+ static const uint8_t PM_OPTIONS_SCOPE_FORWARDING_NONE = 0x0;
49
+
50
+ /** When the scope is fowarding with the * parameter. */
51
+ static const uint8_t PM_OPTIONS_SCOPE_FORWARDING_POSITIONALS = 0x1;
52
+
53
+ /** When the scope is fowarding with the ** parameter. */
54
+ static const uint8_t PM_OPTIONS_SCOPE_FORWARDING_KEYWORDS = 0x2;
55
+
56
+ /** When the scope is fowarding with the & parameter. */
57
+ static const uint8_t PM_OPTIONS_SCOPE_FORWARDING_BLOCK = 0x4;
58
+
59
+ /** When the scope is fowarding with the ... parameter. */
60
+ static const uint8_t PM_OPTIONS_SCOPE_FORWARDING_ALL = 0x8;
61
+
44
62
  // Forward declaration needed by the callback typedef.
45
63
  struct pm_options;
46
64
 
@@ -68,7 +86,10 @@ typedef enum {
68
86
  PM_OPTIONS_VERSION_LATEST = 0,
69
87
 
70
88
  /** The vendored version of prism in CRuby 3.3.x. */
71
- PM_OPTIONS_VERSION_CRUBY_3_3 = 1
89
+ PM_OPTIONS_VERSION_CRUBY_3_3 = 1,
90
+
91
+ /** The vendored version of prism in CRuby 3.4.x. */
92
+ PM_OPTIONS_VERSION_CRUBY_3_4 = 2
72
93
  } pm_options_version_t;
73
94
 
74
95
  /**
@@ -157,6 +178,13 @@ typedef struct pm_options {
157
178
  * inside another script.
158
179
  */
159
180
  bool partial_script;
181
+
182
+ /**
183
+ * Whether or not the parser should freeze the nodes that it creates. This
184
+ * makes it possible to have a deeply frozen AST that is safe to share
185
+ * between concurrency primitives.
186
+ */
187
+ bool freeze;
160
188
  } pm_options_t;
161
189
 
162
190
  /**
@@ -282,6 +310,14 @@ PRISM_EXPORTED_FUNCTION void pm_options_main_script_set(pm_options_t *options, b
282
310
  */
283
311
  PRISM_EXPORTED_FUNCTION void pm_options_partial_script_set(pm_options_t *options, bool partial_script);
284
312
 
313
+ /**
314
+ * Set the freeze option on the given options struct.
315
+ *
316
+ * @param options The options struct to set the freeze value on.
317
+ * @param freeze The freeze value to set.
318
+ */
319
+ PRISM_EXPORTED_FUNCTION void pm_options_freeze_set(pm_options_t *options, bool freeze);
320
+
285
321
  /**
286
322
  * Allocate and zero out the scopes array on the given options struct.
287
323
  *
@@ -319,6 +355,14 @@ PRISM_EXPORTED_FUNCTION bool pm_options_scope_init(pm_options_scope_t *scope, si
319
355
  */
320
356
  PRISM_EXPORTED_FUNCTION const pm_string_t * pm_options_scope_local_get(const pm_options_scope_t *scope, size_t index);
321
357
 
358
+ /**
359
+ * Set the forwarding option on the given scope struct.
360
+ *
361
+ * @param scope The scope struct to set the forwarding on.
362
+ * @param forwarding The forwarding value to set.
363
+ */
364
+ PRISM_EXPORTED_FUNCTION void pm_options_scope_forwarding_set(pm_options_scope_t *scope, uint8_t forwarding);
365
+
322
366
  /**
323
367
  * Free the internal memory associated with the options.
324
368
  *
@@ -352,6 +396,7 @@ PRISM_EXPORTED_FUNCTION void pm_options_free(pm_options_t *options);
352
396
  * | `1` | encoding locked |
353
397
  * | `1` | main script |
354
398
  * | `1` | partial script |
399
+ * | `1` | freeze |
355
400
  * | `4` | the number of scopes |
356
401
  * | ... | the scopes |
357
402
  *
@@ -367,6 +412,7 @@ PRISM_EXPORTED_FUNCTION void pm_options_free(pm_options_t *options);
367
412
  * | # bytes | field |
368
413
  * | ------- | -------------------------- |
369
414
  * | `4` | the number of locals |
415
+ * | `1` | the forwarding flags |
370
416
  * | ... | the locals |
371
417
  *
372
418
  * Each local is laid out as follows:
@@ -93,11 +93,11 @@ typedef char * (pm_parse_stream_fgets_t)(char *string, int size, void *stream);
93
93
  * @param parser The parser to use.
94
94
  * @param buffer The buffer to use.
95
95
  * @param stream The stream to parse.
96
- * @param fgets The function to use to read from the stream.
96
+ * @param stream_fgets The function to use to read from the stream.
97
97
  * @param options The optional options to use when parsing.
98
98
  * @return The AST representing the source.
99
99
  */
100
- PRISM_EXPORTED_FUNCTION pm_node_t * pm_parse_stream(pm_parser_t *parser, pm_buffer_t *buffer, void *stream, pm_parse_stream_fgets_t *fgets, const pm_options_t *options);
100
+ PRISM_EXPORTED_FUNCTION pm_node_t * pm_parse_stream(pm_parser_t *parser, pm_buffer_t *buffer, void *stream, pm_parse_stream_fgets_t *stream_fgets, const pm_options_t *options);
101
101
 
102
102
  // We optionally support serializing to a binary string. For systems that don't
103
103
  // want or need this functionality, it can be turned off with the
@@ -110,10 +110,10 @@ PRISM_EXPORTED_FUNCTION pm_node_t * pm_parse_stream(pm_parser_t *parser, pm_buff
110
110
  *
111
111
  * @param buffer The buffer to serialize to.
112
112
  * @param stream The stream to parse.
113
- * @param fgets The function to use to read from the stream.
113
+ * @param stream_fgets The function to use to read from the stream.
114
114
  * @param data The optional data to pass to the parser.
115
115
  */
116
- PRISM_EXPORTED_FUNCTION void pm_serialize_parse_stream(pm_buffer_t *buffer, void *stream, pm_parse_stream_fgets_t *fgets, const char *data);
116
+ PRISM_EXPORTED_FUNCTION void pm_serialize_parse_stream(pm_buffer_t *buffer, void *stream, pm_parse_stream_fgets_t *stream_fgets, const char *data);
117
117
 
118
118
  /**
119
119
  * Serialize the given list of comments to the given buffer.
@@ -234,6 +234,53 @@ PRISM_EXPORTED_FUNCTION void pm_dump_json(pm_buffer_t *buffer, const pm_parser_t
234
234
 
235
235
  #endif
236
236
 
237
+ /**
238
+ * Represents the results of a slice query.
239
+ */
240
+ typedef enum {
241
+ /** Returned if the encoding given to a slice query was invalid. */
242
+ PM_STRING_QUERY_ERROR = -1,
243
+
244
+ /** Returned if the result of the slice query is false. */
245
+ PM_STRING_QUERY_FALSE,
246
+
247
+ /** Returned if the result of the slice query is true. */
248
+ PM_STRING_QUERY_TRUE
249
+ } pm_string_query_t;
250
+
251
+ /**
252
+ * Check that the slice is a valid local variable name.
253
+ *
254
+ * @param source The source to check.
255
+ * @param length The length of the source.
256
+ * @param encoding_name The name of the encoding of the source.
257
+ * @return PM_STRING_QUERY_TRUE if the query is true, PM_STRING_QUERY_FALSE if
258
+ * the query is false, and PM_STRING_QUERY_ERROR if the encoding was invalid.
259
+ */
260
+ PRISM_EXPORTED_FUNCTION pm_string_query_t pm_string_query_local(const uint8_t *source, size_t length, const char *encoding_name);
261
+
262
+ /**
263
+ * Check that the slice is a valid constant name.
264
+ *
265
+ * @param source The source to check.
266
+ * @param length The length of the source.
267
+ * @param encoding_name The name of the encoding of the source.
268
+ * @return PM_STRING_QUERY_TRUE if the query is true, PM_STRING_QUERY_FALSE if
269
+ * the query is false, and PM_STRING_QUERY_ERROR if the encoding was invalid.
270
+ */
271
+ PRISM_EXPORTED_FUNCTION pm_string_query_t pm_string_query_constant(const uint8_t *source, size_t length, const char *encoding_name);
272
+
273
+ /**
274
+ * Check that the slice is a valid method name.
275
+ *
276
+ * @param source The source to check.
277
+ * @param length The length of the source.
278
+ * @param encoding_name The name of the encoding of the source.
279
+ * @return PM_STRING_QUERY_TRUE if the query is true, PM_STRING_QUERY_FALSE if
280
+ * the query is false, and PM_STRING_QUERY_ERROR if the encoding was invalid.
281
+ */
282
+ PRISM_EXPORTED_FUNCTION pm_string_query_t pm_string_query_method_name(const uint8_t *source, size_t length, const char *encoding_name);
283
+
237
284
  /**
238
285
  * @mainpage
239
286
  *
@@ -137,6 +137,16 @@ void pm_buffer_append_varsint(pm_buffer_t *buffer, int32_t value);
137
137
  */
138
138
  void pm_buffer_append_double(pm_buffer_t *buffer, double value);
139
139
 
140
+ /**
141
+ * Append a unicode codepoint to the buffer.
142
+ *
143
+ * @param buffer The buffer to append to.
144
+ * @param value The character to append.
145
+ * @returns True if the codepoint was valid and appended successfully, false
146
+ * otherwise.
147
+ */
148
+ bool pm_buffer_append_unicode_codepoint(pm_buffer_t *buffer, uint32_t value);
149
+
140
150
  /**
141
151
  * The different types of escaping that can be performed by the buffer when
142
152
  * appending a slice of Ruby source code.
@@ -14,7 +14,7 @@
14
14
  /**
15
15
  * The minor version of the Prism library as an int.
16
16
  */
17
- #define PRISM_VERSION_MINOR 0
17
+ #define PRISM_VERSION_MINOR 4
18
18
 
19
19
  /**
20
20
  * The patch version of the Prism library as an int.
@@ -24,6 +24,6 @@
24
24
  /**
25
25
  * The version of the Prism library as a constant string.
26
26
  */
27
- #define PRISM_VERSION "1.0.0"
27
+ #define PRISM_VERSION "1.4.0"
28
28
 
29
29
  #endif
@@ -83,6 +83,12 @@ typedef struct {
83
83
  bool parsed;
84
84
  } pm_parse_result_t;
85
85
 
86
+ #define PM_SPECIAL_CONSTANT_FLAG ((pm_constant_id_t)(1 << 31))
87
+ #define PM_CONSTANT_AND ((pm_constant_id_t)(idAnd | PM_SPECIAL_CONSTANT_FLAG))
88
+ #define PM_CONSTANT_DOT3 ((pm_constant_id_t)(idDot3 | PM_SPECIAL_CONSTANT_FLAG))
89
+ #define PM_CONSTANT_MULT ((pm_constant_id_t)(idMULT | PM_SPECIAL_CONSTANT_FLAG))
90
+ #define PM_CONSTANT_POW ((pm_constant_id_t)(idPow | PM_SPECIAL_CONSTANT_FLAG))
91
+
86
92
  VALUE pm_load_file(pm_parse_result_t *result, VALUE filepath, bool load_error);
87
93
  VALUE pm_parse_file(pm_parse_result_t *result, VALUE filepath, VALUE *script_lines);
88
94
  VALUE pm_load_parse_file(pm_parse_result_t *result, VALUE filepath, VALUE *script_lines);
@@ -90,10 +96,10 @@ VALUE pm_parse_string(pm_parse_result_t *result, VALUE source, VALUE filepath, V
90
96
  VALUE pm_parse_stdin(pm_parse_result_t *result);
91
97
  void pm_parse_result_free(pm_parse_result_t *result);
92
98
 
93
- rb_iseq_t *pm_iseq_new(pm_scope_node_t *node, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum rb_iseq_type);
94
- rb_iseq_t *pm_iseq_new_top(pm_scope_node_t *node, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent);
95
- rb_iseq_t *pm_iseq_new_main(pm_scope_node_t *node, VALUE path, VALUE realpath, const rb_iseq_t *parent, int opt);
96
- rb_iseq_t *pm_iseq_new_eval(pm_scope_node_t *node, VALUE name, VALUE path, VALUE realpath, int first_lineno, const rb_iseq_t *parent, int isolated_depth);
97
- rb_iseq_t *pm_iseq_new_with_opt(pm_scope_node_t *node, VALUE name, VALUE path, VALUE realpath, int first_lineno, const rb_iseq_t *parent, int isolated_depth, enum rb_iseq_type, const rb_compile_option_t*);
99
+ rb_iseq_t *pm_iseq_new(pm_scope_node_t *node, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum rb_iseq_type, int *error_state);
100
+ rb_iseq_t *pm_iseq_new_top(pm_scope_node_t *node, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, int *error_state);
101
+ rb_iseq_t *pm_iseq_new_main(pm_scope_node_t *node, VALUE path, VALUE realpath, const rb_iseq_t *parent, int opt, int *error_state);
102
+ rb_iseq_t *pm_iseq_new_eval(pm_scope_node_t *node, VALUE name, VALUE path, VALUE realpath, int first_lineno, const rb_iseq_t *parent, int isolated_depth, int *error_state);
103
+ rb_iseq_t *pm_iseq_new_with_opt(pm_scope_node_t *node, VALUE name, VALUE path, VALUE realpath, int first_lineno, const rb_iseq_t *parent, int isolated_depth, enum rb_iseq_type, const rb_compile_option_t *option, int *error_state);
98
104
 
99
105
  VALUE pm_iseq_compile_node(rb_iseq_t *iseq, pm_scope_node_t *node);
@@ -180,6 +180,7 @@ struct rb_ractor_struct {
180
180
 
181
181
  st_table *local_storage;
182
182
  struct rb_id_table *idkey_local_storage;
183
+ VALUE local_storage_store_lock;
183
184
 
184
185
  VALUE r_stdin;
185
186
  VALUE r_stdout;
@@ -222,6 +223,8 @@ void rb_ractor_terminate_interrupt_main_thread(rb_ractor_t *r);
222
223
  void rb_ractor_terminate_all(void);
223
224
  bool rb_ractor_main_p_(void);
224
225
  void rb_ractor_atfork(rb_vm_t *vm, rb_thread_t *th);
226
+ VALUE rb_ractor_require(VALUE feature);
227
+ VALUE rb_ractor_autoload_load(VALUE space, ID id);
225
228
 
226
229
  VALUE rb_ractor_ensure_shareable(VALUE obj, VALUE name);
227
230
 
@@ -304,18 +307,15 @@ rb_ractor_thread_switch(rb_ractor_t *cr, rb_thread_t *th)
304
307
  }
305
308
 
306
309
  #define rb_ractor_set_current_ec(cr, ec) rb_ractor_set_current_ec_(cr, ec, __FILE__, __LINE__)
310
+ #ifdef RB_THREAD_LOCAL_SPECIFIER
311
+ void rb_current_ec_set(rb_execution_context_t *ec);
312
+ #endif
307
313
 
308
314
  static inline void
309
315
  rb_ractor_set_current_ec_(rb_ractor_t *cr, rb_execution_context_t *ec, const char *file, int line)
310
316
  {
311
317
  #ifdef RB_THREAD_LOCAL_SPECIFIER
312
-
313
- # ifdef __APPLE__
314
318
  rb_current_ec_set(ec);
315
- # else
316
- ruby_current_ec = ec;
317
- # endif
318
-
319
319
  #else
320
320
  native_tls_set(ruby_current_ec_key, ec);
321
321
  #endif
@@ -265,6 +265,9 @@ typedef struct RNode_IF {
265
265
  struct RNode *nd_cond;
266
266
  struct RNode *nd_body;
267
267
  struct RNode *nd_else;
268
+ rb_code_location_t if_keyword_loc;
269
+ rb_code_location_t then_keyword_loc;
270
+ rb_code_location_t end_keyword_loc;
268
271
  } rb_node_if_t;
269
272
 
270
273
  typedef struct RNode_UNLESS {
@@ -338,7 +341,18 @@ typedef struct RNode_ITER {
338
341
 
339
342
  struct RNode *nd_body;
340
343
  struct RNode *nd_iter;
341
- } rb_node_iter_t, rb_node_for_t;
344
+ } rb_node_iter_t;
345
+
346
+ typedef struct RNode_FOR {
347
+ NODE node;
348
+
349
+ struct RNode *nd_body;
350
+ struct RNode *nd_iter;
351
+ rb_code_location_t for_keyword_loc;
352
+ rb_code_location_t in_keyword_loc;
353
+ rb_code_location_t do_keyword_loc;
354
+ rb_code_location_t end_keyword_loc;
355
+ } rb_node_for_t;
342
356
 
343
357
  typedef struct RNode_FOR_MASGN {
344
358
  NODE node;
@@ -538,6 +552,9 @@ typedef struct RNode_SUPER {
538
552
  NODE node;
539
553
 
540
554
  struct RNode *nd_args;
555
+ rb_code_location_t keyword_loc;
556
+ rb_code_location_t lparen_loc;
557
+ rb_code_location_t rparen_loc;
541
558
  } rb_node_super_t;
542
559
 
543
560
  typedef struct RNode_ZSUPER {
@@ -587,6 +604,9 @@ typedef struct RNode_YIELD {
587
604
  NODE node;
588
605
 
589
606
  struct RNode *nd_head;
607
+ rb_code_location_t keyword_loc;
608
+ rb_code_location_t lparen_loc;
609
+ rb_code_location_t rparen_loc;
590
610
  } rb_node_yield_t;
591
611
 
592
612
  typedef struct RNode_LVAR {
@@ -719,6 +739,8 @@ typedef struct RNode_EVSTR {
719
739
  NODE node;
720
740
 
721
741
  struct RNode *nd_body;
742
+ rb_code_location_t opening_loc;
743
+ rb_code_location_t closing_loc;
722
744
  } rb_node_evstr_t;
723
745
 
724
746
  typedef struct RNode_REGX { /* also RNode_MATCH */
@@ -726,6 +748,9 @@ typedef struct RNode_REGX { /* also RNode_MATCH */
726
748
 
727
749
  struct rb_parser_string *string;
728
750
  int options;
751
+ rb_code_location_t opening_loc;
752
+ rb_code_location_t content_loc;
753
+ rb_code_location_t closing_loc;
729
754
  } rb_node_regx_t, rb_node_match_t;
730
755
 
731
756
  typedef rb_node_dstr_t rb_node_dregx_t;
@@ -866,6 +891,9 @@ typedef struct RNode_CLASS {
866
891
  struct RNode *nd_cpath;
867
892
  struct RNode *nd_body;
868
893
  struct RNode *nd_super;
894
+ rb_code_location_t class_keyword_loc;
895
+ rb_code_location_t inheritance_operator_loc;
896
+ rb_code_location_t end_keyword_loc;
869
897
  } rb_node_class_t;
870
898
 
871
899
  typedef struct RNode_MODULE {
@@ -901,6 +929,7 @@ typedef struct RNode_DOTS {
901
929
 
902
930
  struct RNode *nd_beg;
903
931
  struct RNode *nd_end;
932
+ rb_code_location_t operator_loc;
904
933
  } rb_node_dot2_t, rb_node_dot3_t, rb_node_flip2_t, rb_node_flip3_t;
905
934
 
906
935
  typedef struct RNode_SELF {
@@ -935,6 +964,9 @@ typedef struct RNode_POSTEXE {
935
964
  NODE node;
936
965
 
937
966
  struct RNode *nd_body;
967
+ rb_code_location_t keyword_loc;
968
+ rb_code_location_t opening_loc;
969
+ rb_code_location_t closing_loc;
938
970
  } rb_node_postexe_t;
939
971
 
940
972
  typedef struct RNode_SYM {
@@ -957,6 +989,9 @@ typedef struct RNode_LAMBDA {
957
989
  NODE node;
958
990
 
959
991
  struct RNode *nd_body;
992
+ rb_code_location_t operator_loc;
993
+ rb_code_location_t opening_loc;
994
+ rb_code_location_t closing_loc;
960
995
  } rb_node_lambda_t;
961
996
 
962
997
  typedef struct RNode_ARYPTN {
@@ -1171,6 +1206,8 @@ typedef struct parser_params rb_parser_t;
1171
1206
  typedef struct rb_imemo_tmpbuf_struct rb_imemo_tmpbuf_t;
1172
1207
  #endif
1173
1208
 
1209
+ typedef NODE *(*rb_parser_assignable_func)(struct parser_params *p, ID id, NODE *val, const rb_code_location_t *loc);
1210
+
1174
1211
  #ifdef UNIVERSAL_PARSER
1175
1212
  typedef struct rb_parser_config_struct {
1176
1213
  /* Memory */
@@ -1188,14 +1225,12 @@ typedef struct rb_parser_config_struct {
1188
1225
 
1189
1226
  // VALUE rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg);
1190
1227
  VALUE (*compile_callback)(VALUE (*func)(VALUE), VALUE arg);
1191
- NODE *(*reg_named_capture_assign)(struct parser_params* p, VALUE regexp, const rb_code_location_t *loc);
1228
+ NODE *(*reg_named_capture_assign)(struct parser_params* p, VALUE regexp, const rb_code_location_t *loc, rb_parser_assignable_func assignable);
1192
1229
 
1193
1230
  /* Variable */
1194
1231
  VALUE (*attr_get)(VALUE obj, ID id);
1195
1232
 
1196
1233
  /* Array */
1197
- VALUE (*ary_new)(void);
1198
- VALUE (*ary_push)(VALUE ary, VALUE elem);
1199
1234
  VALUE (*ary_new_from_args)(long n, ...);
1200
1235
  VALUE (*ary_unshift)(VALUE ary, VALUE item);
1201
1236
 
@@ -1215,7 +1250,6 @@ typedef struct rb_parser_config_struct {
1215
1250
  const char *(*id2name)(ID id);
1216
1251
  VALUE (*id2str)(ID id);
1217
1252
  VALUE (*id2sym)(ID x);
1218
- ID (*sym2id)(VALUE sym);
1219
1253
 
1220
1254
  /* String */
1221
1255
  RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
@@ -1232,7 +1266,6 @@ typedef struct rb_parser_config_struct {
1232
1266
  VALUE (*rb_sprintf)(const char *format, ...);
1233
1267
  char *(*rstring_ptr)(VALUE str);
1234
1268
  long (*rstring_len)(VALUE str);
1235
- VALUE (*obj_as_string)(VALUE);
1236
1269
 
1237
1270
  /* Numeric */
1238
1271
  VALUE (*int2num)(int v);
@@ -1259,14 +1292,12 @@ typedef struct rb_parser_config_struct {
1259
1292
  rb_encoding* (*enc_get)(VALUE obj);
1260
1293
  int (*enc_asciicompat)(rb_encoding *enc);
1261
1294
  rb_encoding *(*utf8_encoding)(void);
1262
- VALUE (*enc_associate)(VALUE obj, rb_encoding *enc);
1263
1295
  rb_encoding *(*ascii8bit_encoding)(void);
1264
1296
  int (*enc_codelen)(int c, rb_encoding *enc);
1265
1297
  int (*enc_mbcput)(unsigned int c, void *buf, rb_encoding *enc);
1266
1298
  int (*enc_find_index)(const char *name);
1267
1299
  rb_encoding *(*enc_from_index)(int idx);
1268
1300
  int (*enc_isspace)(OnigCodePoint c, rb_encoding *enc);
1269
- rb_encoding *(*usascii_encoding)(void);
1270
1301
  int (*enc_mbminlen)(rb_encoding *enc);
1271
1302
  bool (*enc_isascii)(OnigCodePoint c, rb_encoding *enc);
1272
1303
  OnigCodePoint (*enc_mbc_to_codepoint)(const char *p, const char *e, rb_encoding *enc);
@@ -1287,7 +1318,6 @@ typedef struct rb_parser_config_struct {
1287
1318
  /* Eval */
1288
1319
  VALUE (*errinfo)(void);
1289
1320
  void (*set_errinfo)(VALUE err);
1290
- void (*exc_raise)(VALUE mesg);
1291
1321
  VALUE (*make_exception)(int argc, const VALUE *argv);
1292
1322
 
1293
1323
  /* GC */
@@ -132,10 +132,9 @@ struct rb_thread_sched {
132
132
 
133
133
  #ifdef RB_THREAD_LOCAL_SPECIFIER
134
134
  NOINLINE(void rb_current_ec_set(struct rb_execution_context_struct *));
135
- NOINLINE(struct rb_execution_context_struct *rb_current_ec_noinline(void));
136
135
 
137
- # ifdef __APPLE__
138
- // on Darwin, TLS can not be accessed across .so
136
+ # if defined(__arm64__) || defined(__aarch64__)
137
+ // on Arm64, TLS can not be accessed across .so
139
138
  NOINLINE(struct rb_execution_context_struct *rb_current_ec(void));
140
139
  # else
141
140
  RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;