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,502 @@
1
+ #ifndef RUBY_VM_CALLINFO_H /*-*-C-*-vi:se ft=c:*/
2
+ #define RUBY_VM_CALLINFO_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ */
10
+
11
+ #include "debug_counter.h"
12
+
13
+ enum vm_call_flag_bits {
14
+ VM_CALL_ARGS_SPLAT_bit, /* m(*args) */
15
+ VM_CALL_ARGS_BLOCKARG_bit, /* m(&block) */
16
+ VM_CALL_FCALL_bit, /* m(...) */
17
+ VM_CALL_VCALL_bit, /* m */
18
+ VM_CALL_ARGS_SIMPLE_bit, /* (ci->flag & (SPLAT|BLOCKARG)) && blockiseq == NULL && ci->kw_arg == NULL */
19
+ VM_CALL_BLOCKISEQ_bit, /* has blockiseq */
20
+ VM_CALL_KWARG_bit, /* has kwarg */
21
+ VM_CALL_KW_SPLAT_bit, /* m(**opts) */
22
+ VM_CALL_TAILCALL_bit, /* located at tail position */
23
+ VM_CALL_SUPER_bit, /* super */
24
+ VM_CALL_ZSUPER_bit, /* zsuper */
25
+ VM_CALL_OPT_SEND_bit, /* internal flag */
26
+ VM_CALL_KW_SPLAT_MUT_bit, /* kw splat hash can be modified (to avoid allocating a new one) */
27
+ VM_CALL__END
28
+ };
29
+
30
+ #define VM_CALL_ARGS_SPLAT (0x01 << VM_CALL_ARGS_SPLAT_bit)
31
+ #define VM_CALL_ARGS_BLOCKARG (0x01 << VM_CALL_ARGS_BLOCKARG_bit)
32
+ #define VM_CALL_FCALL (0x01 << VM_CALL_FCALL_bit)
33
+ #define VM_CALL_VCALL (0x01 << VM_CALL_VCALL_bit)
34
+ #define VM_CALL_ARGS_SIMPLE (0x01 << VM_CALL_ARGS_SIMPLE_bit)
35
+ #define VM_CALL_BLOCKISEQ (0x01 << VM_CALL_BLOCKISEQ_bit)
36
+ #define VM_CALL_KWARG (0x01 << VM_CALL_KWARG_bit)
37
+ #define VM_CALL_KW_SPLAT (0x01 << VM_CALL_KW_SPLAT_bit)
38
+ #define VM_CALL_TAILCALL (0x01 << VM_CALL_TAILCALL_bit)
39
+ #define VM_CALL_SUPER (0x01 << VM_CALL_SUPER_bit)
40
+ #define VM_CALL_ZSUPER (0x01 << VM_CALL_ZSUPER_bit)
41
+ #define VM_CALL_OPT_SEND (0x01 << VM_CALL_OPT_SEND_bit)
42
+ #define VM_CALL_KW_SPLAT_MUT (0x01 << VM_CALL_KW_SPLAT_MUT_bit)
43
+
44
+ struct rb_callinfo_kwarg {
45
+ int keyword_len;
46
+ VALUE keywords[];
47
+ };
48
+
49
+ static inline size_t
50
+ rb_callinfo_kwarg_bytes(int keyword_len)
51
+ {
52
+ return rb_size_mul_add_or_raise(
53
+ keyword_len,
54
+ sizeof(VALUE),
55
+ sizeof(struct rb_callinfo_kwarg),
56
+ rb_eRuntimeError);
57
+ }
58
+
59
+ // imemo_callinfo
60
+ struct rb_callinfo {
61
+ VALUE flags;
62
+ const struct rb_callinfo_kwarg *kwarg;
63
+ VALUE mid;
64
+ VALUE flag;
65
+ VALUE argc;
66
+ };
67
+
68
+ #ifndef USE_EMBED_CI
69
+ #define USE_EMBED_CI 1
70
+ #endif
71
+
72
+ #if SIZEOF_VALUE == 8
73
+ #define CI_EMBED_TAG_bits 1
74
+ #define CI_EMBED_ARGC_bits 15
75
+ #define CI_EMBED_FLAG_bits 16
76
+ #define CI_EMBED_ID_bits 32
77
+ #elif SIZEOF_VALUE == 4
78
+ #define CI_EMBED_TAG_bits 1
79
+ #define CI_EMBED_ARGC_bits 3
80
+ #define CI_EMBED_FLAG_bits 13
81
+ #define CI_EMBED_ID_bits 15
82
+ #endif
83
+
84
+ #if (CI_EMBED_TAG_bits + CI_EMBED_ARGC_bits + CI_EMBED_FLAG_bits + CI_EMBED_ID_bits) != (SIZEOF_VALUE * 8)
85
+ #error
86
+ #endif
87
+
88
+ #define CI_EMBED_FLAG 0x01
89
+ #define CI_EMBED_ARGC_SHFT (CI_EMBED_TAG_bits)
90
+ #define CI_EMBED_ARGC_MASK ((((VALUE)1)<<CI_EMBED_ARGC_bits) - 1)
91
+ #define CI_EMBED_FLAG_SHFT (CI_EMBED_TAG_bits + CI_EMBED_ARGC_bits)
92
+ #define CI_EMBED_FLAG_MASK ((((VALUE)1)<<CI_EMBED_FLAG_bits) - 1)
93
+ #define CI_EMBED_ID_SHFT (CI_EMBED_TAG_bits + CI_EMBED_ARGC_bits + CI_EMBED_FLAG_bits)
94
+ #define CI_EMBED_ID_MASK ((((VALUE)1)<<CI_EMBED_ID_bits) - 1)
95
+
96
+ static inline bool
97
+ vm_ci_packed_p(const struct rb_callinfo *ci)
98
+ {
99
+ #if USE_EMBED_CI
100
+ if (LIKELY(((VALUE)ci) & 0x01)) {
101
+ return 1;
102
+ }
103
+ else {
104
+ VM_ASSERT(IMEMO_TYPE_P(ci, imemo_callinfo));
105
+ return 0;
106
+ }
107
+ #else
108
+ return 0;
109
+ #endif
110
+ }
111
+
112
+ static inline bool
113
+ vm_ci_p(const struct rb_callinfo *ci)
114
+ {
115
+ if (vm_ci_packed_p(ci) || IMEMO_TYPE_P(ci, imemo_callinfo)) {
116
+ return 1;
117
+ }
118
+ else {
119
+ return 0;
120
+ }
121
+ }
122
+
123
+ static inline ID
124
+ vm_ci_mid(const struct rb_callinfo *ci)
125
+ {
126
+ if (vm_ci_packed_p(ci)) {
127
+ return (((VALUE)ci) >> CI_EMBED_ID_SHFT) & CI_EMBED_ID_MASK;
128
+ }
129
+ else {
130
+ return (ID)ci->mid;
131
+ }
132
+ }
133
+
134
+ static inline unsigned int
135
+ vm_ci_flag(const struct rb_callinfo *ci)
136
+ {
137
+ if (vm_ci_packed_p(ci)) {
138
+ return (unsigned int)((((VALUE)ci) >> CI_EMBED_FLAG_SHFT) & CI_EMBED_FLAG_MASK);
139
+ }
140
+ else {
141
+ return (unsigned int)ci->flag;
142
+ }
143
+ }
144
+
145
+ static inline unsigned int
146
+ vm_ci_argc(const struct rb_callinfo *ci)
147
+ {
148
+ if (vm_ci_packed_p(ci)) {
149
+ return (unsigned int)((((VALUE)ci) >> CI_EMBED_ARGC_SHFT) & CI_EMBED_ARGC_MASK);
150
+ }
151
+ else {
152
+ return (unsigned int)ci->argc;
153
+ }
154
+ }
155
+
156
+ static inline const struct rb_callinfo_kwarg *
157
+ vm_ci_kwarg(const struct rb_callinfo *ci)
158
+ {
159
+ if (vm_ci_packed_p(ci)) {
160
+ return NULL;
161
+ }
162
+ else {
163
+ return ci->kwarg;
164
+ }
165
+ }
166
+
167
+ static inline void
168
+ vm_ci_dump(const struct rb_callinfo *ci)
169
+ {
170
+ if (vm_ci_packed_p(ci)) {
171
+ ruby_debug_printf("packed_ci ID:%s flag:%x argc:%u\n",
172
+ rb_id2name(vm_ci_mid(ci)), vm_ci_flag(ci), vm_ci_argc(ci));
173
+ }
174
+ else {
175
+ rp(ci);
176
+ }
177
+ }
178
+
179
+ #define vm_ci_new(mid, flag, argc, kwarg) vm_ci_new_(mid, flag, argc, kwarg, __FILE__, __LINE__)
180
+ #define vm_ci_new_runtime(mid, flag, argc, kwarg) vm_ci_new_runtime_(mid, flag, argc, kwarg, __FILE__, __LINE__)
181
+
182
+ /* This is passed to STATIC_ASSERT. Cannot be an inline function. */
183
+ #define VM_CI_EMBEDDABLE_P(mid, flag, argc, kwarg) \
184
+ (((mid ) & ~CI_EMBED_ID_MASK) ? false : \
185
+ ((flag) & ~CI_EMBED_FLAG_MASK) ? false : \
186
+ ((argc) & ~CI_EMBED_ARGC_MASK) ? false : \
187
+ (kwarg) ? false : true)
188
+
189
+ #define vm_ci_new_id(mid, flag, argc, must_zero) \
190
+ ((const struct rb_callinfo *) \
191
+ ((((VALUE)(mid )) << CI_EMBED_ID_SHFT) | \
192
+ (((VALUE)(flag)) << CI_EMBED_FLAG_SHFT) | \
193
+ (((VALUE)(argc)) << CI_EMBED_ARGC_SHFT) | \
194
+ RUBY_FIXNUM_FLAG))
195
+
196
+ static inline const struct rb_callinfo *
197
+ vm_ci_new_(ID mid, unsigned int flag, unsigned int argc, const struct rb_callinfo_kwarg *kwarg, const char *file, int line)
198
+ {
199
+ #if USE_EMBED_CI
200
+ if (VM_CI_EMBEDDABLE_P(mid, flag, argc, kwarg)) {
201
+ RB_DEBUG_COUNTER_INC(ci_packed);
202
+ return vm_ci_new_id(mid, flag, argc, kwarg);
203
+ }
204
+ #endif
205
+
206
+ const bool debug = 0;
207
+ if (debug) ruby_debug_printf("%s:%d ", file, line);
208
+
209
+ // TODO: dedup
210
+ const struct rb_callinfo *ci = (const struct rb_callinfo *)
211
+ rb_imemo_new(imemo_callinfo,
212
+ (VALUE)mid,
213
+ (VALUE)flag,
214
+ (VALUE)argc,
215
+ (VALUE)kwarg);
216
+ if (debug) rp(ci);
217
+ if (kwarg) {
218
+ RB_DEBUG_COUNTER_INC(ci_kw);
219
+ }
220
+ else {
221
+ RB_DEBUG_COUNTER_INC(ci_nokw);
222
+ }
223
+
224
+ VM_ASSERT(vm_ci_flag(ci) == flag);
225
+ VM_ASSERT(vm_ci_argc(ci) == argc);
226
+
227
+ return ci;
228
+ }
229
+
230
+
231
+ static inline const struct rb_callinfo *
232
+ vm_ci_new_runtime_(ID mid, unsigned int flag, unsigned int argc, const struct rb_callinfo_kwarg *kwarg, const char *file, int line)
233
+ {
234
+ RB_DEBUG_COUNTER_INC(ci_runtime);
235
+ return vm_ci_new_(mid, flag, argc, kwarg, file, line);
236
+ }
237
+
238
+ #define VM_CALLINFO_NOT_UNDER_GC IMEMO_FL_USER0
239
+
240
+ static inline bool
241
+ vm_ci_markable(const struct rb_callinfo *ci)
242
+ {
243
+ if (! ci) {
244
+ return false; /* or true? This is Qfalse... */
245
+ }
246
+ else if (vm_ci_packed_p(ci)) {
247
+ return true;
248
+ }
249
+ else {
250
+ VM_ASSERT(IMEMO_TYPE_P(ci, imemo_callinfo));
251
+ return ! FL_ANY_RAW((VALUE)ci, VM_CALLINFO_NOT_UNDER_GC);
252
+ }
253
+ }
254
+
255
+ #define VM_CI_ON_STACK(mid_, flags_, argc_, kwarg_) \
256
+ (struct rb_callinfo) { \
257
+ .flags = T_IMEMO | \
258
+ (imemo_callinfo << FL_USHIFT) | \
259
+ VM_CALLINFO_NOT_UNDER_GC, \
260
+ .mid = mid_, \
261
+ .flag = flags_, \
262
+ .argc = argc_, \
263
+ .kwarg = kwarg_, \
264
+ }
265
+
266
+ typedef VALUE (*vm_call_handler)(
267
+ struct rb_execution_context_struct *ec,
268
+ struct rb_control_frame_struct *cfp,
269
+ struct rb_calling_info *calling);
270
+
271
+ // imemo_callcache
272
+
273
+ struct rb_callcache {
274
+ const VALUE flags;
275
+
276
+ /* inline cache: key */
277
+ const VALUE klass; // should not mark it because klass can not be free'd
278
+ // because of this marking. When klass is collected,
279
+ // cc will be cleared (cc->klass = 0) at vm_ccs_free().
280
+
281
+ /* inline cache: values */
282
+ const struct rb_callable_method_entry_struct * const cme_;
283
+ const vm_call_handler call_;
284
+
285
+ union {
286
+ const unsigned int attr_index;
287
+ const enum method_missing_reason method_missing_reason; /* used by method_missing */
288
+ VALUE v;
289
+ } aux_;
290
+ };
291
+
292
+ #define VM_CALLCACHE_UNMARKABLE IMEMO_FL_USER0
293
+ #define VM_CALLCACHE_ON_STACK IMEMO_FL_USER1
294
+
295
+ static inline const struct rb_callcache *
296
+ vm_cc_new(VALUE klass,
297
+ const struct rb_callable_method_entry_struct *cme,
298
+ vm_call_handler call)
299
+ {
300
+ const struct rb_callcache *cc = (const struct rb_callcache *)rb_imemo_new(imemo_callcache, (VALUE)cme, (VALUE)call, 0, klass);
301
+ RB_DEBUG_COUNTER_INC(cc_new);
302
+ return cc;
303
+ }
304
+
305
+ #define VM_CC_ON_STACK(clazz, call, aux, cme) \
306
+ (struct rb_callcache) { \
307
+ .flags = T_IMEMO | \
308
+ (imemo_callcache << FL_USHIFT) | \
309
+ VM_CALLCACHE_UNMARKABLE | \
310
+ VM_CALLCACHE_ON_STACK, \
311
+ .klass = clazz, \
312
+ .cme_ = cme, \
313
+ .call_ = call, \
314
+ .aux_ = aux, \
315
+ }
316
+
317
+ static inline bool
318
+ vm_cc_class_check(const struct rb_callcache *cc, VALUE klass)
319
+ {
320
+ VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
321
+ VM_ASSERT(cc->klass == 0 ||
322
+ RB_TYPE_P(cc->klass, T_CLASS) || RB_TYPE_P(cc->klass, T_ICLASS));
323
+ return cc->klass == klass;
324
+ }
325
+
326
+ static inline int
327
+ vm_cc_markable(const struct rb_callcache *cc)
328
+ {
329
+ VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
330
+ return FL_TEST_RAW((VALUE)cc, VM_CALLCACHE_UNMARKABLE) == 0;
331
+ }
332
+
333
+ static inline const struct rb_callable_method_entry_struct *
334
+ vm_cc_cme(const struct rb_callcache *cc)
335
+ {
336
+ VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
337
+ VM_ASSERT(cc->call_ == NULL || // not initialized yet
338
+ !vm_cc_markable(cc) ||
339
+ cc->cme_ != NULL);
340
+
341
+ return cc->cme_;
342
+ }
343
+
344
+ static inline vm_call_handler
345
+ vm_cc_call(const struct rb_callcache *cc)
346
+ {
347
+ VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
348
+ VM_ASSERT(cc->call_ != NULL);
349
+ return cc->call_;
350
+ }
351
+
352
+ static inline unsigned int
353
+ vm_cc_attr_index(const struct rb_callcache *cc)
354
+ {
355
+ VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
356
+ return cc->aux_.attr_index - 1;
357
+ }
358
+
359
+ static inline bool
360
+ vm_cc_attr_index_p(const struct rb_callcache *cc)
361
+ {
362
+ VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
363
+ return cc->aux_.attr_index > 0;
364
+ }
365
+
366
+ static inline unsigned int
367
+ vm_cc_cmethod_missing_reason(const struct rb_callcache *cc)
368
+ {
369
+ VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
370
+ return cc->aux_.method_missing_reason;
371
+ }
372
+
373
+ static inline bool
374
+ vm_cc_invalidated_p(const struct rb_callcache *cc)
375
+ {
376
+ if (cc->klass && !METHOD_ENTRY_INVALIDATED(vm_cc_cme(cc))) {
377
+ return false;
378
+ }
379
+ else {
380
+ return true;
381
+ }
382
+ }
383
+
384
+ // For MJIT. cc_cme is supposed to have inlined `vm_cc_cme(cc)`.
385
+ static inline bool
386
+ vm_cc_valid_p(const struct rb_callcache *cc, const rb_callable_method_entry_t *cc_cme, VALUE klass)
387
+ {
388
+ VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
389
+ if (cc->klass == klass && !METHOD_ENTRY_INVALIDATED(cc_cme)) {
390
+ return 1;
391
+ }
392
+ else {
393
+ return 0;
394
+ }
395
+ }
396
+
397
+ extern const struct rb_callcache *rb_vm_empty_cc(void);
398
+ extern const struct rb_callcache *rb_vm_empty_cc_for_super(void);
399
+ #define vm_cc_empty() rb_vm_empty_cc()
400
+
401
+ /* callcache: mutate */
402
+
403
+ static inline void
404
+ vm_cc_call_set(const struct rb_callcache *cc, vm_call_handler call)
405
+ {
406
+ VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
407
+ VM_ASSERT(cc != vm_cc_empty());
408
+ *(vm_call_handler *)&cc->call_ = call;
409
+ }
410
+
411
+ static inline void
412
+ vm_cc_attr_index_set(const struct rb_callcache *cc, int index)
413
+ {
414
+ VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
415
+ VM_ASSERT(cc != vm_cc_empty());
416
+ *(int *)&cc->aux_.attr_index = index + 1;
417
+ }
418
+
419
+ static inline void
420
+ vm_cc_attr_index_initialize(const struct rb_callcache *cc)
421
+ {
422
+ VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
423
+ VM_ASSERT(cc != vm_cc_empty());
424
+ *(int *)&cc->aux_.attr_index = 0;
425
+ }
426
+
427
+ static inline void
428
+ vm_cc_method_missing_reason_set(const struct rb_callcache *cc, enum method_missing_reason reason)
429
+ {
430
+ VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
431
+ VM_ASSERT(cc != vm_cc_empty());
432
+ *(enum method_missing_reason *)&cc->aux_.method_missing_reason = reason;
433
+ }
434
+
435
+ static inline void
436
+ vm_cc_invalidate(const struct rb_callcache *cc)
437
+ {
438
+ VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
439
+ VM_ASSERT(cc != vm_cc_empty());
440
+ VM_ASSERT(cc->klass != 0); // should be enable
441
+
442
+ *(VALUE *)&cc->klass = 0;
443
+ RB_DEBUG_COUNTER_INC(cc_ent_invalidate);
444
+ }
445
+
446
+ /* calldata */
447
+
448
+ struct rb_call_data {
449
+ const struct rb_callinfo *ci;
450
+ const struct rb_callcache *cc;
451
+ };
452
+
453
+ struct rb_class_cc_entries {
454
+ #if VM_CHECK_MODE > 0
455
+ VALUE debug_sig;
456
+ #endif
457
+ int capa;
458
+ int len;
459
+ const struct rb_callable_method_entry_struct *cme;
460
+ struct rb_class_cc_entries_entry {
461
+ const struct rb_callinfo *ci;
462
+ const struct rb_callcache *cc;
463
+ } *entries;
464
+ };
465
+
466
+ #if VM_CHECK_MODE > 0
467
+
468
+ const rb_callable_method_entry_t *rb_vm_lookup_overloaded_cme(const rb_callable_method_entry_t *cme);
469
+ void rb_vm_dump_overloaded_cme_table(void);
470
+
471
+ static inline bool
472
+ vm_ccs_p(const struct rb_class_cc_entries *ccs)
473
+ {
474
+ return ccs->debug_sig == ~(VALUE)ccs;
475
+ }
476
+
477
+ static inline bool
478
+ vm_cc_check_cme(const struct rb_callcache *cc, const rb_callable_method_entry_t *cme)
479
+ {
480
+ if (vm_cc_cme(cc) == cme ||
481
+ (cme->def->iseq_overload && vm_cc_cme(cc) == rb_vm_lookup_overloaded_cme(cme))) {
482
+ return true;
483
+ }
484
+ else {
485
+ #if 1
486
+ // debug print
487
+
488
+ fprintf(stderr, "iseq_overload:%d\n", (int)cme->def->iseq_overload);
489
+ rp(cme);
490
+ rp(vm_cc_cme(cc));
491
+ rb_vm_lookup_overloaded_cme(cme);
492
+ #endif
493
+ return false;
494
+ }
495
+ }
496
+
497
+ #endif
498
+
499
+ // gc.c
500
+ void rb_vm_ccs_free(struct rb_class_cc_entries *ccs);
501
+
502
+ #endif /* RUBY_VM_CALLINFO_H */