debase-ruby_core_source 0.10.14 → 0.10.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (303) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/debase-ruby_core_source.gemspec +2 -2
  4. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/addr2line.h +1 -1
  5. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/build_assert/build_assert.h +40 -0
  6. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/check_type/check_type.h +63 -0
  7. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/container_of/container_of.h +142 -0
  8. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/list/list.h +773 -0
  9. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/str/str.h +16 -0
  10. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/constant.h +51 -0
  11. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/debug_counter.h +109 -0
  12. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/dln.h +10 -9
  13. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/encindex.h +69 -0
  14. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/eval_intern.h +334 -0
  15. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/gc.h +27 -10
  16. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/id.h +250 -0
  17. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/id_table.h +31 -0
  18. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/insns.inc +217 -0
  19. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/insns_info.inc +1570 -0
  20. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/internal.h +2036 -0
  21. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/iseq.h +308 -0
  22. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/known_errors.inc +16 -1
  23. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/method.h +218 -0
  24. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/node.h +115 -79
  25. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/node_name.inc +12 -22
  26. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/opt_sc.inc +1601 -0
  27. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/optinsn.inc +103 -0
  28. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/optunifs.inc +28 -83
  29. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/parse.h +74 -60
  30. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/probes_helper.h +43 -0
  31. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/regenc.h +254 -0
  32. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/regint.h +299 -211
  33. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/regparse.h +45 -37
  34. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/revision.h +1 -0
  35. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ruby_assert.h +54 -0
  36. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/ruby_atomic.h +84 -26
  37. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/siphash.h +1 -1
  38. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/symbol.h +108 -0
  39. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/thread_pthread.h +14 -11
  40. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/thread_win32.h +2 -6
  41. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/timev.h +42 -0
  42. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/transcode_data.h +34 -12
  43. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/version.h +73 -0
  44. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm.inc +3667 -0
  45. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_call_iseq_optimized.inc +213 -0
  46. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_core.h +1768 -0
  47. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550/debug.h → ruby-2.5.4-p155/vm_debug.h} +4 -8
  48. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/vm_exec.h +38 -30
  49. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_insnhelper.h +255 -0
  50. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/vm_opts.h +14 -9
  51. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vmtc.inc +214 -0
  52. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/addr2line.h +20 -0
  53. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/builtin.h +84 -0
  54. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/build_assert/build_assert.h +40 -0
  55. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/check_type/check_type.h +63 -0
  56. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/container_of/container_of.h +142 -0
  57. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/list/list.h +789 -0
  58. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/str/str.h +17 -0
  59. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/constant.h +55 -0
  60. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/darray.h +226 -0
  61. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/debug_counter.h +469 -0
  62. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/dln.h +31 -0
  63. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/encindex.h +70 -0
  64. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/eval_intern.h +339 -0
  65. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/gc.h +143 -0
  66. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/hrtime.h +216 -0
  67. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/id.h +295 -0
  68. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/id_table.h +36 -0
  69. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/insns.inc +249 -0
  70. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/insns_info.inc +9064 -0
  71. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/array.h +113 -0
  72. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/bignum.h +246 -0
  73. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/bits.h +565 -0
  74. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/class.h +211 -0
  75. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/cmdlineopt.h +61 -0
  76. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/compar.h +49 -0
  77. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/compile.h +35 -0
  78. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/compilers.h +107 -0
  79. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/complex.h +29 -0
  80. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/cont.h +24 -0
  81. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/dir.h +16 -0
  82. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/enc.h +19 -0
  83. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/encoding.h +30 -0
  84. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/enum.h +18 -0
  85. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/enumerator.h +21 -0
  86. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/error.h +191 -0
  87. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/eval.h +32 -0
  88. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/file.h +38 -0
  89. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/fixnum.h +184 -0
  90. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/gc.h +188 -0
  91. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/hash.h +243 -0
  92. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/imemo.h +243 -0
  93. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/inits.h +50 -0
  94. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/io.h +38 -0
  95. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/load.h +18 -0
  96. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/loadpath.h +16 -0
  97. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/math.h +23 -0
  98. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/missing.h +18 -0
  99. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/numeric.h +271 -0
  100. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/object.h +83 -0
  101. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/parse.h +23 -0
  102. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/proc.h +32 -0
  103. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/process.h +137 -0
  104. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/ractor.h +6 -0
  105. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/random.h +16 -0
  106. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/range.h +40 -0
  107. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/rational.h +72 -0
  108. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/re.h +30 -0
  109. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/sanitizers.h +190 -0
  110. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/serial.h +23 -0
  111. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/signal.h +21 -0
  112. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/static_assert.h +16 -0
  113. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/string.h +141 -0
  114. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/struct.h +153 -0
  115. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/symbol.h +41 -0
  116. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/thread.h +53 -0
  117. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/time.h +34 -0
  118. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/transcode.h +20 -0
  119. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/util.h +27 -0
  120. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/variable.h +83 -0
  121. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/vm.h +134 -0
  122. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/warnings.h +16 -0
  123. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal.h +109 -0
  124. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/iseq.h +325 -0
  125. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/known_errors.inc +791 -0
  126. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/method.h +254 -0
  127. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/mjit.h +231 -0
  128. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/mjit_compile.inc +8333 -0
  129. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/node.h +510 -0
  130. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/node_name.inc +208 -0
  131. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/opt_sc.inc +109 -0
  132. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/optinsn.inc +128 -0
  133. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/optunifs.inc +43 -0
  134. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/parse.h +214 -0
  135. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/probes_helper.h +44 -0
  136. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ractor_core.h +346 -0
  137. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/regenc.h +255 -0
  138. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/regint.h +957 -0
  139. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/regparse.h +370 -0
  140. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/revision.h +2 -0
  141. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ruby_assert.h +14 -0
  142. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ruby_atomic.h +23 -0
  143. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/siphash.h +48 -0
  144. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/symbol.h +119 -0
  145. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/thread_none.h +17 -0
  146. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/thread_pthread.h +115 -0
  147. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/thread_win32.h +61 -0
  148. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/timev.h +57 -0
  149. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/transcode_data.h +138 -0
  150. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/transient_heap.h +65 -0
  151. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/variable.h +21 -0
  152. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/version.h +91 -0
  153. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm.inc +5481 -0
  154. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_call_iseq_optimized.inc +244 -0
  155. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_callinfo.h +502 -0
  156. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_core.h +2089 -0
  157. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_debug.h +113 -0
  158. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_exec.h +197 -0
  159. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_insnhelper.h +262 -0
  160. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_opts.h +73 -0
  161. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_sync.h +137 -0
  162. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vmtc.inc +243 -0
  163. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit.h +73 -0
  164. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_asm.h +408 -0
  165. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_codegen.h +23 -0
  166. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_core.h +307 -0
  167. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_iface.h +38 -0
  168. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/addr2line.h +20 -0
  169. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/builtin.h +121 -0
  170. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ccan/build_assert/build_assert.h +40 -0
  171. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ccan/check_type/check_type.h +63 -0
  172. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ccan/container_of/container_of.h +142 -0
  173. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ccan/list/list.h +789 -0
  174. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ccan/str/str.h +17 -0
  175. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/constant.h +55 -0
  176. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/darray.h +179 -0
  177. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/debug_counter.h +469 -0
  178. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/dln.h +31 -0
  179. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/encindex.h +70 -0
  180. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/eval_intern.h +339 -0
  181. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/gc.h +143 -0
  182. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/hrtime.h +226 -0
  183. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/id.h +295 -0
  184. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/id_table.h +36 -0
  185. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/insns.inc +249 -0
  186. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/insns_info.inc +9061 -0
  187. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/array.h +162 -0
  188. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/bignum.h +246 -0
  189. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/bits.h +565 -0
  190. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/class.h +212 -0
  191. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/cmdlineopt.h +58 -0
  192. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/compar.h +49 -0
  193. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/compile.h +35 -0
  194. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/compilers.h +107 -0
  195. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/complex.h +29 -0
  196. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/cont.h +26 -0
  197. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/dir.h +16 -0
  198. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/enc.h +19 -0
  199. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/encoding.h +30 -0
  200. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/enum.h +18 -0
  201. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/enumerator.h +21 -0
  202. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/error.h +191 -0
  203. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/eval.h +32 -0
  204. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/file.h +38 -0
  205. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/fixnum.h +184 -0
  206. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/gc.h +188 -0
  207. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/hash.h +243 -0
  208. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/imemo.h +242 -0
  209. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/inits.h +50 -0
  210. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/io.h +38 -0
  211. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/load.h +18 -0
  212. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/loadpath.h +16 -0
  213. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/math.h +23 -0
  214. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/missing.h +18 -0
  215. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/numeric.h +271 -0
  216. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/object.h +83 -0
  217. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/parse.h +23 -0
  218. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/proc.h +32 -0
  219. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/process.h +137 -0
  220. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/ractor.h +6 -0
  221. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/random.h +16 -0
  222. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/range.h +40 -0
  223. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/rational.h +72 -0
  224. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/re.h +30 -0
  225. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/sanitizers.h +190 -0
  226. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/serial.h +23 -0
  227. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/signal.h +21 -0
  228. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/static_assert.h +16 -0
  229. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/string.h +146 -0
  230. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/struct.h +153 -0
  231. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/symbol.h +42 -0
  232. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/thread.h +54 -0
  233. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/time.h +34 -0
  234. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/transcode.h +20 -0
  235. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/util.h +27 -0
  236. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/variable.h +83 -0
  237. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/vm.h +134 -0
  238. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal/warnings.h +16 -0
  239. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/internal.h +113 -0
  240. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/iseq.h +328 -0
  241. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/known_errors.inc +791 -0
  242. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/method.h +253 -0
  243. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/mjit.h +136 -0
  244. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/mjit_compile_attr.inc +430 -0
  245. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/mjit_compiler.h +58 -0
  246. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/mjit_unit.h +29 -0
  247. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/node.h +510 -0
  248. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/node_name.inc +208 -0
  249. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/opt_sc.inc +109 -0
  250. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/optinsn.inc +128 -0
  251. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/optunifs.inc +43 -0
  252. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/parse.h +214 -0
  253. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/probes_helper.h +44 -0
  254. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ractor_core.h +341 -0
  255. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/regenc.h +255 -0
  256. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/regint.h +957 -0
  257. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/regparse.h +370 -0
  258. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/revision.h +2 -0
  259. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ruby_assert.h +14 -0
  260. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/ruby_atomic.h +23 -0
  261. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/siphash.h +48 -0
  262. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/symbol.h +119 -0
  263. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/thread_none.h +20 -0
  264. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/thread_pthread.h +132 -0
  265. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/thread_win32.h +63 -0
  266. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/timev.h +57 -0
  267. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/transcode_data.h +138 -0
  268. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/transient_heap.h +65 -0
  269. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/variable.h +21 -0
  270. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/version.h +68 -0
  271. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm.inc +5476 -0
  272. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_call_iseq_optimized.inc +244 -0
  273. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_callinfo.h +522 -0
  274. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_core.h +2130 -0
  275. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_debug.h +122 -0
  276. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_exec.h +197 -0
  277. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_insnhelper.h +269 -0
  278. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_opts.h +73 -0
  279. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vm_sync.h +137 -0
  280. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/vmtc.inc +243 -0
  281. data/lib/debase/ruby_core_source/ruby-3.2.0-preview2/yjit.h +72 -0
  282. data/lib/debase/ruby_core_source/version.rb +1 -1
  283. metadata +284 -44
  284. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/constant.h +0 -34
  285. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/encdb.h +0 -167
  286. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/eval_intern.h +0 -234
  287. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/id.h +0 -177
  288. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/insns.inc +0 -179
  289. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/insns_info.inc +0 -695
  290. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/internal.h +0 -242
  291. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/iseq.h +0 -126
  292. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/method.h +0 -105
  293. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/opt_sc.inc +0 -670
  294. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/optinsn.inc +0 -30
  295. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/regenc.h +0 -219
  296. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/revision.h +0 -1
  297. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/timev.h +0 -21
  298. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/transdb.h +0 -189
  299. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/version.h +0 -52
  300. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm.inc +0 -3054
  301. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm_core.h +0 -763
  302. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm_insnhelper.h +0 -220
  303. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vmtc.inc +0 -97
