debase-ruby_core_source 3.3.1 → 3.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (289) hide show
  1. checksums.yaml +4 -4
  2. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/addr2line.h +22 -0
  3. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/builtin.h +117 -0
  4. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/build_assert/build_assert.h +40 -0
  5. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/check_type/check_type.h +63 -0
  6. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/container_of/container_of.h +142 -0
  7. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/list/list.h +791 -0
  8. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/str/str.h +17 -0
  9. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/constant.h +53 -0
  10. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/darray.h +246 -0
  11. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/debug_counter.h +423 -0
  12. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/dln.h +32 -0
  13. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/encindex.h +70 -0
  14. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/eval_intern.h +343 -0
  15. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/hrtime.h +227 -0
  16. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/id.h +343 -0
  17. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/id_table.h +39 -0
  18. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/insns.inc +251 -0
  19. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/insns_info.inc +9215 -0
  20. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/array.h +151 -0
  21. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/basic_operators.h +63 -0
  22. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/bignum.h +244 -0
  23. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/bits.h +568 -0
  24. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/class.h +277 -0
  25. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/cmdlineopt.h +65 -0
  26. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/compar.h +29 -0
  27. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/compile.h +34 -0
  28. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/compilers.h +107 -0
  29. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/complex.h +29 -0
  30. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/cont.h +35 -0
  31. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/dir.h +16 -0
  32. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/enc.h +19 -0
  33. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/encoding.h +35 -0
  34. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/enum.h +18 -0
  35. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/enumerator.h +21 -0
  36. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/error.h +216 -0
  37. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/eval.h +33 -0
  38. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/file.h +38 -0
  39. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/fixnum.h +184 -0
  40. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/gc.h +364 -0
  41. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/hash.h +191 -0
  42. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/imemo.h +240 -0
  43. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/inits.h +50 -0
  44. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/io.h +137 -0
  45. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/load.h +18 -0
  46. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/loadpath.h +16 -0
  47. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/math.h +23 -0
  48. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/missing.h +18 -0
  49. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/numeric.h +273 -0
  50. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/object.h +62 -0
  51. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/parse.h +108 -0
  52. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/proc.h +30 -0
  53. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/process.h +124 -0
  54. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/ractor.h +6 -0
  55. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/random.h +17 -0
  56. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/range.h +40 -0
  57. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/rational.h +71 -0
  58. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/re.h +28 -0
  59. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/ruby_parser.h +69 -0
  60. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/sanitizers.h +186 -0
  61. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/serial.h +23 -0
  62. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/signal.h +25 -0
  63. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/static_assert.h +16 -0
  64. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/string.h +160 -0
  65. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/struct.h +127 -0
  66. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/symbol.h +45 -0
  67. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/thread.h +78 -0
  68. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/time.h +34 -0
  69. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/transcode.h +23 -0
  70. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/util.h +27 -0
  71. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/variable.h +72 -0
  72. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/vm.h +136 -0
  73. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/warnings.h +16 -0
  74. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal.h +112 -0
  75. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/iseq.h +338 -0
  76. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/known_errors.inc +791 -0
  77. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/method.h +254 -0
  78. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/node.h +128 -0
  79. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/node_name.inc +212 -0
  80. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/optinsn.inc +128 -0
  81. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/optunifs.inc +43 -0
  82. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parse.h +243 -0
  83. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_bits.h +564 -0
  84. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_node.h +32 -0
  85. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_st.h +162 -0
  86. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_value.h +106 -0
  87. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/ast.h +4612 -0
  88. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/defines.h +94 -0
  89. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/diagnostic.h +297 -0
  90. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/encoding.h +248 -0
  91. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/extension.h +18 -0
  92. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/node.h +57 -0
  93. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/options.h +204 -0
  94. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/pack.h +152 -0
  95. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/parser.h +716 -0
  96. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/prettyprint.h +26 -0
  97. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/prism.h +272 -0
  98. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/regexp.h +33 -0
  99. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_buffer.h +146 -0
  100. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_char.h +205 -0
  101. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_constant_pool.h +191 -0
  102. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_list.h +97 -0
  103. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_memchr.h +29 -0
  104. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_newline_list.h +104 -0
  105. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_state_stack.h +42 -0
  106. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_string.h +150 -0
  107. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_string_list.h +44 -0
  108. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_strncasecmp.h +32 -0
  109. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_strpbrk.h +43 -0
  110. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/version.h +29 -0
  111. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism_compile.h +29 -0
  112. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/probes_helper.h +42 -0
  113. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ractor_core.h +393 -0
  114. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/regenc.h +254 -0
  115. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/regint.h +1006 -0
  116. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/regparse.h +371 -0
  117. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/revision.h +5 -0
  118. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/rjit.h +101 -0
  119. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/rjit_c.h +164 -0
  120. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ruby_assert.h +14 -0
  121. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ruby_atomic.h +23 -0
  122. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/rubyparser.h +1405 -0
  123. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/shape.h +233 -0
  124. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/siphash.h +48 -0
  125. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/symbol.h +118 -0
  126. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/thread_none.h +21 -0
  127. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/thread_pthread.h +166 -0
  128. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/thread_win32.h +58 -0
  129. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/timev.h +58 -0
  130. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/transcode_data.h +138 -0
  131. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/variable.h +39 -0
  132. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/version.h +69 -0
  133. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm.inc +5436 -0
  134. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_call_iseq_optimized.inc +244 -0
  135. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_callinfo.h +614 -0
  136. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_core.h +2202 -0
  137. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_debug.h +122 -0
  138. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_exec.h +199 -0
  139. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_insnhelper.h +261 -0
  140. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_opts.h +67 -0
  141. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_sync.h +137 -0
  142. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vmtc.inc +245 -0
  143. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/yjit.h +72 -0
  144. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/addr2line.h +22 -0
  145. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/builtin.h +119 -0
  146. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/build_assert/build_assert.h +40 -0
  147. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/check_type/check_type.h +63 -0
  148. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/container_of/container_of.h +142 -0
  149. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/list/list.h +791 -0
  150. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/str/str.h +17 -0
  151. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/constant.h +53 -0
  152. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/darray.h +191 -0
  153. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/debug_counter.h +423 -0
  154. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/dln.h +34 -0
  155. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/encindex.h +70 -0
  156. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/eval_intern.h +324 -0
  157. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/hrtime.h +237 -0
  158. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/id.h +343 -0
  159. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/id_table.h +39 -0
  160. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/insns.inc +259 -0
  161. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/insns_info.inc +9530 -0
  162. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/array.h +151 -0
  163. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/basic_operators.h +63 -0
  164. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/bignum.h +244 -0
  165. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/bits.h +568 -0
  166. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/class.h +283 -0
  167. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/cmdlineopt.h +65 -0
  168. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/compar.h +29 -0
  169. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/compile.h +34 -0
  170. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/compilers.h +107 -0
  171. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/complex.h +29 -0
  172. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/cont.h +35 -0
  173. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/dir.h +16 -0
  174. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/enc.h +19 -0
  175. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/encoding.h +36 -0
  176. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/enum.h +18 -0
  177. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/enumerator.h +21 -0
  178. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/error.h +216 -0
  179. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/eval.h +33 -0
  180. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/file.h +38 -0
  181. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/fixnum.h +184 -0
  182. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/gc.h +334 -0
  183. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/hash.h +191 -0
  184. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/imemo.h +260 -0
  185. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/inits.h +47 -0
  186. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/io.h +140 -0
  187. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/load.h +18 -0
  188. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/loadpath.h +16 -0
  189. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/math.h +23 -0
  190. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/missing.h +19 -0
  191. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/numeric.h +274 -0
  192. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/object.h +63 -0
  193. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/parse.h +117 -0
  194. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/proc.h +30 -0
  195. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/process.h +124 -0
  196. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/ractor.h +6 -0
  197. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/random.h +17 -0
  198. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/range.h +40 -0
  199. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/rational.h +71 -0
  200. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/re.h +28 -0
  201. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/ruby_parser.h +102 -0
  202. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/sanitizers.h +297 -0
  203. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/serial.h +23 -0
  204. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/signal.h +24 -0
  205. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/st.h +11 -0
  206. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/static_assert.h +16 -0
  207. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/string.h +182 -0
  208. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/struct.h +127 -0
  209. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/symbol.h +45 -0
  210. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/thread.h +79 -0
  211. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/time.h +34 -0
  212. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/transcode.h +23 -0
  213. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/util.h +27 -0
  214. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/variable.h +72 -0
  215. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/vm.h +137 -0
  216. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/warnings.h +16 -0
  217. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal.h +108 -0
  218. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/iseq.h +340 -0
  219. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/known_errors.inc +1419 -0
  220. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/method.h +255 -0
  221. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/node.h +111 -0
  222. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/node_name.inc +224 -0
  223. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/optinsn.inc +128 -0
  224. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/optunifs.inc +43 -0
  225. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parse.h +243 -0
  226. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_bits.h +564 -0
  227. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_node.h +32 -0
  228. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_st.h +162 -0
  229. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_value.h +106 -0
  230. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/ast.h +6245 -0
  231. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/defines.h +206 -0
  232. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/diagnostic.h +433 -0
  233. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/encoding.h +283 -0
  234. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/extension.h +19 -0
  235. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/node.h +150 -0
  236. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/options.h +305 -0
  237. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/pack.h +163 -0
  238. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/parser.h +891 -0
  239. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/prettyprint.h +34 -0
  240. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/prism.h +347 -0
  241. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/regexp.h +33 -0
  242. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/static_literals.h +120 -0
  243. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_buffer.h +218 -0
  244. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_char.h +205 -0
  245. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_constant_pool.h +226 -0
  246. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_integer.h +119 -0
  247. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_list.h +97 -0
  248. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_memchr.h +29 -0
  249. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_newline_list.h +102 -0
  250. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_string.h +174 -0
  251. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_string_list.h +44 -0
  252. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_strncasecmp.h +32 -0
  253. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_strpbrk.h +46 -0
  254. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/version.h +29 -0
  255. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism_compile.h +88 -0
  256. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/probes_helper.h +42 -0
  257. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ractor_core.h +393 -0
  258. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regenc.h +254 -0
  259. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regint.h +1010 -0
  260. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regparse.h +371 -0
  261. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/revision.h +5 -0
  262. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rjit.h +101 -0
  263. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rjit_c.h +165 -0
  264. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ruby_assert.h +14 -0
  265. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ruby_atomic.h +23 -0
  266. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rubyparser.h +1430 -0
  267. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/shape.h +233 -0
  268. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/siphash.h +48 -0
  269. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/symbol.h +118 -0
  270. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_none.h +21 -0
  271. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_pthread.h +166 -0
  272. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_win32.h +58 -0
  273. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/timev.h +58 -0
  274. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/transcode_data.h +138 -0
  275. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/variable.h +39 -0
  276. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/version.h +69 -0
  277. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm.inc +5643 -0
  278. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_call_iseq_optimized.inc +244 -0
  279. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_callinfo.h +605 -0
  280. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_core.h +2236 -0
  281. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_debug.h +124 -0
  282. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_exec.h +199 -0
  283. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_insnhelper.h +272 -0
  284. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_opts.h +67 -0
  285. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_sync.h +137 -0
  286. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vmtc.inc +253 -0
  287. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/yjit.h +79 -0
  288. data/lib/debase/ruby_core_source/version.rb +1 -1
  289. metadata +289 -3
