debase-ruby_core_source 3.3.0 → 3.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (315) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/Rakefile +2 -1
  4. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/ast.h +4612 -0
  5. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/defines.h +94 -0
  6. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/diagnostic.h +297 -0
  7. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/encoding.h +248 -0
  8. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/extension.h +18 -0
  9. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/node.h +57 -0
  10. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/options.h +204 -0
  11. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/pack.h +152 -0
  12. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/parser.h +716 -0
  13. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/prettyprint.h +26 -0
  14. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/prism.h +272 -0
  15. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/regexp.h +33 -0
  16. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_buffer.h +146 -0
  17. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_char.h +205 -0
  18. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_constant_pool.h +191 -0
  19. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_list.h +97 -0
  20. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_memchr.h +29 -0
  21. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_newline_list.h +104 -0
  22. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_state_stack.h +42 -0
  23. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_string.h +150 -0
  24. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_string_list.h +44 -0
  25. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_strncasecmp.h +32 -0
  26. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_strpbrk.h +43 -0
  27. data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/version.h +29 -0
  28. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/addr2line.h +22 -0
  29. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/builtin.h +117 -0
  30. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/build_assert/build_assert.h +40 -0
  31. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/check_type/check_type.h +63 -0
  32. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/container_of/container_of.h +142 -0
  33. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/list/list.h +791 -0
  34. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ccan/str/str.h +17 -0
  35. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/constant.h +53 -0
  36. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/darray.h +246 -0
  37. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/debug_counter.h +423 -0
  38. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/dln.h +32 -0
  39. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/encindex.h +70 -0
  40. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/eval_intern.h +343 -0
  41. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/hrtime.h +227 -0
  42. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/id.h +343 -0
  43. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/id_table.h +39 -0
  44. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/insns.inc +251 -0
  45. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/insns_info.inc +9215 -0
  46. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/array.h +151 -0
  47. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/basic_operators.h +63 -0
  48. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/bignum.h +244 -0
  49. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/bits.h +568 -0
  50. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/class.h +277 -0
  51. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/cmdlineopt.h +65 -0
  52. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/compar.h +29 -0
  53. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/compile.h +34 -0
  54. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/compilers.h +107 -0
  55. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/complex.h +29 -0
  56. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/cont.h +35 -0
  57. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/dir.h +16 -0
  58. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/enc.h +19 -0
  59. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/encoding.h +35 -0
  60. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/enum.h +18 -0
  61. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/enumerator.h +21 -0
  62. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/error.h +216 -0
  63. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/eval.h +33 -0
  64. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/file.h +38 -0
  65. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/fixnum.h +184 -0
  66. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/gc.h +364 -0
  67. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/hash.h +191 -0
  68. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/imemo.h +240 -0
  69. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/inits.h +50 -0
  70. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/io.h +137 -0
  71. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/load.h +18 -0
  72. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/loadpath.h +16 -0
  73. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/math.h +23 -0
  74. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/missing.h +18 -0
  75. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/numeric.h +273 -0
  76. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/object.h +62 -0
  77. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/parse.h +108 -0
  78. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/proc.h +30 -0
  79. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/process.h +124 -0
  80. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/ractor.h +6 -0
  81. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/random.h +17 -0
  82. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/range.h +40 -0
  83. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/rational.h +71 -0
  84. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/re.h +28 -0
  85. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/ruby_parser.h +69 -0
  86. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/sanitizers.h +186 -0
  87. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/serial.h +23 -0
  88. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/signal.h +25 -0
  89. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/static_assert.h +16 -0
  90. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/string.h +160 -0
  91. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/struct.h +127 -0
  92. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/symbol.h +45 -0
  93. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/thread.h +78 -0
  94. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/time.h +34 -0
  95. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/transcode.h +23 -0
  96. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/util.h +27 -0
  97. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/variable.h +72 -0
  98. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/vm.h +136 -0
  99. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal/warnings.h +16 -0
  100. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/internal.h +112 -0
  101. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/iseq.h +338 -0
  102. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/known_errors.inc +791 -0
  103. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/method.h +254 -0
  104. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/node.h +128 -0
  105. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/node_name.inc +212 -0
  106. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/optinsn.inc +128 -0
  107. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/optunifs.inc +43 -0
  108. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parse.h +243 -0
  109. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_bits.h +564 -0
  110. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_node.h +32 -0
  111. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_st.h +162 -0
  112. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/parser_value.h +106 -0
  113. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/ast.h +4612 -0
  114. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/defines.h +94 -0
  115. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/diagnostic.h +297 -0
  116. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/encoding.h +248 -0
  117. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/extension.h +18 -0
  118. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/node.h +57 -0
  119. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/options.h +204 -0
  120. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/pack.h +152 -0
  121. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/parser.h +716 -0
  122. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/prettyprint.h +26 -0
  123. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/prism.h +272 -0
  124. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/regexp.h +33 -0
  125. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_buffer.h +146 -0
  126. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_char.h +205 -0
  127. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_constant_pool.h +191 -0
  128. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_list.h +97 -0
  129. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_memchr.h +29 -0
  130. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_newline_list.h +104 -0
  131. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_state_stack.h +42 -0
  132. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_string.h +150 -0
  133. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_string_list.h +44 -0
  134. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_strncasecmp.h +32 -0
  135. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/util/pm_strpbrk.h +43 -0
  136. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism/version.h +29 -0
  137. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/prism_compile.h +29 -0
  138. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/probes_helper.h +42 -0
  139. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ractor_core.h +393 -0
  140. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/regenc.h +254 -0
  141. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/regint.h +1006 -0
  142. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/regparse.h +371 -0
  143. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/revision.h +5 -0
  144. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/rjit.h +101 -0
  145. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/rjit_c.h +164 -0
  146. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ruby_assert.h +14 -0
  147. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/ruby_atomic.h +23 -0
  148. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/rubyparser.h +1405 -0
  149. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/shape.h +233 -0
  150. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/siphash.h +48 -0
  151. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/symbol.h +118 -0
  152. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/thread_none.h +21 -0
  153. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/thread_pthread.h +166 -0
  154. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/thread_win32.h +58 -0
  155. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/timev.h +58 -0
  156. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/transcode_data.h +138 -0
  157. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/variable.h +39 -0
  158. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/version.h +69 -0
  159. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm.inc +5436 -0
  160. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_call_iseq_optimized.inc +244 -0
  161. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_callinfo.h +614 -0
  162. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_core.h +2202 -0
  163. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_debug.h +122 -0
  164. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_exec.h +199 -0
  165. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_insnhelper.h +261 -0
  166. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_opts.h +67 -0
  167. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vm_sync.h +137 -0
  168. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/vmtc.inc +245 -0
  169. data/lib/debase/ruby_core_source/ruby-3.3.5-p100/yjit.h +72 -0
  170. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/addr2line.h +22 -0
  171. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/builtin.h +119 -0
  172. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/build_assert/build_assert.h +40 -0
  173. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/check_type/check_type.h +63 -0
  174. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/container_of/container_of.h +142 -0
  175. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/list/list.h +791 -0
  176. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ccan/str/str.h +17 -0
  177. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/constant.h +53 -0
  178. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/darray.h +191 -0
  179. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/debug_counter.h +423 -0
  180. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/dln.h +34 -0
  181. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/encindex.h +70 -0
  182. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/eval_intern.h +324 -0
  183. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/hrtime.h +237 -0
  184. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/id.h +343 -0
  185. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/id_table.h +39 -0
  186. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/insns.inc +259 -0
  187. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/insns_info.inc +9530 -0
  188. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/array.h +151 -0
  189. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/basic_operators.h +63 -0
  190. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/bignum.h +244 -0
  191. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/bits.h +568 -0
  192. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/class.h +283 -0
  193. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/cmdlineopt.h +65 -0
  194. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/compar.h +29 -0
  195. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/compile.h +34 -0
  196. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/compilers.h +107 -0
  197. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/complex.h +29 -0
  198. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/cont.h +35 -0
  199. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/dir.h +16 -0
  200. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/enc.h +19 -0
  201. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/encoding.h +36 -0
  202. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/enum.h +18 -0
  203. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/enumerator.h +21 -0
  204. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/error.h +216 -0
  205. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/eval.h +33 -0
  206. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/file.h +38 -0
  207. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/fixnum.h +184 -0
  208. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/gc.h +334 -0
  209. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/hash.h +191 -0
  210. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/imemo.h +260 -0
  211. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/inits.h +47 -0
  212. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/io.h +140 -0
  213. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/load.h +18 -0
  214. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/loadpath.h +16 -0
  215. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/math.h +23 -0
  216. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/missing.h +19 -0
  217. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/numeric.h +274 -0
  218. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/object.h +63 -0
  219. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/parse.h +117 -0
  220. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/proc.h +30 -0
  221. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/process.h +124 -0
  222. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/ractor.h +6 -0
  223. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/random.h +17 -0
  224. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/range.h +40 -0
  225. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/rational.h +71 -0
  226. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/re.h +28 -0
  227. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/ruby_parser.h +102 -0
  228. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/sanitizers.h +297 -0
  229. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/serial.h +23 -0
  230. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/signal.h +24 -0
  231. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/st.h +11 -0
  232. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/static_assert.h +16 -0
  233. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/string.h +182 -0
  234. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/struct.h +127 -0
  235. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/symbol.h +45 -0
  236. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/thread.h +79 -0
  237. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/time.h +34 -0
  238. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/transcode.h +23 -0
  239. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/util.h +27 -0
  240. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/variable.h +72 -0
  241. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/vm.h +137 -0
  242. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/warnings.h +16 -0
  243. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal.h +108 -0
  244. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/iseq.h +340 -0
  245. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/known_errors.inc +1419 -0
  246. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/method.h +255 -0
  247. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/node.h +111 -0
  248. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/node_name.inc +224 -0
  249. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/optinsn.inc +128 -0
  250. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/optunifs.inc +43 -0
  251. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parse.h +243 -0
  252. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_bits.h +564 -0
  253. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_node.h +32 -0
  254. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_st.h +162 -0
  255. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parser_value.h +106 -0
  256. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/ast.h +6245 -0
  257. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/defines.h +206 -0
  258. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/diagnostic.h +433 -0
  259. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/encoding.h +283 -0
  260. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/extension.h +19 -0
  261. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/node.h +150 -0
  262. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/options.h +305 -0
  263. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/pack.h +163 -0
  264. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/parser.h +891 -0
  265. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/prettyprint.h +34 -0
  266. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/prism.h +347 -0
  267. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/regexp.h +33 -0
  268. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/static_literals.h +120 -0
  269. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_buffer.h +218 -0
  270. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_char.h +205 -0
  271. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_constant_pool.h +226 -0
  272. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_integer.h +119 -0
  273. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_list.h +97 -0
  274. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_memchr.h +29 -0
  275. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_newline_list.h +102 -0
  276. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_string.h +174 -0
  277. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_string_list.h +44 -0
  278. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_strncasecmp.h +32 -0
  279. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_strpbrk.h +46 -0
  280. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/version.h +29 -0
  281. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism_compile.h +88 -0
  282. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/probes_helper.h +42 -0
  283. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ractor_core.h +393 -0
  284. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regenc.h +254 -0
  285. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regint.h +1010 -0
  286. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regparse.h +371 -0
  287. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/revision.h +5 -0
  288. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rjit.h +101 -0
  289. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rjit_c.h +165 -0
  290. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ruby_assert.h +14 -0
  291. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ruby_atomic.h +23 -0
  292. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rubyparser.h +1430 -0
  293. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/shape.h +233 -0
  294. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/siphash.h +48 -0
  295. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/symbol.h +118 -0
  296. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_none.h +21 -0
  297. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_pthread.h +166 -0
  298. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_win32.h +58 -0
  299. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/timev.h +58 -0
  300. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/transcode_data.h +138 -0
  301. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/variable.h +39 -0
  302. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/version.h +69 -0
  303. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm.inc +5643 -0
  304. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_call_iseq_optimized.inc +244 -0
  305. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_callinfo.h +605 -0
  306. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_core.h +2236 -0
  307. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_debug.h +124 -0
  308. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_exec.h +199 -0
  309. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_insnhelper.h +272 -0
  310. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_opts.h +67 -0
  311. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_sync.h +137 -0
  312. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vmtc.inc +253 -0
  313. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/yjit.h +79 -0
  314. data/lib/debase/ruby_core_source/version.rb +1 -1
  315. metadata +316 -6