@@ -0,0 +1,113 @@
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
+ ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id);
27
+ struct RNode *ruby_debug_print_node(int level, int debug_level, const char *header, const struct RNode *node);
28
+ int ruby_debug_print_indent(int level, int debug_level, int indent_level);
29
+ void ruby_debug_gc_check_func(void);
30
+ void ruby_set_debug_option(const char *str);
31
+
32
+ RUBY_SYMBOL_EXPORT_END
33
+
34
+ #ifndef USE_RUBY_DEBUG_LOG
35
+ #define USE_RUBY_DEBUG_LOG 0
36
+ #endif
37
+
38
+ /* RUBY_DEBUG_LOG: Logging debug information mechanism
39
+ *
40
+ * This feature provides a mechanism to store logging information
41
+ * to a file, stderr or memory space with simple macros.
42
+ *
43
+ * The following information will be stored.
44
+ * * (1) __FILE__, __LINE__ in C
45
+ * * (2) __FILE__, __LINE__ in Ruby
46
+ * * (3) __func__ in C (message title)
47
+ * * (4) given string with sprintf format
48
+ * * (5) Thread number (if multiple threads are running)
49
+ *
50
+ * This feature is enabled only USE_RUBY_DEBUG_LOG is enabled.
51
+ * Release version should not enable it.
52
+ *
53
+ * Running with the `RUBY_DEBUG_LOG` environment variable enables
54
+ * this feature.
55
+ *
56
+ * # logging into a file
57
+ * RUBY_DEBUG_LOG=/path/to/file STDERR
58
+ *
59
+ * # logging into STDERR
60
+ * RUBY_DEBUG_LOG=stderr
61
+ *
62
+ * # logging into memory space (check with a debugger)
63
+ * # It will help if the timing is important.
64
+ * RUBY_DEBUG_LOG=mem
65
+ *
66
+ * RUBY_DEBUG_LOG_FILTER environment variable can specify the filter string.
67
+ * If "(3) __func__ in C (message title)" contains the specified string, the
68
+ * information will be stored (example: RUBY_DEBUG_LOG_FILTER=str will enable
69
+ * only on str related information).
70
+ *
71
+ * In a MRI source code, you can use the following macros:
72
+ * * RUBY_DEBUG_LOG(fmt, ...): Above (1) to (4) will be logged.
73
+ * * RUBY_DEBUG_LOG2(file, line, fmt, ...):
74
+ * Same as RUBY_DEBUG_LOG(), but (1) will be replaced with given file, line.
75
+ */
76
+
77
+ extern enum ruby_debug_log_mode {
78
+ ruby_debug_log_disabled = 0x00,
79
+ ruby_debug_log_memory = 0x01,
80
+ ruby_debug_log_stderr = 0x02,
81
+ ruby_debug_log_file = 0x04,
82
+ } ruby_debug_log_mode;
83
+
84
+ RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 4, 5)
85
+ void ruby_debug_log(const char *file, int line, const char *func_name, const char *fmt, ...);
86
+ void ruby_debug_log_print(unsigned int n);
87
+ bool ruby_debug_log_filter(const char *func_name);
88
+
89
+ // convenient macro to log even if the USE_RUBY_DEBUG_LOG macro is not specified.
90
+ // You can use this macro for temporary usage (you should not commit it).
91
+ #define _RUBY_DEBUG_LOG(...) ruby_debug_log(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__)
92
+
93
+ #if USE_RUBY_DEBUG_LOG
94
+ # define RUBY_DEBUG_LOG_ENABLED(func_name) \
95
+ (ruby_debug_log_mode && ruby_debug_log_filter(func_name))
96
+
97
+ #define RUBY_DEBUG_LOG(...) do { \
98
+ if (RUBY_DEBUG_LOG_ENABLED(RUBY_FUNCTION_NAME_STRING)) \
99
+ ruby_debug_log(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__); \
100
+ } while (0)
101
+
102
+ #define RUBY_DEBUG_LOG2(file, line, ...) do { \
103
+ if (RUBY_DEBUG_LOG_ENABLED(RUBY_FUNCTION_NAME_STRING)) \
104
+ ruby_debug_log(file, line, RUBY_FUNCTION_NAME_STRING, "" __VA_ARGS__); \
105
+ } while (0)
106
+
107
+ #else // USE_RUBY_DEBUG_LOG
108
+ // do nothing
109
+ #define RUBY_DEBUG_LOG(...)
110
+ #define RUBY_DEBUG_LOG2(file, line, ...)
111
+ #endif // USE_RUBY_DEBUG_LOG
112
+
113
+ #endif /* RUBY_DEBUG_H */
@@ -0,0 +1,197 @@
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
+ #if OPT_STACK_CACHING
25
+ #define SC_REGS() , reg_a, reg_b
26
+ #else
27
+ #define SC_REGS()
28
+ #endif
29
+
30
+ #define DEBUG_END_INSN() \
31
+ rb_vmdebug_debug_print_post(ec, GET_CFP() SC_REGS());
32
+
33
+ #else
34
+
35
+ #define debugs
36
+ #define DEBUG_ENTER_INSN(insn)
37
+ #define DEBUG_END_INSN()
38
+ #endif
39
+
40
+ #define throwdebug if(0)ruby_debug_printf
41
+ /* #define throwdebug ruby_debug_printf */
42
+
43
+ #ifndef USE_INSNS_COUNTER
44
+ #define USE_INSNS_COUNTER 0
45
+ #endif
46
+
47
+ /************************************************/
48
+ #if defined(DISPATCH_XXX)
49
+ error !
50
+ /************************************************/
51
+ #elif OPT_CALL_THREADED_CODE
52
+
53
+ #define LABEL(x) insn_func_##x
54
+ #define ELABEL(x)
55
+ #define LABEL_PTR(x) &LABEL(x)
56
+
57
+ #define INSN_ENTRY(insn) \
58
+ static rb_control_frame_t * \
59
+ FUNC_FASTCALL(LABEL(insn))(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp) {
60
+
61
+ #define END_INSN(insn) return reg_cfp;}
62
+
63
+ #define NEXT_INSN() return reg_cfp;
64
+
65
+ #define START_OF_ORIGINAL_INSN(x) /* ignore */
66
+ #define DISPATCH_ORIGINAL_INSN(x) return LABEL(x)(ec, reg_cfp);
67
+
68
+ /************************************************/
69
+ #elif OPT_TOKEN_THREADED_CODE || OPT_DIRECT_THREADED_CODE
70
+ /* threaded code with gcc */
71
+
72
+ #define LABEL(x) INSN_LABEL_##x
73
+ #define ELABEL(x) INSN_ELABEL_##x
74
+ #define LABEL_PTR(x) RB_GNUC_EXTENSION(&&LABEL(x))
75
+
76
+ #define INSN_ENTRY_SIG(insn) \
77
+ if (0) { \
78
+ ruby_debug_printf("exec: %s@(%"PRIdPTRDIFF", %"PRIdPTRDIFF")@%s:%u\n", #insn, \
79
+ (reg_pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded), \
80
+ (reg_cfp->pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded), \
81
+ RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), \
82
+ rb_iseq_line_no(reg_cfp->iseq, reg_pc - ISEQ_BODY(reg_cfp->iseq)->iseq_encoded)); \
83
+ } \
84
+ if (USE_INSNS_COUNTER) vm_insns_counter_count_insn(BIN(insn));
85
+
86
+ #define INSN_DISPATCH_SIG(insn)
87
+
88
+ #define INSN_ENTRY(insn) \
89
+ LABEL(insn): \
90
+ INSN_ENTRY_SIG(insn); \
91
+
92
+ /**********************************/
93
+ #if OPT_DIRECT_THREADED_CODE
94
+
95
+ /* for GCC 3.4.x */
96
+ #define TC_DISPATCH(insn) \
97
+ INSN_DISPATCH_SIG(insn); \
98
+ RB_GNUC_EXTENSION_BLOCK(goto *(void const *)GET_CURRENT_INSN()); \
99
+ ;
100
+
101
+ #else
102
+ /* token threaded code */
103
+
104
+ /* dispatcher */
105
+ #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && __GNUC__ == 3
106
+ #define DISPATCH_ARCH_DEPEND_WAY(addr) \
107
+ __asm__ __volatile__("jmp *%0;\t# -- inserted by vm.h\t[length = 2]" : : "r" (addr))
108
+
109
+ #else
110
+ #define DISPATCH_ARCH_DEPEND_WAY(addr) \
111
+ /* do nothing */
112
+ #endif
113
+ #define TC_DISPATCH(insn) \
114
+ DISPATCH_ARCH_DEPEND_WAY(insns_address_table[GET_CURRENT_INSN()]); \
115
+ INSN_DISPATCH_SIG(insn); \
116
+ RB_GNUC_EXTENSION_BLOCK(goto *insns_address_table[GET_CURRENT_INSN()]); \
117
+ rb_bug("tc error");
118
+
119
+ #endif /* OPT_DIRECT_THREADED_CODE */
120
+
121
+ #define END_INSN(insn) \
122
+ DEBUG_END_INSN(); \
123
+ TC_DISPATCH(insn);
124
+
125
+ #define INSN_DISPATCH() \
126
+ TC_DISPATCH(__START__) \
127
+ {
128
+
129
+ #define END_INSNS_DISPATCH() \
130
+ rb_bug("unknown insn: %"PRIdVALUE, GET_CURRENT_INSN()); \
131
+ } /* end of while loop */ \
132
+
133
+ #define NEXT_INSN() TC_DISPATCH(__NEXT_INSN__)
134
+
135
+ /************************************************/
136
+ #else /* no threaded code */
137
+ /* most common method */
138
+
139
+ #define INSN_ENTRY(insn) \
140
+ case BIN(insn):
141
+
142
+ #define END_INSN(insn) \
143
+ DEBUG_END_INSN(); \
144
+ break;
145
+
146
+ #define INSN_DISPATCH() \
147
+ while (1) { \
148
+ switch (GET_CURRENT_INSN()) {
149
+
150
+ #define END_INSNS_DISPATCH() \
151
+ default: \
152
+ SDR(); \
153
+ rb_bug("unknown insn: %ld", GET_CURRENT_INSN()); \
154
+ } /* end of switch */ \
155
+ } /* end of while loop */ \
156
+
157
+ #define NEXT_INSN() goto first
158
+
159
+ #endif
160
+
161
+ #ifndef START_OF_ORIGINAL_INSN
162
+ #define START_OF_ORIGINAL_INSN(x) if (0) goto start_of_##x; start_of_##x:
163
+ #define DISPATCH_ORIGINAL_INSN(x) goto start_of_##x;
164
+ #endif
165
+
166
+ #define VM_SP_CNT(ec, sp) ((sp) - (ec)->vm_stack)
167
+
168
+ #ifdef MJIT_HEADER
169
+ #define THROW_EXCEPTION(exc) do { \
170
+ ec->errinfo = (VALUE)(exc); \
171
+ EC_JUMP_TAG(ec, ec->tag->state); \
172
+ } while (0)
173
+ #else
174
+ #if OPT_CALL_THREADED_CODE
175
+ #define THROW_EXCEPTION(exc) do { \
176
+ ec->errinfo = (VALUE)(exc); \
177
+ return 0; \
178
+ } while (0)
179
+ #else
180
+ #define THROW_EXCEPTION(exc) return (VALUE)(exc)
181
+ #endif
182
+ #endif
183
+
184
+ #define SCREG(r) (reg_##r)
185
+
186
+ #define VM_DEBUG_STACKOVERFLOW 0
187
+
188
+ #if VM_DEBUG_STACKOVERFLOW
189
+ #define CHECK_VM_STACK_OVERFLOW_FOR_INSN CHECK_VM_STACK_OVERFLOW
190
+ #else
191
+ #define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp, margin)
192
+ #endif
193
+
194
+ #define INSN_LABEL2(insn, name) INSN_LABEL_ ## insn ## _ ## name
195
+ #define INSN_LABEL(x) INSN_LABEL2(NAME_OF_CURRENT_INSN, x)
196
+
197
+ #endif /* RUBY_VM_EXEC_H */
@@ -0,0 +1,262 @@
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
+ MJIT_SYMBOL_EXPORT_BEGIN
15
+
16
+ RUBY_EXTERN VALUE ruby_vm_const_missing_count;
17
+ RUBY_EXTERN rb_serial_t ruby_vm_class_serial;
18
+ RUBY_EXTERN rb_serial_t ruby_vm_global_cvar_state;
19
+
20
+ MJIT_SYMBOL_EXPORT_END
21
+
22
+ #if VM_COLLECT_USAGE_DETAILS
23
+ #define COLLECT_USAGE_INSN(insn) vm_collect_usage_insn(insn)
24
+ #define COLLECT_USAGE_OPERAND(insn, n, op) vm_collect_usage_operand((insn), (n), ((VALUE)(op)))
25
+
26
+ #define COLLECT_USAGE_REGISTER(reg, s) vm_collect_usage_register((reg), (s))
27
+ #elif YJIT_STATS
28
+ /* for --yjit-stats */
29
+ #define COLLECT_USAGE_INSN(insn) rb_yjit_collect_vm_usage_insn(insn)
30
+ #define COLLECT_USAGE_OPERAND(insn, n, op) /* none */
31
+ #define COLLECT_USAGE_REGISTER(reg, s) /* none */
32
+ #else
33
+ #define COLLECT_USAGE_INSN(insn) /* none */
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
+ #if VM_COLLECT_USAGE_DETAILS
62
+ enum vm_regan_regtype {
63
+ VM_REGAN_PC = 0,
64
+ VM_REGAN_SP = 1,
65
+ VM_REGAN_EP = 2,
66
+ VM_REGAN_CFP = 3,
67
+ VM_REGAN_SELF = 4,
68
+ VM_REGAN_ISEQ = 5
69
+ };
70
+ enum vm_regan_acttype {
71
+ VM_REGAN_ACT_GET = 0,
72
+ VM_REGAN_ACT_SET = 1
73
+ };
74
+
75
+ #define COLLECT_USAGE_REGISTER_HELPER(a, b, v) \
76
+ (COLLECT_USAGE_REGISTER((VM_REGAN_##a), (VM_REGAN_ACT_##b)), (v))
77
+ #else
78
+ #define COLLECT_USAGE_REGISTER_HELPER(a, b, v) (v)
79
+ #endif
80
+
81
+ /* PC */
82
+ #define GET_PC() (COLLECT_USAGE_REGISTER_HELPER(PC, GET, VM_REG_PC))
83
+ #define SET_PC(x) (VM_REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x))))
84
+ #define GET_CURRENT_INSN() (*GET_PC())
85
+ #define GET_OPERAND(n) (GET_PC()[(n)])
86
+ #define ADD_PC(n) (SET_PC(VM_REG_PC + (n)))
87
+ #define JUMP(dst) (SET_PC(VM_REG_PC + (dst)))
88
+
89
+ /* frame pointer, environment pointer */
90
+ #define GET_CFP() (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, VM_REG_CFP))
91
+ #define GET_EP() (COLLECT_USAGE_REGISTER_HELPER(EP, GET, VM_REG_EP))
92
+ #define SET_EP(x) (VM_REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x))))
93
+ #define GET_LEP() (VM_EP_LEP(GET_EP()))
94
+
95
+ /* SP */
96
+ #define GET_SP() (COLLECT_USAGE_REGISTER_HELPER(SP, GET, VM_REG_SP))
97
+ #define SET_SP(x) (VM_REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
98
+ #define INC_SP(x) (VM_REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
99
+ #define DEC_SP(x) (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
100
+ #define SET_SV(x) (*GET_SP() = rb_ractor_confirm_belonging(x))
101
+ /* set current stack value as x */
102
+
103
+ /* instruction sequence C struct */
104
+ #define GET_ISEQ() (GET_CFP()->iseq)
105
+
106
+ /**********************************************************/
107
+ /* deal with variables */
108
+ /**********************************************************/
109
+
110
+ #define GET_PREV_EP(ep) ((VALUE *)((ep)[VM_ENV_DATA_INDEX_SPECVAL] & ~0x03))
111
+
112
+ /**********************************************************/
113
+ /* deal with values */
114
+ /**********************************************************/
115
+
116
+ #define GET_SELF() (COLLECT_USAGE_REGISTER_HELPER(SELF, GET, GET_CFP()->self))
117
+
118
+ /**********************************************************/
119
+ /* deal with control flow 2: method/iterator */
120
+ /**********************************************************/
121
+
122
+ /* set fastpath when cached method is *NOT* protected
123
+ * because inline method cache does not care about receiver.
124
+ */
125
+
126
+ static inline void
127
+ CC_SET_FASTPATH(const struct rb_callcache *cc, vm_call_handler func, bool enabled)
128
+ {
129
+ if (LIKELY(enabled)) {
130
+ vm_cc_call_set(cc, func);
131
+ }
132
+ }
133
+
134
+ #define GET_BLOCK_HANDLER() (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL])
135
+
136
+ /**********************************************************/
137
+ /* deal with control flow 3: exception */
138
+ /**********************************************************/
139
+
140
+
141
+ /**********************************************************/
142
+ /* deal with stack canary */
143
+ /**********************************************************/
144
+
145
+ #if VM_CHECK_MODE > 0
146
+ #define SETUP_CANARY(cond) \
147
+ VALUE *canary = 0; \
148
+ if (cond) { \
149
+ canary = GET_SP(); \
150
+ SET_SV(vm_stack_canary); \
151
+ } \
152
+ else {\
153
+ SET_SV(Qfalse); /* cleanup */ \
154
+ }
155
+ #define CHECK_CANARY(cond, insn) \
156
+ if (cond) { \
157
+ if (*canary == vm_stack_canary) { \
158
+ *canary = Qfalse; /* cleanup */ \
159
+ } \
160
+ else { \
161
+ rb_vm_canary_is_found_dead(insn, *canary); \
162
+ } \
163
+ }
164
+ #else
165
+ #define SETUP_CANARY(cond) if (cond) {} else {}
166
+ #define CHECK_CANARY(cond, insn) if (cond) {(void)(insn);}
167
+ #endif
168
+
169
+ /**********************************************************/
170
+ /* others */
171
+ /**********************************************************/
172
+
173
+ #ifndef MJIT_HEADER
174
+ #define CALL_SIMPLE_METHOD() do { \
175
+ rb_snum_t x = leaf ? INSN_ATTR(width) : 0; \
176
+ rb_snum_t y = attr_width_opt_send_without_block(0); \
177
+ rb_snum_t z = x - y; \
178
+ ADD_PC(z); \
179
+ DISPATCH_ORIGINAL_INSN(opt_send_without_block); \
180
+ } while (0)
181
+ #endif
182
+
183
+ #define PREV_CLASS_SERIAL() (ruby_vm_class_serial)
184
+ #define NEXT_CLASS_SERIAL() (++ruby_vm_class_serial)
185
+ #define GET_GLOBAL_CVAR_STATE() (ruby_vm_global_cvar_state)
186
+ #define INC_GLOBAL_CVAR_STATE() (++ruby_vm_global_cvar_state)
187
+
188
+ static inline struct vm_throw_data *
189
+ THROW_DATA_NEW(VALUE val, const rb_control_frame_t *cf, int st)
190
+ {
191
+ struct vm_throw_data *obj = (struct vm_throw_data *)rb_imemo_new(imemo_throw_data, val, (VALUE)cf, 0, 0);
192
+ obj->throw_state = st;
193
+ return obj;
194
+ }
195
+
196
+ static inline VALUE
197
+ THROW_DATA_VAL(const struct vm_throw_data *obj)
198
+ {
199
+ VM_ASSERT(THROW_DATA_P(obj));
200
+ return obj->throw_obj;
201
+ }
202
+
203
+ static inline const rb_control_frame_t *
204
+ THROW_DATA_CATCH_FRAME(const struct vm_throw_data *obj)
205
+ {
206
+ VM_ASSERT(THROW_DATA_P(obj));
207
+ return obj->catch_frame;
208
+ }
209
+
210
+ static inline int
211
+ THROW_DATA_STATE(const struct vm_throw_data *obj)
212
+ {
213
+ VM_ASSERT(THROW_DATA_P(obj));
214
+ return obj->throw_state;
215
+ }
216
+
217
+ static inline int
218
+ THROW_DATA_CONSUMED_P(const struct vm_throw_data *obj)
219
+ {
220
+ VM_ASSERT(THROW_DATA_P(obj));
221
+ return obj->flags & THROW_DATA_CONSUMED;
222
+ }
223
+
224
+ static inline void
225
+ THROW_DATA_CATCH_FRAME_SET(struct vm_throw_data *obj, const rb_control_frame_t *cfp)
226
+ {
227
+ VM_ASSERT(THROW_DATA_P(obj));
228
+ obj->catch_frame = cfp;
229
+ }
230
+
231
+ static inline void
232
+ THROW_DATA_STATE_SET(struct vm_throw_data *obj, int st)
233
+ {
234
+ VM_ASSERT(THROW_DATA_P(obj));
235
+ obj->throw_state = st;
236
+ }
237
+
238
+ static inline void
239
+ THROW_DATA_CONSUMED_SET(struct vm_throw_data *obj)
240
+ {
241
+ if (THROW_DATA_P(obj) &&
242
+ THROW_DATA_STATE(obj) == TAG_BREAK) {
243
+ obj->flags |= THROW_DATA_CONSUMED;
244
+ }
245
+ }
246
+
247
+ #define IS_ARGS_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_ARGS_SPLAT)
248
+ #define IS_ARGS_KEYWORD(ci) (vm_ci_flag(ci) & VM_CALL_KWARG)
249
+ #define IS_ARGS_KW_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT)
250
+ #define IS_ARGS_KW_OR_KW_SPLAT(ci) (vm_ci_flag(ci) & (VM_CALL_KWARG | VM_CALL_KW_SPLAT))
251
+ #define IS_ARGS_KW_SPLAT_MUT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT_MUT)
252
+
253
+ /* If this returns true, an optimized function returned by `vm_call_iseq_setup_func`
254
+ can be used as a fastpath. */
255
+ static inline bool
256
+ vm_call_iseq_optimizable_p(const struct rb_callinfo *ci, const struct rb_callcache *cc)
257
+ {
258
+ return !IS_ARGS_SPLAT(ci) && !IS_ARGS_KEYWORD(ci) &&
259
+ METHOD_ENTRY_CACHEABLE(vm_cc_cme(cc));
260
+ }
261
+
262
+ #endif /* RUBY_INSNHELPER_H */
@@ -0,0 +1,73 @@
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 0
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
+ #define OPT_BLOCKINLINING 0
49
+
50
+ #ifndef OPT_IC_FOR_IVAR
51
+ #define OPT_IC_FOR_IVAR 1
52
+ #endif
53
+
54
+ /* architecture independent, affects generated code */
55
+ #define OPT_OPERANDS_UNIFICATION 1
56
+ #define OPT_INSTRUCTIONS_UNIFICATION 0
57
+ #define OPT_UNIFY_ALL_COMBINATION 0
58
+ #define OPT_STACK_CACHING 0
59
+
60
+ /* misc */
61
+ #ifndef OPT_SUPPORT_JOKE
62
+ #define OPT_SUPPORT_JOKE 0
63
+ #endif
64
+
65
+ #ifndef OPT_SUPPORT_CALL_C_FUNCTION
66
+ #define OPT_SUPPORT_CALL_C_FUNCTION 0
67
+ #endif
68
+
69
+ #ifndef VM_COLLECT_USAGE_DETAILS
70
+ #define VM_COLLECT_USAGE_DETAILS 0
71
+ #endif
72
+
73
+ #endif /* RUBY_VM_OPTS_H */