@@ -0,0 +1,233 @@
1
+ #ifndef RUBY_SHAPE_H
2
+ #define RUBY_SHAPE_H
3
+
4
+ #include "internal/gc.h"
5
+
6
+ #if (SIZEOF_UINT64_T <= SIZEOF_VALUE)
7
+
8
+ #define SIZEOF_SHAPE_T 4
9
+ #define SHAPE_IN_BASIC_FLAGS 1
10
+ typedef uint32_t attr_index_t;
11
+ typedef uint32_t shape_id_t;
12
+ # define SHAPE_ID_NUM_BITS 32
13
+
14
+ #else
15
+
16
+ #define SIZEOF_SHAPE_T 2
17
+ #define SHAPE_IN_BASIC_FLAGS 0
18
+ typedef uint16_t attr_index_t;
19
+ typedef uint16_t shape_id_t;
20
+ # define SHAPE_ID_NUM_BITS 16
21
+
22
+ #endif
23
+
24
+ typedef uint32_t redblack_id_t;
25
+
26
+ #define MAX_IVARS (attr_index_t)(-1)
27
+
28
+ # define SHAPE_MASK (((uintptr_t)1 << SHAPE_ID_NUM_BITS) - 1)
29
+ # define SHAPE_FLAG_MASK (((VALUE)-1) >> SHAPE_ID_NUM_BITS)
30
+
31
+ # define SHAPE_FLAG_SHIFT ((SIZEOF_VALUE * 8) - SHAPE_ID_NUM_BITS)
32
+
33
+ # define SHAPE_MAX_VARIATIONS 8
34
+
35
+ # define INVALID_SHAPE_ID SHAPE_MASK
36
+ # define ROOT_SHAPE_ID 0x0
37
+
38
+ # define SPECIAL_CONST_SHAPE_ID (ROOT_SHAPE_ID + 1)
39
+ # define OBJ_TOO_COMPLEX_SHAPE_ID (SPECIAL_CONST_SHAPE_ID + 1)
40
+ # define FIRST_T_OBJECT_SHAPE_ID (OBJ_TOO_COMPLEX_SHAPE_ID + 1)
41
+
42
+ typedef struct redblack_node redblack_node_t;
43
+
44
+ struct rb_shape {
45
+ struct rb_id_table * edges; // id_table from ID (ivar) to next shape
46
+ ID edge_name; // ID (ivar) for transition from parent to rb_shape
47
+ attr_index_t next_iv_index;
48
+ uint32_t capacity; // Total capacity of the object with this shape
49
+ uint8_t type;
50
+ uint8_t size_pool_index;
51
+ shape_id_t parent_id;
52
+ redblack_node_t * ancestor_index;
53
+ };
54
+
55
+ typedef struct rb_shape rb_shape_t;
56
+
57
+ struct redblack_node {
58
+ ID key;
59
+ rb_shape_t * value;
60
+ redblack_id_t l;
61
+ redblack_id_t r;
62
+ };
63
+
64
+ enum shape_type {
65
+ SHAPE_ROOT,
66
+ SHAPE_IVAR,
67
+ SHAPE_FROZEN,
68
+ SHAPE_T_OBJECT,
69
+ SHAPE_OBJ_TOO_COMPLEX,
70
+ };
71
+
72
+ typedef struct {
73
+ /* object shapes */
74
+ rb_shape_t *shape_list;
75
+ rb_shape_t *root_shape;
76
+ shape_id_t next_shape_id;
77
+
78
+ redblack_node_t *shape_cache;
79
+ unsigned int cache_size;
80
+ } rb_shape_tree_t;
81
+ RUBY_EXTERN rb_shape_tree_t *rb_shape_tree_ptr;
82
+
83
+ static inline rb_shape_tree_t *
84
+ rb_current_shape_tree(void)
85
+ {
86
+ return rb_shape_tree_ptr;
87
+ }
88
+ #define GET_SHAPE_TREE() rb_current_shape_tree()
89
+
90
+ static inline shape_id_t
91
+ get_shape_id_from_flags(VALUE obj)
92
+ {
93
+ RUBY_ASSERT(!RB_SPECIAL_CONST_P(obj));
94
+ return (shape_id_t)(SHAPE_MASK & ((RBASIC(obj)->flags) >> SHAPE_FLAG_SHIFT));
95
+ }
96
+
97
+ static inline void
98
+ set_shape_id_in_flags(VALUE obj, shape_id_t shape_id)
99
+ {
100
+ // Ractors are occupying the upper 32 bits of flags, but only in debug mode
101
+ // Object shapes are occupying top bits
102
+ RBASIC(obj)->flags &= SHAPE_FLAG_MASK;
103
+ RBASIC(obj)->flags |= ((VALUE)(shape_id) << SHAPE_FLAG_SHIFT);
104
+ }
105
+
106
+
107
+ #if SHAPE_IN_BASIC_FLAGS
108
+ static inline shape_id_t
109
+ RBASIC_SHAPE_ID(VALUE obj)
110
+ {
111
+ return get_shape_id_from_flags(obj);
112
+ }
113
+
114
+ static inline void
115
+ RBASIC_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id)
116
+ {
117
+ set_shape_id_in_flags(obj, shape_id);
118
+ }
119
+ #endif
120
+
121
+ static inline shape_id_t
122
+ ROBJECT_SHAPE_ID(VALUE obj)
123
+ {
124
+ RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
125
+ return get_shape_id_from_flags(obj);
126
+ }
127
+
128
+ static inline void
129
+ ROBJECT_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id)
130
+ {
131
+ RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
132
+ set_shape_id_in_flags(obj, shape_id);
133
+ }
134
+
135
+ static inline shape_id_t
136
+ RCLASS_SHAPE_ID(VALUE obj)
137
+ {
138
+ RUBY_ASSERT(RB_TYPE_P(obj, T_CLASS) || RB_TYPE_P(obj, T_MODULE));
139
+ return get_shape_id_from_flags(obj);
140
+ }
141
+
142
+ static inline void
143
+ RCLASS_SET_SHAPE_ID(VALUE obj, shape_id_t shape_id)
144
+ {
145
+ RUBY_ASSERT(RB_TYPE_P(obj, T_CLASS) || RB_TYPE_P(obj, T_MODULE));
146
+ set_shape_id_in_flags(obj, shape_id);
147
+ }
148
+
149
+ rb_shape_t * rb_shape_get_root_shape(void);
150
+ int32_t rb_shape_id_offset(void);
151
+
152
+ rb_shape_t * rb_shape_get_parent(rb_shape_t * shape);
153
+
154
+ RUBY_FUNC_EXPORTED rb_shape_t *rb_shape_get_shape_by_id(shape_id_t shape_id);
155
+ RUBY_FUNC_EXPORTED shape_id_t rb_shape_get_shape_id(VALUE obj);
156
+ rb_shape_t * rb_shape_get_next_iv_shape(rb_shape_t * shape, ID id);
157
+ bool rb_shape_get_iv_index(rb_shape_t * shape, ID id, attr_index_t * value);
158
+ bool rb_shape_get_iv_index_with_hint(shape_id_t shape_id, ID id, attr_index_t * value, shape_id_t *shape_id_hint);
159
+ RUBY_FUNC_EXPORTED bool rb_shape_obj_too_complex(VALUE obj);
160
+
161
+ void rb_shape_set_shape(VALUE obj, rb_shape_t* shape);
162
+ rb_shape_t* rb_shape_get_shape(VALUE obj);
163
+ int rb_shape_frozen_shape_p(rb_shape_t* shape);
164
+ rb_shape_t* rb_shape_transition_shape_frozen(VALUE obj);
165
+ bool rb_shape_transition_shape_remove_ivar(VALUE obj, ID id, rb_shape_t *shape, VALUE * removed);
166
+ rb_shape_t* rb_shape_get_next(rb_shape_t* shape, VALUE obj, ID id);
167
+
168
+ rb_shape_t * rb_shape_rebuild_shape(rb_shape_t * initial_shape, rb_shape_t * dest_shape);
169
+
170
+ static inline uint32_t
171
+ ROBJECT_IV_CAPACITY(VALUE obj)
172
+ {
173
+ RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
174
+ // Asking for capacity doesn't make sense when the object is using
175
+ // a hash table for storing instance variables
176
+ RUBY_ASSERT(!rb_shape_obj_too_complex(obj));
177
+ return rb_shape_get_shape_by_id(ROBJECT_SHAPE_ID(obj))->capacity;
178
+ }
179
+
180
+ static inline st_table *
181
+ ROBJECT_IV_HASH(VALUE obj)
182
+ {
183
+ RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
184
+ RUBY_ASSERT(rb_shape_obj_too_complex(obj));
185
+ return (st_table *)ROBJECT(obj)->as.heap.ivptr;
186
+ }
187
+
188
+ static inline void
189
+ ROBJECT_SET_IV_HASH(VALUE obj, const st_table *tbl)
190
+ {
191
+ RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
192
+ RUBY_ASSERT(rb_shape_obj_too_complex(obj));
193
+ ROBJECT(obj)->as.heap.ivptr = (VALUE *)tbl;
194
+ }
195
+
196
+ size_t rb_id_table_size(const struct rb_id_table *tbl);
197
+
198
+ static inline uint32_t
199
+ ROBJECT_IV_COUNT(VALUE obj)
200
+ {
201
+ if (rb_shape_obj_too_complex(obj)) {
202
+ return (uint32_t)rb_st_table_size(ROBJECT_IV_HASH(obj));
203
+ }
204
+ else {
205
+ RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT);
206
+ RUBY_ASSERT(!rb_shape_obj_too_complex(obj));
207
+ return rb_shape_get_shape_by_id(ROBJECT_SHAPE_ID(obj))->next_iv_index;
208
+ }
209
+ }
210
+
211
+ static inline uint32_t
212
+ RBASIC_IV_COUNT(VALUE obj)
213
+ {
214
+ return rb_shape_get_shape_by_id(rb_shape_get_shape_id(obj))->next_iv_index;
215
+ }
216
+
217
+ rb_shape_t *rb_shape_traverse_from_new_root(rb_shape_t *initial_shape, rb_shape_t *orig_shape);
218
+
219
+ bool rb_shape_set_shape_id(VALUE obj, shape_id_t shape_id);
220
+
221
+ VALUE rb_obj_debug_shape(VALUE self, VALUE obj);
222
+
223
+ // For ext/objspace
224
+ RUBY_SYMBOL_EXPORT_BEGIN
225
+ typedef void each_shape_callback(rb_shape_t * shape, void *data);
226
+ void rb_shape_each_shape(each_shape_callback callback, void *data);
227
+ size_t rb_shape_memsize(rb_shape_t *shape);
228
+ size_t rb_shape_edges_count(rb_shape_t *shape);
229
+ size_t rb_shape_depth(rb_shape_t *shape);
230
+ shape_id_t rb_shape_id(rb_shape_t * shape);
231
+ RUBY_SYMBOL_EXPORT_END
232
+
233
+ #endif
@@ -0,0 +1,48 @@
1
+ #ifndef SIPHASH_H
2
+ #define SIPHASH_H 1
3
+ #include <stdlib.h>
4
+ #ifdef HAVE_STDINT_H
5
+ #include <stdint.h>
6
+ #endif
7
+ #ifdef HAVE_INTTYPES_H
8
+ #include <inttypes.h>
9
+ #endif
10
+
11
+ #ifndef HAVE_UINT64_T
12
+ typedef struct {
13
+ uint32_t u32[2];
14
+ } sip_uint64_t;
15
+ #define uint64_t sip_uint64_t
16
+ #else
17
+ typedef uint64_t sip_uint64_t;
18
+ #endif
19
+
20
+ typedef struct {
21
+ int c;
22
+ int d;
23
+ uint64_t v[4];
24
+ uint8_t buf[sizeof(uint64_t)];
25
+ uint8_t buflen;
26
+ uint8_t msglen_byte;
27
+ } sip_state;
28
+
29
+ typedef struct sip_interface_st sip_interface;
30
+
31
+ typedef struct {
32
+ sip_state state[1];
33
+ const sip_interface *methods;
34
+ } sip_hash;
35
+
36
+ sip_hash *sip_hash_new(const uint8_t key[16], int c, int d);
37
+ sip_hash *sip_hash_init(sip_hash *h, const uint8_t key[16], int c, int d);
38
+ int sip_hash_update(sip_hash *h, const uint8_t *data, size_t len);
39
+ int sip_hash_final(sip_hash *h, uint8_t **digest, size_t *len);
40
+ int sip_hash_final_integer(sip_hash *h, uint64_t *digest);
41
+ int sip_hash_digest(sip_hash *h, const uint8_t *data, size_t data_len, uint8_t **digest, size_t *digest_len);
42
+ int sip_hash_digest_integer(sip_hash *h, const uint8_t *data, size_t data_len, uint64_t *digest);
43
+ void sip_hash_free(sip_hash *h);
44
+ void sip_hash_dump(sip_hash *h);
45
+
46
+ NO_SANITIZE("unsigned-integer-overflow", uint64_t sip_hash13(const uint8_t key[16], const uint8_t *data, size_t len));
47
+
48
+ #endif
@@ -0,0 +1,118 @@
1
+ #ifndef RUBY_SYMBOL_H
2
+ #define RUBY_SYMBOL_H 1
3
+ /**********************************************************************
4
+
5
+ symbol.h -
6
+
7
+ $Author$
8
+ created at: Tue Jul 8 15:49:54 JST 2014
9
+
10
+ Copyright (C) 2014 Yukihiro Matsumoto
11
+
12
+ **********************************************************************/
13
+
14
+ #include "id.h"
15
+ #include "ruby/encoding.h"
16
+
17
+ #define DYNAMIC_ID_P(id) (!(id&ID_STATIC_SYM)&&id>tLAST_OP_ID)
18
+ #define STATIC_ID2SYM(id) (((VALUE)(id)<<RUBY_SPECIAL_SHIFT)|SYMBOL_FLAG)
19
+
20
+ #ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
21
+ #define rb_id2sym(id) \
22
+ RB_GNUC_EXTENSION_BLOCK(__builtin_constant_p(id) && !DYNAMIC_ID_P(id) ? \
23
+ STATIC_ID2SYM(id) : rb_id2sym(id))
24
+ #endif
25
+
26
+ struct RSymbol {
27
+ struct RBasic basic;
28
+ st_index_t hashval;
29
+ VALUE fstr;
30
+ ID id;
31
+ };
32
+
33
+ #define RSYMBOL(obj) ((struct RSymbol *)(obj))
34
+
35
+ #define is_notop_id(id) ((id)>tLAST_OP_ID)
36
+ #define is_local_id(id) (id_type(id)==ID_LOCAL)
37
+ #define is_global_id(id) (id_type(id)==ID_GLOBAL)
38
+ #define is_instance_id(id) (id_type(id)==ID_INSTANCE)
39
+ #define is_attrset_id(id) ((id)==idASET||id_type(id)==ID_ATTRSET)
40
+ #define is_const_id(id) (id_type(id)==ID_CONST)
41
+ #define is_class_id(id) (id_type(id)==ID_CLASS)
42
+ #define is_junk_id(id) (id_type(id)==ID_JUNK)
43
+
44
+ static inline int
45
+ id_type(ID id)
46
+ {
47
+ if (is_notop_id(id)) {
48
+ return (int)(id&ID_SCOPE_MASK);
49
+ }
50
+ else {
51
+ return -1;
52
+ }
53
+ }
54
+
55
+ typedef uint32_t rb_id_serial_t;
56
+ static const uint32_t RB_ID_SERIAL_MAX = /* 256M on LP32 */
57
+ UINT32_MAX >>
58
+ ((sizeof(ID)-sizeof(rb_id_serial_t))*CHAR_BIT < RUBY_ID_SCOPE_SHIFT ?
59
+ RUBY_ID_SCOPE_SHIFT : 0);
60
+
61
+ typedef struct {
62
+ rb_id_serial_t last_id;
63
+ st_table *str_sym;
64
+ VALUE ids;
65
+ VALUE dsymbol_fstr_hash;
66
+ } rb_symbols_t;
67
+
68
+ static inline rb_id_serial_t
69
+ rb_id_to_serial(ID id)
70
+ {
71
+ if (is_notop_id(id)) {
72
+ return (rb_id_serial_t)(id >> ID_SCOPE_SHIFT);
73
+ }
74
+ else {
75
+ return (rb_id_serial_t)id;
76
+ }
77
+ }
78
+
79
+ static inline int
80
+ sym_type(VALUE sym)
81
+ {
82
+ ID id;
83
+ if (STATIC_SYM_P(sym)) {
84
+ id = RSHIFT(sym, RUBY_SPECIAL_SHIFT);
85
+ if (id<=tLAST_OP_ID) {
86
+ return -1;
87
+ }
88
+ }
89
+ else {
90
+ id = RSYMBOL(sym)->id;
91
+ }
92
+ return (int)(id&ID_SCOPE_MASK);
93
+ }
94
+
95
+ #define is_local_sym(sym) (sym_type(sym)==ID_LOCAL)
96
+ #define is_global_sym(sym) (sym_type(sym)==ID_GLOBAL)
97
+ #define is_instance_sym(sym) (sym_type(sym)==ID_INSTANCE)
98
+ #define is_attrset_sym(sym) (sym_type(sym)==ID_ATTRSET)
99
+ #define is_const_sym(sym) (sym_type(sym)==ID_CONST)
100
+ #define is_class_sym(sym) (sym_type(sym)==ID_CLASS)
101
+ #define is_junk_sym(sym) (sym_type(sym)==ID_JUNK)
102
+
103
+ RUBY_FUNC_EXPORTED const uint_least32_t ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
104
+
105
+ static inline int
106
+ is_global_name_punct(const int c)
107
+ {
108
+ if (c <= 0x20 || 0x7e < c) return 0;
109
+ return (ruby_global_name_punct_bits[(c - 0x20) / 32] >> (c % 32)) & 1;
110
+ }
111
+
112
+ RUBY_SYMBOL_EXPORT_BEGIN
113
+
114
+ int rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int allowed_attrset);
115
+ size_t rb_sym_immortal_count(void);
116
+
117
+ RUBY_SYMBOL_EXPORT_END
118
+ #endif
@@ -0,0 +1,21 @@
1
+ #ifndef RUBY_THREAD_NONE_H
2
+ #define RUBY_THREAD_NONE_H
3
+
4
+ #define RB_NATIVETHREAD_LOCK_INIT (void)(0)
5
+ #define RB_NATIVETHREAD_COND_INIT (void)(0)
6
+
7
+ // no-thread impl doesn't use TLS but define this to avoid using tls key
8
+ // based implementation in vm.c
9
+ #define RB_THREAD_LOCAL_SPECIFIER
10
+
11
+ struct rb_native_thread {
12
+ void *thread_id; // NULL
13
+ };
14
+
15
+ struct rb_thread_sched_item {};
16
+ struct rb_thread_sched {};
17
+
18
+ RUBY_EXTERN struct rb_execution_context_struct *ruby_current_ec;
19
+ NOINLINE(struct rb_execution_context_struct *rb_current_ec_noinline(void)); // for assertions
20
+
21
+ #endif /* RUBY_THREAD_NONE_H */
@@ -0,0 +1,166 @@
1
+ #ifndef RUBY_THREAD_PTHREAD_H
2
+ #define RUBY_THREAD_PTHREAD_H
3
+ /**********************************************************************
4
+
5
+ thread_pthread.h -
6
+
7
+ $Author$
8
+
9
+ Copyright (C) 2004-2007 Koichi Sasada
10
+
11
+ **********************************************************************/
12
+
13
+ #ifdef HAVE_PTHREAD_NP_H
14
+ #include <pthread_np.h>
15
+ #endif
16
+
17
+ #define RB_NATIVETHREAD_LOCK_INIT PTHREAD_MUTEX_INITIALIZER
18
+ #define RB_NATIVETHREAD_COND_INIT PTHREAD_COND_INITIALIZER
19
+
20
+ // per-Thead scheduler helper data
21
+ struct rb_thread_sched_item {
22
+ struct {
23
+ struct ccan_list_node ubf;
24
+
25
+ // connected to ractor->threads.sched.reqdyq
26
+ // locked by ractor->threads.sched.lock
27
+ struct ccan_list_node readyq;
28
+
29
+ // connected to vm->ractor.sched.timeslice_threads
30
+ // locked by vm->ractor.sched.lock
31
+ struct ccan_list_node timeslice_threads;
32
+
33
+ // connected to vm->ractor.sched.running_threads
34
+ // locked by vm->ractor.sched.lock
35
+ struct ccan_list_node running_threads;
36
+
37
+ // connected to vm->ractor.sched.zombie_threads
38
+ struct ccan_list_node zombie_threads;
39
+ } node;
40
+
41
+ // this data should be protected by timer_th.waiting_lock
42
+ struct {
43
+ enum thread_sched_waiting_flag {
44
+ thread_sched_waiting_none = 0x00,
45
+ thread_sched_waiting_timeout = 0x01,
46
+ thread_sched_waiting_io_read = 0x02,
47
+ thread_sched_waiting_io_write = 0x08,
48
+ thread_sched_waiting_io_force = 0x40, // ignore readable
49
+ } flags;
50
+
51
+ struct {
52
+ // should be compat with hrtime.h
53
+ #ifdef MY_RUBY_BUILD_MAY_TIME_TRAVEL
54
+ int128_t timeout;
55
+ #else
56
+ uint64_t timeout;
57
+ #endif
58
+ int fd; // -1 for timeout only
59
+ int result;
60
+ } data;
61
+
62
+ // connected to timer_th.waiting
63
+ struct ccan_list_node node;
64
+ } waiting_reason;
65
+
66
+ bool finished;
67
+ bool malloc_stack;
68
+ void *context_stack;
69
+ struct coroutine_context *context;
70
+ };
71
+
72
+ struct rb_native_thread {
73
+ rb_atomic_t serial;
74
+ struct rb_vm_struct *vm;
75
+
76
+ rb_nativethread_id_t thread_id;
77
+
78
+ #ifdef RB_THREAD_T_HAS_NATIVE_ID
79
+ int tid;
80
+ #endif
81
+
82
+ struct rb_thread_struct *running_thread;
83
+
84
+ // to control native thread
85
+ #if defined(__GLIBC__) || defined(__FreeBSD__)
86
+ union
87
+ #else
88
+ /*
89
+ * assume the platform condvars are badly implemented and have a
90
+ * "memory" of which mutex they're associated with
91
+ */
92
+ struct
93
+ #endif
94
+ {
95
+ rb_nativethread_cond_t intr; /* th->interrupt_lock */
96
+ rb_nativethread_cond_t readyq; /* use sched->lock */
97
+ } cond;
98
+
99
+ #ifdef USE_SIGALTSTACK
100
+ void *altstack;
101
+ #endif
102
+
103
+ struct coroutine_context *nt_context;
104
+ int dedicated;
105
+
106
+ size_t machine_stack_maxsize;
107
+ };
108
+
109
+ #undef except
110
+ #undef try
111
+ #undef leave
112
+ #undef finally
113
+
114
+ // per-Ractor
115
+ struct rb_thread_sched {
116
+ rb_nativethread_lock_t lock_;
117
+ #if VM_CHECK_MODE
118
+ struct rb_thread_struct *lock_owner;
119
+ #endif
120
+ struct rb_thread_struct *running; // running thread or NULL
121
+ bool is_running;
122
+ bool is_running_timeslice;
123
+ bool enable_mn_threads;
124
+
125
+ struct ccan_list_head readyq;
126
+ int readyq_cnt;
127
+ // ractor scheduling
128
+ struct ccan_list_node grq_node;
129
+ };
130
+
131
+ #ifdef RB_THREAD_LOCAL_SPECIFIER
132
+ NOINLINE(void rb_current_ec_set(struct rb_execution_context_struct *));
133
+ NOINLINE(struct rb_execution_context_struct *rb_current_ec_noinline(void));
134
+
135
+ # ifdef __APPLE__
136
+ // on Darwin, TLS can not be accessed across .so
137
+ NOINLINE(struct rb_execution_context_struct *rb_current_ec(void));
138
+ # else
139
+ RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
140
+
141
+ // for RUBY_DEBUG_LOG()
142
+ RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER rb_atomic_t ruby_nt_serial;
143
+ #define RUBY_NT_SERIAL 1
144
+ # endif
145
+ #else
146
+ typedef pthread_key_t native_tls_key_t;
147
+
148
+ static inline void *
149
+ native_tls_get(native_tls_key_t key)
150
+ {
151
+ // return value should be checked by caller
152
+ return pthread_getspecific(key);
153
+ }
154
+
155
+ static inline void
156
+ native_tls_set(native_tls_key_t key, void *ptr)
157
+ {
158
+ if (UNLIKELY(pthread_setspecific(key, ptr) != 0)) {
159
+ rb_bug("pthread_setspecific error");
160
+ }
161
+ }
162
+
163
+ RUBY_EXTERN native_tls_key_t ruby_current_ec_key;
164
+ #endif
165
+
166
+ #endif /* RUBY_THREAD_PTHREAD_H */
@@ -0,0 +1,58 @@
1
+ #ifndef RUBY_THREAD_WIN32_H
2
+ #define RUBY_THREAD_WIN32_H
3
+ /**********************************************************************
4
+
5
+ thread_win32.h -
6
+
7
+ $Author$
8
+
9
+ Copyright (C) 2004-2007 Koichi Sasada
10
+
11
+ **********************************************************************/
12
+
13
+ /* interface */
14
+
15
+ # ifdef __CYGWIN__
16
+ # undef _WIN32
17
+ # endif
18
+
19
+ #define USE_VM_CLOCK 1
20
+
21
+ WINBASEAPI BOOL WINAPI
22
+ TryEnterCriticalSection(IN OUT LPCRITICAL_SECTION lpCriticalSection);
23
+
24
+ struct rb_native_thread {
25
+ HANDLE thread_id;
26
+ HANDLE interrupt_event;
27
+ };
28
+
29
+ struct rb_thread_sched_item {
30
+ void *vm_stack;
31
+ };
32
+
33
+ struct rb_thread_sched {
34
+ HANDLE lock;
35
+ };
36
+
37
+ typedef DWORD native_tls_key_t; // TLS index
38
+
39
+ static inline void *
40
+ native_tls_get(native_tls_key_t key)
41
+ {
42
+ // return value should be checked by caller.
43
+ return TlsGetValue(key);
44
+ }
45
+
46
+ static inline void
47
+ native_tls_set(native_tls_key_t key, void *ptr)
48
+ {
49
+ if (UNLIKELY(TlsSetValue(key, ptr) == 0)) {
50
+ rb_bug("TlsSetValue() error");
51
+ }
52
+ }
53
+
54
+ RUBY_SYMBOL_EXPORT_BEGIN
55
+ RUBY_EXTERN native_tls_key_t ruby_current_ec_key;
56
+ RUBY_SYMBOL_EXPORT_END
57
+
58
+ #endif /* RUBY_THREAD_WIN32_H */
@@ -0,0 +1,58 @@
1
+ #ifndef RUBY_TIMEV_H
2
+ #define RUBY_TIMEV_H
3
+ #include "ruby/ruby.h"
4
+
5
+ struct vtm {
6
+ VALUE year; /* 2000 for example. Integer. */
7
+ VALUE subsecx; /* 0 <= subsecx < TIME_SCALE. possibly Rational. */
8
+ VALUE utc_offset; /* -3600 as -01:00 for example. possibly Rational. */
9
+ VALUE zone; /* "JST", "EST", "EDT", etc. as String */
10
+ unsigned int yday:9; /* 1..366 */
11
+ unsigned int mon:4; /* 1..12 */
12
+ unsigned int mday:5; /* 1..31 */
13
+ unsigned int hour:5; /* 0..23 */
14
+ unsigned int min:6; /* 0..59 */
15
+ unsigned int sec:6; /* 0..60 */
16
+ unsigned int wday:3; /* 0:Sunday, 1:Monday, ..., 6:Saturday 7:init */
17
+ unsigned int isdst:2; /* 0:StandardTime 1:DayLightSavingTime 3:init */
18
+
19
+ /* Flags for struct time_object */
20
+ unsigned int tzmode:3; /* 0:localtime 1:utc 2:fixoff 3:uninitialized */
21
+ unsigned int tm_got:1;
22
+ };
23
+
24
+ #define TIME_SCALE 1000000000
25
+
26
+ #ifndef TYPEOF_TIMEVAL_TV_SEC
27
+ # define TYPEOF_TIMEVAL_TV_SEC time_t
28
+ #endif
29
+ #ifndef TYPEOF_TIMEVAL_TV_USEC
30
+ # if INT_MAX >= 1000000
31
+ # define TYPEOF_TIMEVAL_TV_USEC int
32
+ # else
33
+ # define TYPEOF_TIMEVAL_TV_USEC long
34
+ # endif
35
+ #endif
36
+
37
+ #if SIZEOF_TIME_T == SIZEOF_LONG
38
+ typedef unsigned long unsigned_time_t;
39
+ #elif SIZEOF_TIME_T == SIZEOF_INT
40
+ typedef unsigned int unsigned_time_t;
41
+ #elif SIZEOF_TIME_T == SIZEOF_LONG_LONG
42
+ typedef unsigned LONG_LONG unsigned_time_t;
43
+ #else
44
+ # error cannot find integer type which size is same as time_t.
45
+ #endif
46
+
47
+ /* strftime.c */
48
+ #ifdef RUBY_ENCODING_H
49
+ VALUE rb_strftime_timespec(const char *format, size_t format_len, rb_encoding *enc,
50
+ VALUE time, const struct vtm *vtm, struct timespec *ts, int gmt);
51
+ VALUE rb_strftime(const char *format, size_t format_len, rb_encoding *enc,
52
+ VALUE time, const struct vtm *vtm, VALUE timev, int gmt);
53
+ #endif
54
+
55
+ /* time.c */
56
+ VALUE rb_time_zone_abbreviation(VALUE zone, VALUE time);
57
+
58
+ #endif