@@ -0,0 +1,124 @@
1
+ #ifndef RUBY_DEBUG_H
2
+ #define RUBY_DEBUG_H
3
+ /**********************************************************************
4
+
5
+ vm_debug.h - YARV Debug function interface
6
+
7
+ $Author$
8
+ created at: 04/08/25 02:33:49 JST
9
+
10
+ Copyright (C) 2004-2007 Koichi Sasada
11
+
12
+ **********************************************************************/
13
+
14
+ #include "ruby/ruby.h"
15
+
16
+ RUBY_SYMBOL_EXPORT_BEGIN
17
+
18
+ #define dpv(h,v) ruby_debug_print_value(-1, 0, (h), (v))
19
+ #define dp(v) ruby_debug_print_value(-1, 0, "", (v))
20
+ #define dpi(i) ruby_debug_print_id(-1, 0, "", (i))
21
+ #define dpn(n) ruby_debug_print_node(-1, 0, "", (n))
22
+
23
+ struct RNode;
24
+
25
+ VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v);
26
+ void ruby_debug_print_v(VALUE v);
27
+ ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id);
28
+ struct RNode *ruby_debug_print_node(int level, int debug_level, const char *header, const struct RNode *node);
29
+ void ruby_debug_print_n(const struct RNode *node);
30
+ int ruby_debug_print_indent(int level, int debug_level, int indent_level);
31
+ void ruby_debug_gc_check_func(void);
32
+ void ruby_set_debug_option(const char *str);
33
+
34
+ RUBY_SYMBOL_EXPORT_END
35
+
36
+ #ifndef USE_RUBY_DEBUG_LOG
37
+ #define USE_RUBY_DEBUG_LOG 0
38
+ #endif
39
+
40
+ /* RUBY_DEBUG_LOG: Logging debug information mechanism
41
+ *
42
+ * This feature provides a mechanism to store logging information
43
+ * to a file, stderr or memory space with simple macros.
44
+ *
45
+ * The following information will be stored.
46
+ * * (1) __FILE__, __LINE__ in C
47
+ * * (2) __FILE__, __LINE__ in Ruby
48
+ * * (3) __func__ in C (message title)
49
+ * * (4) given string with sprintf format
50
+ * * (5) Thread number (if multiple threads are running)
51
+ *
52
+ * This feature is enabled only USE_RUBY_DEBUG_LOG is enabled.
53
+ * Release version should not enable it.
54
+ *
55
+ * Running with the `RUBY_DEBUG_LOG` environment variable enables
56
+ * this feature.
57
+ *
58
+ * # logging into a file
59
+ * RUBY_DEBUG_LOG=/path/to/file STDERR
60
+ *
61
+ * # logging into STDERR
62
+ * RUBY_DEBUG_LOG=stderr
63
+ *
64
+ * # logging into memory space (check with a debugger)
65
+ * # It will help if the timing is important.
66
+ * RUBY_DEBUG_LOG=mem
67
+ *
68
+ * RUBY_DEBUG_LOG_FILTER environment variable can specify the filter string.
69
+ * If "(3) __func__ in C (message title)" contains the specified string, the
70
+ * information will be stored (example: RUBY_DEBUG_LOG_FILTER=str will enable
71
+ * only on str related information).
72
+ *
73
+ * In a MRI source code, you can use the following macros:
74
+ * * RUBY_DEBUG_LOG(fmt, ...): Above (1) to (4) will be logged.
75
+ * * RUBY_DEBUG_LOG2(file, line, fmt, ...):
76
+ * Same as RUBY_DEBUG_LOG(), but (1) will be replaced with given file, line.
77
+ */
78
+
79
+ extern enum ruby_debug_log_mode {
80
+ ruby_debug_log_disabled = 0x00,
81
+ ruby_debug_log_memory = 0x01,
82
+ ruby_debug_log_stderr = 0x02,
83
+ ruby_debug_log_file = 0x04,
84
+ } ruby_debug_log_mode;
85
+
86
+ RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 4, 5)
87
+ void ruby_debug_log(const char *file, int line, const char *func_name, const char *fmt, ...);
88
+ void ruby_debug_log_print(unsigned int n);
89
+ bool ruby_debug_log_filter(const char *func_name, const char *file_name);
90
+
91
+ #if RBIMPL_COMPILER_IS(GCC) && defined(__OPTIMIZE__)
92
+ # define ruby_debug_log(...) \
93
+ RB_GNUC_EXTENSION_BLOCK( \
94
+ RBIMPL_WARNING_PUSH(); \
95
+ RBIMPL_WARNING_IGNORED(-Wformat-zero-length); \
96
+ ruby_debug_log(__VA_ARGS__); \
97
+ RBIMPL_WARNING_POP())
98
+ #endif
99
+
100
+ // convenient macro to log even if the USE_RUBY_DEBUG_LOG macro is not specified.
101
+ // You can use this macro for temporary usage (you should not commit it).
102
+ #define _RUBY_DEBUG_LOG(...) ruby_debug_log(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__)
103
+
104
+ #if USE_RUBY_DEBUG_LOG
105
+ # define RUBY_DEBUG_LOG_ENABLED(func_name, file_name) \
106
+ (ruby_debug_log_mode && ruby_debug_log_filter(func_name, file_name))
107
+
108
+ #define RUBY_DEBUG_LOG(...) do { \
109
+ if (RUBY_DEBUG_LOG_ENABLED(RUBY_FUNCTION_NAME_STRING, __FILE__)) \
110
+ ruby_debug_log(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__); \
111
+ } while (0)
112
+
113
+ #define RUBY_DEBUG_LOG2(file, line, ...) do { \
114
+ if (RUBY_DEBUG_LOG_ENABLED(RUBY_FUNCTION_NAME_STRING, file)) \
115
+ ruby_debug_log(file, line, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__); \
116
+ } while (0)
117
+
118
+ #else // USE_RUBY_DEBUG_LOG
119
+ // do nothing
120
+ #define RUBY_DEBUG_LOG(...)
121
+ #define RUBY_DEBUG_LOG2(file, line, ...)
122
+ #endif // USE_RUBY_DEBUG_LOG
123
+
124
+ #endif /* RUBY_DEBUG_H */
@@ -0,0 +1,199 @@
1
+ #ifndef RUBY_VM_EXEC_H
2
+ #define RUBY_VM_EXEC_H
3
+ /**********************************************************************
4
+
5
+ vm.h -
6
+
7
+ $Author$
8
+ created at: 04/01/01 16:56:59 JST
9
+
10
+ Copyright (C) 2004-2007 Koichi Sasada
11
+
12
+ **********************************************************************/
13
+
14
+ typedef long OFFSET;
15
+ typedef unsigned long lindex_t;
16
+ typedef VALUE GENTRY;
17
+ typedef rb_iseq_t *ISEQ;
18
+
19
+ #if VMDEBUG > 0
20
+ #define debugs printf
21
+ #define DEBUG_ENTER_INSN(insn) \
22
+ rb_vmdebug_debug_print_pre(ec, GET_CFP(), GET_PC());
23
+
24
+ #define SC_REGS()
25
+
26
+ #define DEBUG_END_INSN() \
27
+ rb_vmdebug_debug_print_post(ec, GET_CFP() SC_REGS());
28
+
29
+ #else
30
+
31
+ #define debugs
32
+ #define DEBUG_ENTER_INSN(insn)
33
+ #define DEBUG_END_INSN()
34
+ #endif
35
+
36
+ #define throwdebug if(0)ruby_debug_printf
37
+ /* #define throwdebug ruby_debug_printf */
38
+
39
+ /************************************************/
40
+ #if defined(DISPATCH_XXX)
41
+ error !
42
+ /************************************************/
43
+ #elif OPT_CALL_THREADED_CODE
44
+
45
+ #define LABEL(x) insn_func_##x
46
+ #define ELABEL(x)
47
+ #define LABEL_PTR(x) &LABEL(x)
48
+
49
+ #define INSN_ENTRY(insn) \
50
+ static rb_control_frame_t * \
51
+ FUNC_FASTCALL(LABEL(insn))(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp) {
52
+
53
+ #define END_INSN(insn) return reg_cfp;}
54
+
55
+ #define NEXT_INSN() return reg_cfp;
56
+
57
+ #define START_OF_ORIGINAL_INSN(x) /* ignore */
58
+ #define DISPATCH_ORIGINAL_INSN(x) return LABEL(x)(ec, reg_cfp);
59
+
60
+ /************************************************/
61
+ #elif OPT_TOKEN_THREADED_CODE || OPT_DIRECT_THREADED_CODE
62
+ /* threaded code with gcc */
63
+
64
+ #define LABEL(x) INSN_LABEL_##x
65
+ #define ELABEL(x) INSN_ELABEL_##x
66
+ #define LABEL_PTR(x) RB_GNUC_EXTENSION(&&LABEL(x))
67
+
68
+ #define INSN_ENTRY_SIG(insn) \
69
+ if (0) { \
70
+ ruby_debug_printf("exec: %s@(%"PRIdPTRDIFF", %"PRIdPTRDIFF")@%s:%u\n", #insn, \
71
+ (reg_pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded), \
72
+ (reg_cfp->pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded), \
73
+ RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), \
74
+ rb_iseq_line_no(reg_cfp->iseq, reg_pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded)); \
75
+ }
76
+
77
+ #define INSN_DISPATCH_SIG(insn)
78
+
79
+ #define INSN_ENTRY(insn) \
80
+ LABEL(insn): \
81
+ INSN_ENTRY_SIG(insn); \
82
+
83
+ /**********************************/
84
+ #if OPT_DIRECT_THREADED_CODE
85
+
86
+ /* for GCC 3.4.x */
87
+ #define TC_DISPATCH(insn) \
88
+ INSN_DISPATCH_SIG(insn); \
89
+ RB_GNUC_EXTENSION_BLOCK(goto *(void const *)GET_CURRENT_INSN()); \
90
+ ;
91
+
92
+ #else
93
+ /* token threaded code */
94
+
95
+ /* dispatcher */
96
+ #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && __GNUC__ == 3
97
+ #define DISPATCH_ARCH_DEPEND_WAY(addr) \
98
+ __asm__ __volatile__("jmp *%0;\t# -- inserted by vm.h\t[length = 2]" : : "r" (addr))
99
+
100
+ #else
101
+ #define DISPATCH_ARCH_DEPEND_WAY(addr) \
102
+ /* do nothing */
103
+ #endif
104
+ #define TC_DISPATCH(insn) \
105
+ DISPATCH_ARCH_DEPEND_WAY(insns_address_table[GET_CURRENT_INSN()]); \
106
+ INSN_DISPATCH_SIG(insn); \
107
+ RB_GNUC_EXTENSION_BLOCK(goto *insns_address_table[GET_CURRENT_INSN()]); \
108
+ rb_bug("tc error");
109
+
110
+ #endif /* OPT_DIRECT_THREADED_CODE */
111
+
112
+ #define END_INSN(insn) \
113
+ DEBUG_END_INSN(); \
114
+ TC_DISPATCH(insn);
115
+
116
+ #define INSN_DISPATCH() \
117
+ TC_DISPATCH(__START__) \
118
+ {
119
+
120
+ #define END_INSNS_DISPATCH() \
121
+ rb_bug("unknown insn: %"PRIdVALUE, GET_CURRENT_INSN()); \
122
+ } /* end of while loop */ \
123
+
124
+ #define NEXT_INSN() TC_DISPATCH(__NEXT_INSN__)
125
+
126
+ /************************************************/
127
+ #else /* no threaded code */
128
+ /* most common method */
129
+
130
+ #define INSN_ENTRY(insn) \
131
+ case BIN(insn):
132
+
133
+ #define END_INSN(insn) \
134
+ DEBUG_END_INSN(); \
135
+ break;
136
+
137
+ #define INSN_DISPATCH() \
138
+ while (1) { \
139
+ switch (GET_CURRENT_INSN()) {
140
+
141
+ #define END_INSNS_DISPATCH() \
142
+ default: \
143
+ SDR(); \
144
+ rb_bug("unknown insn: %ld", GET_CURRENT_INSN()); \
145
+ } /* end of switch */ \
146
+ } /* end of while loop */ \
147
+
148
+ #define NEXT_INSN() goto first
149
+
150
+ #endif
151
+
152
+ #ifndef START_OF_ORIGINAL_INSN
153
+ #define START_OF_ORIGINAL_INSN(x) if (0) goto start_of_##x; start_of_##x:
154
+ #define DISPATCH_ORIGINAL_INSN(x) goto start_of_##x;
155
+ #endif
156
+
157
+ #define VM_SP_CNT(ec, sp) ((sp) - (ec)->vm_stack)
158
+
159
+ #if OPT_CALL_THREADED_CODE
160
+ #define THROW_EXCEPTION(exc) do { \
161
+ ec->errinfo = (VALUE)(exc); \
162
+ return 0; \
163
+ } while (0)
164
+ #else
165
+ #define THROW_EXCEPTION(exc) return (VALUE)(exc)
166
+ #endif
167
+
168
+ // Run the interpreter from the JIT
169
+ #define VM_EXEC(ec, val) do { \
170
+ if (UNDEF_P(val)) { \
171
+ VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH); \
172
+ val = vm_exec(ec); \
173
+ } \
174
+ } while (0)
175
+
176
+ // Run the JIT from the interpreter
177
+ #define JIT_EXEC(ec, val) do { \
178
+ rb_jit_func_t func; \
179
+ /* don't run tailcalls since that breaks FINISH */ \
180
+ if (UNDEF_P(val) && GET_CFP() != ec->cfp && (func = jit_compile(ec))) { \
181
+ val = func(ec, ec->cfp); \
182
+ if (ec->tag->state) THROW_EXCEPTION(val); \
183
+ } \
184
+ } while (0)
185
+
186
+ #define SCREG(r) (reg_##r)
187
+
188
+ #define VM_DEBUG_STACKOVERFLOW 0
189
+
190
+ #if VM_DEBUG_STACKOVERFLOW
191
+ #define CHECK_VM_STACK_OVERFLOW_FOR_INSN CHECK_VM_STACK_OVERFLOW
192
+ #else
193
+ #define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp, margin)
194
+ #endif
195
+
196
+ #define INSN_LABEL2(insn, name) INSN_LABEL_ ## insn ## _ ## name
197
+ #define INSN_LABEL(x) INSN_LABEL2(NAME_OF_CURRENT_INSN, x)
198
+
199
+ #endif /* RUBY_VM_EXEC_H */
@@ -0,0 +1,272 @@
1
+ #ifndef RUBY_INSNHELPER_H
2
+ #define RUBY_INSNHELPER_H
3
+ /**********************************************************************
4
+
5
+ insnhelper.h - helper macros to implement each instructions
6
+
7
+ $Author$
8
+ created at: 04/01/01 15:50:34 JST
9
+
10
+ Copyright (C) 2004-2007 Koichi Sasada
11
+
12
+ **********************************************************************/
13
+
14
+ RUBY_EXTERN VALUE ruby_vm_const_missing_count;
15
+ RUBY_EXTERN rb_serial_t ruby_vm_constant_cache_invalidations;
16
+ RUBY_EXTERN rb_serial_t ruby_vm_constant_cache_misses;
17
+ RUBY_EXTERN rb_serial_t ruby_vm_global_cvar_state;
18
+
19
+ #if USE_YJIT || USE_RJIT // We want vm_insns_count on any JIT-enabled build.
20
+ // Increment vm_insns_count for --yjit-stats. We increment this even when
21
+ // --yjit or --yjit-stats is not used because branching to skip it is slower.
22
+ // We also don't use ATOMIC_INC for performance, allowing inaccuracy on Ractors.
23
+ #define JIT_COLLECT_USAGE_INSN(insn) rb_vm_insns_count++
24
+ #else
25
+ #define JIT_COLLECT_USAGE_INSN(insn) // none
26
+ #endif
27
+
28
+ #if VM_COLLECT_USAGE_DETAILS
29
+ #define COLLECT_USAGE_INSN(insn) vm_collect_usage_insn(insn)
30
+ #define COLLECT_USAGE_OPERAND(insn, n, op) vm_collect_usage_operand((insn), (n), ((VALUE)(op)))
31
+ #define COLLECT_USAGE_REGISTER(reg, s) vm_collect_usage_register((reg), (s))
32
+ #else
33
+ #define COLLECT_USAGE_INSN(insn) JIT_COLLECT_USAGE_INSN(insn)
34
+ #define COLLECT_USAGE_OPERAND(insn, n, op) // none
35
+ #define COLLECT_USAGE_REGISTER(reg, s) // none
36
+ #endif
37
+
38
+ /**********************************************************/
39
+ /* deal with stack */
40
+ /**********************************************************/
41
+
42
+ #define PUSH(x) (SET_SV(x), INC_SP(1))
43
+ #define TOPN(n) (*(GET_SP()-(n)-1))
44
+ #define POPN(n) (DEC_SP(n))
45
+ #define POP() (DEC_SP(1))
46
+ #define STACK_ADDR_FROM_TOP(n) (GET_SP()-(n))
47
+
48
+ /**********************************************************/
49
+ /* deal with registers */
50
+ /**********************************************************/
51
+
52
+ #define VM_REG_CFP (reg_cfp)
53
+ #define VM_REG_PC (VM_REG_CFP->pc)
54
+ #define VM_REG_SP (VM_REG_CFP->sp)
55
+ #define VM_REG_EP (VM_REG_CFP->ep)
56
+
57
+ #define RESTORE_REGS() do { \
58
+ VM_REG_CFP = ec->cfp; \
59
+ } while (0)
60
+
61
+ typedef enum call_type {
62
+ CALL_PUBLIC,
63
+ CALL_FCALL,
64
+ CALL_VCALL,
65
+ CALL_PUBLIC_KW,
66
+ CALL_FCALL_KW
67
+ } call_type;
68
+
69
+ #if VM_COLLECT_USAGE_DETAILS
70
+ enum vm_regan_regtype {
71
+ VM_REGAN_PC = 0,
72
+ VM_REGAN_SP = 1,
73
+ VM_REGAN_EP = 2,
74
+ VM_REGAN_CFP = 3,
75
+ VM_REGAN_SELF = 4,
76
+ VM_REGAN_ISEQ = 5
77
+ };
78
+ enum vm_regan_acttype {
79
+ VM_REGAN_ACT_GET = 0,
80
+ VM_REGAN_ACT_SET = 1
81
+ };
82
+
83
+ #define COLLECT_USAGE_REGISTER_HELPER(a, b, v) \
84
+ (COLLECT_USAGE_REGISTER((VM_REGAN_##a), (VM_REGAN_ACT_##b)), (v))
85
+ #else
86
+ #define COLLECT_USAGE_REGISTER_HELPER(a, b, v) (v)
87
+ #endif
88
+
89
+ /* PC */
90
+ #define GET_PC() (COLLECT_USAGE_REGISTER_HELPER(PC, GET, VM_REG_PC))
91
+ #define SET_PC(x) (VM_REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x))))
92
+ #define GET_CURRENT_INSN() (*GET_PC())
93
+ #define GET_OPERAND(n) (GET_PC()[(n)])
94
+ #define ADD_PC(n) (SET_PC(VM_REG_PC + (n)))
95
+ #define JUMP(dst) (SET_PC(VM_REG_PC + (dst)))
96
+
97
+ /* frame pointer, environment pointer */
98
+ #define GET_CFP() (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, VM_REG_CFP))
99
+ #define GET_EP() (COLLECT_USAGE_REGISTER_HELPER(EP, GET, VM_REG_EP))
100
+ #define SET_EP(x) (VM_REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x))))
101
+ #define GET_LEP() (VM_EP_LEP(GET_EP()))
102
+
103
+ /* SP */
104
+ #define GET_SP() (COLLECT_USAGE_REGISTER_HELPER(SP, GET, VM_REG_SP))
105
+ #define SET_SP(x) (VM_REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
106
+ #define INC_SP(x) (VM_REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
107
+ #define DEC_SP(x) (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
108
+ #define SET_SV(x) (*GET_SP() = rb_ractor_confirm_belonging(x))
109
+ /* set current stack value as x */
110
+
111
+ /* instruction sequence C struct */
112
+ #define GET_ISEQ() (GET_CFP()->iseq)
113
+
114
+ /**********************************************************/
115
+ /* deal with variables */
116
+ /**********************************************************/
117
+
118
+ #define GET_PREV_EP(ep) ((VALUE *)((ep)[VM_ENV_DATA_INDEX_SPECVAL] & ~0x03))
119
+
120
+ /**********************************************************/
121
+ /* deal with values */
122
+ /**********************************************************/
123
+
124
+ #define GET_SELF() (COLLECT_USAGE_REGISTER_HELPER(SELF, GET, GET_CFP()->self))
125
+
126
+ /**********************************************************/
127
+ /* deal with control flow 2: method/iterator */
128
+ /**********************************************************/
129
+
130
+ /* set fastpath when cached method is *NOT* protected
131
+ * because inline method cache does not care about receiver.
132
+ */
133
+
134
+ static inline void
135
+ CC_SET_FASTPATH(const struct rb_callcache *cc, vm_call_handler func, bool enabled)
136
+ {
137
+ if (LIKELY(enabled)) {
138
+ vm_cc_call_set(cc, func);
139
+ }
140
+ }
141
+
142
+ #define GET_BLOCK_HANDLER() (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL])
143
+
144
+ /**********************************************************/
145
+ /* deal with control flow 3: exception */
146
+ /**********************************************************/
147
+
148
+
149
+ /**********************************************************/
150
+ /* deal with stack canary */
151
+ /**********************************************************/
152
+
153
+ #if VM_CHECK_MODE > 0
154
+ #define SETUP_CANARY(cond) \
155
+ VALUE *canary = 0; \
156
+ if (cond) { \
157
+ canary = GET_SP(); \
158
+ SET_SV(vm_stack_canary); \
159
+ } \
160
+ else {\
161
+ SET_SV(Qfalse); /* cleanup */ \
162
+ }
163
+ #define CHECK_CANARY(cond, insn) \
164
+ if (cond) { \
165
+ if (*canary == vm_stack_canary) { \
166
+ *canary = Qfalse; /* cleanup */ \
167
+ } \
168
+ else { \
169
+ rb_vm_canary_is_found_dead(insn, *canary); \
170
+ } \
171
+ }
172
+ #else
173
+ #define SETUP_CANARY(cond) if (cond) {} else {}
174
+ #define CHECK_CANARY(cond, insn) if (cond) {(void)(insn);}
175
+ #endif
176
+
177
+ /**********************************************************/
178
+ /* others */
179
+ /**********************************************************/
180
+
181
+ #define CALL_SIMPLE_METHOD() do { \
182
+ rb_snum_t insn_width = attr_width_opt_send_without_block(0); \
183
+ ADD_PC(-insn_width); \
184
+ DISPATCH_ORIGINAL_INSN(opt_send_without_block); \
185
+ } while (0)
186
+
187
+ #define GET_GLOBAL_CVAR_STATE() (ruby_vm_global_cvar_state)
188
+ #define INC_GLOBAL_CVAR_STATE() (++ruby_vm_global_cvar_state)
189
+
190
+ static inline struct vm_throw_data *
191
+ THROW_DATA_NEW(VALUE val, const rb_control_frame_t *cf, int st)
192
+ {
193
+ struct vm_throw_data *obj = IMEMO_NEW(struct vm_throw_data, imemo_throw_data, 0);
194
+ *((VALUE *)&obj->throw_obj) = val;
195
+ *((struct rb_control_frame_struct **)&obj->catch_frame) = (struct rb_control_frame_struct *)cf;
196
+ obj->throw_state = st;
197
+
198
+ return obj;
199
+ }
200
+
201
+ static inline VALUE
202
+ THROW_DATA_VAL(const struct vm_throw_data *obj)
203
+ {
204
+ VM_ASSERT(THROW_DATA_P(obj));
205
+ return obj->throw_obj;
206
+ }
207
+
208
+ static inline const rb_control_frame_t *
209
+ THROW_DATA_CATCH_FRAME(const struct vm_throw_data *obj)
210
+ {
211
+ VM_ASSERT(THROW_DATA_P(obj));
212
+ return obj->catch_frame;
213
+ }
214
+
215
+ static inline int
216
+ THROW_DATA_STATE(const struct vm_throw_data *obj)
217
+ {
218
+ VM_ASSERT(THROW_DATA_P(obj));
219
+ return obj->throw_state;
220
+ }
221
+
222
+ static inline int
223
+ THROW_DATA_CONSUMED_P(const struct vm_throw_data *obj)
224
+ {
225
+ VM_ASSERT(THROW_DATA_P(obj));
226
+ return obj->flags & THROW_DATA_CONSUMED;
227
+ }
228
+
229
+ static inline void
230
+ THROW_DATA_CATCH_FRAME_SET(struct vm_throw_data *obj, const rb_control_frame_t *cfp)
231
+ {
232
+ VM_ASSERT(THROW_DATA_P(obj));
233
+ obj->catch_frame = cfp;
234
+ }
235
+
236
+ static inline void
237
+ THROW_DATA_STATE_SET(struct vm_throw_data *obj, int st)
238
+ {
239
+ VM_ASSERT(THROW_DATA_P(obj));
240
+ obj->throw_state = st;
241
+ }
242
+
243
+ static inline void
244
+ THROW_DATA_CONSUMED_SET(struct vm_throw_data *obj)
245
+ {
246
+ if (THROW_DATA_P(obj) &&
247
+ THROW_DATA_STATE(obj) == TAG_BREAK) {
248
+ obj->flags |= THROW_DATA_CONSUMED;
249
+ }
250
+ }
251
+
252
+ #define IS_ARGS_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_ARGS_SPLAT)
253
+ #define IS_ARGS_KEYWORD(ci) (vm_ci_flag(ci) & VM_CALL_KWARG)
254
+ #define IS_ARGS_KW_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT)
255
+ #define IS_ARGS_KW_OR_KW_SPLAT(ci) (vm_ci_flag(ci) & (VM_CALL_KWARG | VM_CALL_KW_SPLAT))
256
+ #define IS_ARGS_KW_SPLAT_MUT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT_MUT)
257
+
258
+ static inline bool
259
+ vm_call_cacheable(const struct rb_callinfo *ci, const struct rb_callcache *cc)
260
+ {
261
+ return (vm_ci_flag(ci) & VM_CALL_FCALL) ||
262
+ METHOD_ENTRY_VISI(vm_cc_cme(cc)) != METHOD_VISI_PROTECTED;
263
+ }
264
+ /* If this returns true, an optimized function returned by `vm_call_iseq_setup_func`
265
+ can be used as a fastpath. */
266
+ static inline bool
267
+ vm_call_iseq_optimizable_p(const struct rb_callinfo *ci, const struct rb_callcache *cc)
268
+ {
269
+ return !IS_ARGS_SPLAT(ci) && !IS_ARGS_KEYWORD(ci) && vm_call_cacheable(ci, cc);
270
+ }
271
+
272
+ #endif /* RUBY_INSNHELPER_H */
@@ -0,0 +1,67 @@
1
+ #ifndef RUBY_VM_OPTS_H/*-*-c-*-*/
2
+ #define RUBY_VM_OPTS_H
3
+ /**********************************************************************
4
+
5
+ vm_opts.h - VM optimize option
6
+
7
+ $Author$
8
+
9
+ Copyright (C) 2004-2007 Koichi Sasada
10
+
11
+ **********************************************************************/
12
+
13
+ /* Compile options.
14
+ * You can change these options at runtime by VM::CompileOption.
15
+ * Following definitions are default values.
16
+ */
17
+
18
+ #define OPT_TAILCALL_OPTIMIZATION 0
19
+ #define OPT_PEEPHOLE_OPTIMIZATION 1
20
+ #define OPT_SPECIALISED_INSTRUCTION 1
21
+ #define OPT_INLINE_CONST_CACHE 1
22
+ #define OPT_FROZEN_STRING_LITERAL -1
23
+ #define OPT_DEBUG_FROZEN_STRING_LITERAL 0
24
+
25
+ /* Build Options.
26
+ * You can't change these options at runtime.
27
+ */
28
+
29
+ /* C compiler dependent */
30
+
31
+ /*
32
+ * 0: direct (using labeled goto using GCC special)
33
+ * 1: token (switch/case)
34
+ * 2: call (function call for each insn dispatch)
35
+ */
36
+ #ifndef OPT_THREADED_CODE
37
+ #define OPT_THREADED_CODE 0
38
+ #endif
39
+
40
+ #define OPT_DIRECT_THREADED_CODE (OPT_THREADED_CODE == 0)
41
+ #define OPT_TOKEN_THREADED_CODE (OPT_THREADED_CODE == 1)
42
+ #define OPT_CALL_THREADED_CODE (OPT_THREADED_CODE == 2)
43
+
44
+ /* VM running option */
45
+ #define OPT_CHECKED_RUN 1
46
+ #define OPT_INLINE_METHOD_CACHE 1
47
+ #define OPT_GLOBAL_METHOD_CACHE 1
48
+
49
+ #ifndef OPT_IC_FOR_IVAR
50
+ #define OPT_IC_FOR_IVAR 1
51
+ #endif
52
+
53
+ /* architecture independent, affects generated code */
54
+ #define OPT_OPERANDS_UNIFICATION 1
55
+ #define OPT_INSTRUCTIONS_UNIFICATION 0
56
+ #define OPT_UNIFY_ALL_COMBINATION 0
57
+
58
+ /* misc */
59
+ #ifndef OPT_SUPPORT_JOKE
60
+ #define OPT_SUPPORT_JOKE 0
61
+ #endif
62
+
63
+ #ifndef VM_COLLECT_USAGE_DETAILS
64
+ #define VM_COLLECT_USAGE_DETAILS 0
65
+ #endif
66
+
67
+ #endif /* RUBY_VM_OPTS_H */