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,307 @@
1
+ #ifndef YJIT_CORE_H
2
+ #define YJIT_CORE_H 1
3
+
4
+ #include <stddef.h>
5
+ #include <stdint.h>
6
+ #include "yjit_asm.h"
7
+
8
+ // Callee-saved regs
9
+ #define REG_CFP R13
10
+ #define REG_EC R12
11
+ #define REG_SP RBX
12
+
13
+ // Scratch registers used by YJIT
14
+ #define REG0 RAX
15
+ #define REG0_32 EAX
16
+ #define REG0_8 AL
17
+ #define REG1 RCX
18
+ #define REG1_32 ECX
19
+
20
+ // Maximum number of temp value types we keep track of
21
+ #define MAX_TEMP_TYPES 8
22
+
23
+ // Maximum number of local variable types we keep track of
24
+ #define MAX_LOCAL_TYPES 8
25
+
26
+ // Default versioning context (no type information)
27
+ #define DEFAULT_CTX ( (ctx_t){ 0 } )
28
+
29
+ enum yjit_type_enum
30
+ {
31
+ ETYPE_UNKNOWN = 0,
32
+ ETYPE_NIL,
33
+ ETYPE_TRUE,
34
+ ETYPE_FALSE,
35
+ ETYPE_FIXNUM,
36
+ ETYPE_FLONUM,
37
+ ETYPE_ARRAY,
38
+ ETYPE_HASH,
39
+ ETYPE_SYMBOL,
40
+ ETYPE_STRING
41
+ };
42
+
43
+ // Represent the type of a value (local/stack/self) in YJIT
44
+ typedef struct yjit_type_struct
45
+ {
46
+ // Value is definitely a heap object
47
+ uint8_t is_heap : 1;
48
+
49
+ // Value is definitely an immediate
50
+ uint8_t is_imm : 1;
51
+
52
+ // Specific value type, if known
53
+ uint8_t type : 4;
54
+
55
+ } val_type_t;
56
+ STATIC_ASSERT(val_type_size, sizeof(val_type_t) == 1);
57
+
58
+ // Unknown type, could be anything, all zeroes
59
+ #define TYPE_UNKNOWN ( (val_type_t){ 0 } )
60
+
61
+ // Could be any heap object
62
+ #define TYPE_HEAP ( (val_type_t){ .is_heap = 1 } )
63
+
64
+ // Could be any immediate
65
+ #define TYPE_IMM ( (val_type_t){ .is_imm = 1 } )
66
+
67
+ #define TYPE_NIL ( (val_type_t){ .is_imm = 1, .type = ETYPE_NIL } )
68
+ #define TYPE_TRUE ( (val_type_t){ .is_imm = 1, .type = ETYPE_TRUE } )
69
+ #define TYPE_FALSE ( (val_type_t){ .is_imm = 1, .type = ETYPE_FALSE } )
70
+ #define TYPE_FIXNUM ( (val_type_t){ .is_imm = 1, .type = ETYPE_FIXNUM } )
71
+ #define TYPE_FLONUM ( (val_type_t){ .is_imm = 1, .type = ETYPE_FLONUM } )
72
+ #define TYPE_STATIC_SYMBOL ( (val_type_t){ .is_imm = 1, .type = ETYPE_SYMBOL } )
73
+ #define TYPE_ARRAY ( (val_type_t){ .is_heap = 1, .type = ETYPE_ARRAY } )
74
+ #define TYPE_HASH ( (val_type_t){ .is_heap = 1, .type = ETYPE_HASH } )
75
+ #define TYPE_STRING ( (val_type_t){ .is_heap = 1, .type = ETYPE_STRING } )
76
+
77
+ enum yjit_temp_loc
78
+ {
79
+ TEMP_STACK = 0,
80
+ TEMP_SELF,
81
+ TEMP_LOCAL, // Local with index
82
+ //TEMP_CONST, // Small constant (0, 1, 2, Qnil, Qfalse, Qtrue)
83
+ };
84
+
85
+ // Potential mapping of a value on the temporary stack to
86
+ // self, a local variable or constant so that we can track its type
87
+ typedef struct yjit_temp_mapping
88
+ {
89
+ // Where/how is the value stored?
90
+ uint8_t kind: 2;
91
+
92
+ // Index of the local variale,
93
+ // or small non-negative constant in [0, 63]
94
+ uint8_t idx : 6;
95
+
96
+ } temp_mapping_t;
97
+ STATIC_ASSERT(temp_mapping_size, sizeof(temp_mapping_t) == 1);
98
+
99
+ // By default, temps are just temps on the stack.
100
+ // Name conflict with an mmap flag. This is a struct instance,
101
+ // so the compiler will check for wrong usage.
102
+ #undef MAP_STACK
103
+ #define MAP_STACK ( (temp_mapping_t) { 0 } )
104
+
105
+ // Temp value is actually self
106
+ #define MAP_SELF ( (temp_mapping_t) { .kind = TEMP_SELF } )
107
+
108
+ // Represents both the type and mapping
109
+ typedef struct {
110
+ temp_mapping_t mapping;
111
+ val_type_t type;
112
+ } temp_type_mapping_t;
113
+ STATIC_ASSERT(temp_type_mapping_size, sizeof(temp_type_mapping_t) == 2);
114
+
115
+ // Operand to a bytecode instruction
116
+ typedef struct yjit_insn_opnd
117
+ {
118
+ // Indicates if the value is self
119
+ bool is_self;
120
+
121
+ // Index on the temporary stack (for stack operands only)
122
+ uint16_t idx;
123
+
124
+ } insn_opnd_t;
125
+
126
+ #define OPND_SELF ( (insn_opnd_t){ .is_self = true } )
127
+ #define OPND_STACK(stack_idx) ( (insn_opnd_t){ .is_self = false, .idx = stack_idx } )
128
+
129
+ /**
130
+ Code generation context
131
+ Contains information we can use to optimize code
132
+ */
133
+ typedef struct yjit_context
134
+ {
135
+ // Number of values currently on the temporary stack
136
+ uint16_t stack_size;
137
+
138
+ // Offset of the JIT SP relative to the interpreter SP
139
+ // This represents how far the JIT's SP is from the "real" SP
140
+ int16_t sp_offset;
141
+
142
+ // Depth of this block in the sidechain (eg: inline-cache chain)
143
+ uint8_t chain_depth;
144
+
145
+ // Local variable types we keepp track of
146
+ val_type_t local_types[MAX_LOCAL_TYPES];
147
+
148
+ // Temporary variable types we keep track of
149
+ val_type_t temp_types[MAX_TEMP_TYPES];
150
+
151
+ // Type we track for self
152
+ val_type_t self_type;
153
+
154
+ // Mapping of temp stack entries to types we track
155
+ temp_mapping_t temp_mapping[MAX_TEMP_TYPES];
156
+
157
+ } ctx_t;
158
+ STATIC_ASSERT(yjit_ctx_size, sizeof(ctx_t) <= 32);
159
+
160
+ // Tuple of (iseq, idx) used to identify basic blocks
161
+ typedef struct BlockId
162
+ {
163
+ // Instruction sequence
164
+ const rb_iseq_t *iseq;
165
+
166
+ // Index in the iseq where the block starts
167
+ uint32_t idx;
168
+
169
+ } blockid_t;
170
+
171
+ // Null block id constant
172
+ static const blockid_t BLOCKID_NULL = { 0, 0 };
173
+
174
+ /// Branch code shape enumeration
175
+ typedef enum branch_shape
176
+ {
177
+ SHAPE_NEXT0, // Target 0 is next
178
+ SHAPE_NEXT1, // Target 1 is next
179
+ SHAPE_DEFAULT // Neither target is next
180
+ } branch_shape_t;
181
+
182
+ // Branch code generation function signature
183
+ typedef void (*branchgen_fn)(codeblock_t* cb, uint8_t* target0, uint8_t* target1, uint8_t shape);
184
+
185
+ /**
186
+ Store info about an outgoing branch in a code segment
187
+ Note: care must be taken to minimize the size of branch_t objects
188
+ */
189
+ typedef struct yjit_branch_entry
190
+ {
191
+ // Block this is attached to
192
+ struct yjit_block_version *block;
193
+
194
+ // Positions where the generated code starts and ends
195
+ uint8_t *start_addr;
196
+ uint8_t *end_addr;
197
+
198
+ // Context right after the branch instruction
199
+ // Unused for now.
200
+ // ctx_t src_ctx;
201
+
202
+ // Branch target blocks and their contexts
203
+ blockid_t targets[2];
204
+ ctx_t target_ctxs[2];
205
+ struct yjit_block_version *blocks[2];
206
+
207
+ // Jump target addresses
208
+ uint8_t *dst_addrs[2];
209
+
210
+ // Branch code generation function
211
+ branchgen_fn gen_fn;
212
+
213
+ // Shape of the branch
214
+ branch_shape_t shape : 2;
215
+
216
+ } branch_t;
217
+
218
+ // In case this block is invalidated, these two pieces of info
219
+ // help to remove all pointers to this block in the system.
220
+ typedef struct {
221
+ VALUE receiver_klass;
222
+ VALUE callee_cme;
223
+ } cme_dependency_t;
224
+
225
+ typedef rb_darray(cme_dependency_t) cme_dependency_array_t;
226
+
227
+ typedef rb_darray(branch_t*) branch_array_t;
228
+
229
+ typedef rb_darray(uint32_t) int32_array_t;
230
+
231
+ /**
232
+ Basic block version
233
+ Represents a portion of an iseq compiled with a given context
234
+ Note: care must be taken to minimize the size of block_t objects
235
+ */
236
+ typedef struct yjit_block_version
237
+ {
238
+ // Bytecode sequence (iseq, idx) this is a version of
239
+ blockid_t blockid;
240
+
241
+ // Context at the start of the block
242
+ ctx_t ctx;
243
+
244
+ // Positions where the generated code starts and ends
245
+ uint8_t *start_addr;
246
+ uint8_t *end_addr;
247
+
248
+ // List of incoming branches (from predecessors)
249
+ branch_array_t incoming;
250
+
251
+ // List of outgoing branches (to successors)
252
+ // Note: these are owned by this block version
253
+ branch_array_t outgoing;
254
+
255
+ // Offsets for GC managed objects in the mainline code block
256
+ int32_array_t gc_object_offsets;
257
+
258
+ // CME dependencies of this block, to help to remove all pointers to this
259
+ // block in the system.
260
+ cme_dependency_array_t cme_dependencies;
261
+
262
+ // Code address of an exit for `ctx` and `blockid`. Used for block
263
+ // invalidation.
264
+ uint8_t *entry_exit;
265
+
266
+ // Index one past the last instruction in the iseq
267
+ uint32_t end_idx;
268
+
269
+ } block_t;
270
+
271
+ // Code generation state
272
+ typedef struct JITState
273
+ {
274
+ // Inline and outlined code blocks we are
275
+ // currently generating code into
276
+ codeblock_t* cb;
277
+ codeblock_t* ocb;
278
+
279
+ // Block version being compiled
280
+ block_t *block;
281
+
282
+ // Instruction sequence this is associated with
283
+ const rb_iseq_t *iseq;
284
+
285
+ // Index of the current instruction being compiled
286
+ uint32_t insn_idx;
287
+
288
+ // Opcode for the instruction being compiled
289
+ int opcode;
290
+
291
+ // PC of the instruction being compiled
292
+ VALUE *pc;
293
+
294
+ // Side exit to the instruction being compiled. See :side-exit:.
295
+ uint8_t *side_exit_for_pc;
296
+
297
+ // Execution context when compilation started
298
+ // This allows us to peek at run-time values
299
+ rb_execution_context_t *ec;
300
+
301
+ // Whether we need to record the code address at
302
+ // the end of this bytecode instruction for global invalidation
303
+ bool record_boundary_patch_point;
304
+
305
+ } jitstate_t;
306
+
307
+ #endif // #ifndef YJIT_CORE_H
@@ -0,0 +1,38 @@
1
+ //
2
+ // These are definitions YJIT uses to interface with the CRuby codebase,
3
+ // but which are only used internally by YJIT.
4
+ //
5
+
6
+ #ifndef YJIT_IFACE_H
7
+ #define YJIT_IFACE_H 1
8
+
9
+ #include "ruby/internal/config.h"
10
+ #include "ruby_assert.h" // for RUBY_DEBUG
11
+ #include "yjit.h" // for YJIT_STATS
12
+ #include "vm_core.h"
13
+ #include "yjit_core.h"
14
+
15
+ #ifndef YJIT_DEFAULT_CALL_THRESHOLD
16
+ # define YJIT_DEFAULT_CALL_THRESHOLD 10
17
+ #endif
18
+
19
+ RUBY_EXTERN struct rb_yjit_options rb_yjit_opts;
20
+
21
+ static VALUE *yjit_iseq_pc_at_idx(const rb_iseq_t *iseq, uint32_t insn_idx);
22
+ static int yjit_opcode_at_pc(const rb_iseq_t *iseq, const VALUE *pc);
23
+ static void yjit_print_iseq(const rb_iseq_t *iseq);
24
+
25
+ #if YJIT_STATS
26
+ // this function *must* return passed exit_pc
27
+ static const VALUE *yjit_count_side_exit_op(const VALUE *exit_pc);
28
+ #endif
29
+
30
+ static void yjit_unlink_method_lookup_dependency(block_t *block);
31
+ static void yjit_block_assumptions_free(block_t *block);
32
+
33
+ static VALUE yjit_get_code_page(uint32_t cb_bytes_needed, uint32_t ocb_bytes_needed);
34
+ //code_page_t *rb_yjit_code_page_unwrap(VALUE cp_obj);
35
+ //void rb_yjit_get_cb(codeblock_t* cb, uint8_t* code_ptr);
36
+ //void rb_yjit_get_ocb(codeblock_t* cb, uint8_t* code_ptr);
37
+
38
+ #endif // #ifndef YJIT_IFACE_H
@@ -0,0 +1,20 @@
1
+ #ifndef RUBY_ADDR2LINE_H
2
+ #define RUBY_ADDR2LINE_H
3
+ /**********************************************************************
4
+
5
+ addr2line.h -
6
+
7
+ $Author$
8
+
9
+ Copyright (C) 2010 Shinichiro Hamaji
10
+
11
+ **********************************************************************/
12
+
13
+ #if (defined(USE_ELF) || defined(HAVE_MACH_O_LOADER_H))
14
+
15
+ void
16
+ rb_dump_backtrace_with_lines(int num_traces, void **traces);
17
+
18
+ #endif /* USE_ELF */
19
+
20
+ #endif /* RUBY_ADDR2LINE_H */
@@ -0,0 +1,121 @@
1
+ #ifndef BUILTIN_H_INCLUDED
2
+ #define BUILTIN_H_INCLUDED
3
+
4
+ // invoke
5
+
6
+ struct rb_builtin_function {
7
+ // for invocation
8
+ const void * const func_ptr;
9
+ const int argc;
10
+
11
+ // for load
12
+ const int index;
13
+ const char * const name;
14
+
15
+ // for jit
16
+ void (*compiler)(FILE *, long, unsigned, bool);
17
+ };
18
+
19
+ #define RB_BUILTIN_FUNCTION(_i, _name, _fname, _arity, _compiler) {\
20
+ .name = #_name, \
21
+ .func_ptr = (void *)_fname, \
22
+ .argc = _arity, \
23
+ .index = _i, \
24
+ .compiler = _compiler, \
25
+ }
26
+
27
+ void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table);
28
+
29
+ #ifndef rb_execution_context_t
30
+ typedef struct rb_execution_context_struct rb_execution_context_t;
31
+ #define rb_execution_context_t rb_execution_context_t
32
+ #endif
33
+
34
+ /* The following code is generated by the following Ruby script:
35
+
36
+ typedef = proc {|i, args|
37
+ "typedef VALUE (*rb_builtin_arity#{i}_function_type)(rb_execution_context_t *ec, VALUE self#{args});"
38
+ }
39
+ puts typedef[0, ""]
40
+ (1..15).each {|i|
41
+ puts typedef[i, ",\n " + (0...i).map{"VALUE"}.join(", ")]
42
+ }
43
+ 16.times{|i|
44
+ puts "static inline void rb_builtin_function_check_arity#{i}(rb_builtin_arity#{i}_function_type f){}"
45
+ }
46
+ */
47
+
48
+ typedef VALUE (*rb_builtin_arity0_function_type)(rb_execution_context_t *ec, VALUE self);
49
+ typedef VALUE (*rb_builtin_arity1_function_type)(rb_execution_context_t *ec, VALUE self,
50
+ VALUE);
51
+ typedef VALUE (*rb_builtin_arity2_function_type)(rb_execution_context_t *ec, VALUE self,
52
+ VALUE, VALUE);
53
+ typedef VALUE (*rb_builtin_arity3_function_type)(rb_execution_context_t *ec, VALUE self,
54
+ VALUE, VALUE, VALUE);
55
+ typedef VALUE (*rb_builtin_arity4_function_type)(rb_execution_context_t *ec, VALUE self,
56
+ VALUE, VALUE, VALUE, VALUE);
57
+ typedef VALUE (*rb_builtin_arity5_function_type)(rb_execution_context_t *ec, VALUE self,
58
+ VALUE, VALUE, VALUE, VALUE, VALUE);
59
+ typedef VALUE (*rb_builtin_arity6_function_type)(rb_execution_context_t *ec, VALUE self,
60
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
61
+ typedef VALUE (*rb_builtin_arity7_function_type)(rb_execution_context_t *ec, VALUE self,
62
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
63
+ typedef VALUE (*rb_builtin_arity8_function_type)(rb_execution_context_t *ec, VALUE self,
64
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
65
+ typedef VALUE (*rb_builtin_arity9_function_type)(rb_execution_context_t *ec, VALUE self,
66
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
67
+ typedef VALUE (*rb_builtin_arity10_function_type)(rb_execution_context_t *ec, VALUE self,
68
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
69
+ typedef VALUE (*rb_builtin_arity11_function_type)(rb_execution_context_t *ec, VALUE self,
70
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
71
+ typedef VALUE (*rb_builtin_arity12_function_type)(rb_execution_context_t *ec, VALUE self,
72
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
73
+ typedef VALUE (*rb_builtin_arity13_function_type)(rb_execution_context_t *ec, VALUE self,
74
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
75
+ typedef VALUE (*rb_builtin_arity14_function_type)(rb_execution_context_t *ec, VALUE self,
76
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
77
+ typedef VALUE (*rb_builtin_arity15_function_type)(rb_execution_context_t *ec, VALUE self,
78
+ VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
79
+ static inline void rb_builtin_function_check_arity0(rb_builtin_arity0_function_type f){}
80
+ static inline void rb_builtin_function_check_arity1(rb_builtin_arity1_function_type f){}
81
+ static inline void rb_builtin_function_check_arity2(rb_builtin_arity2_function_type f){}
82
+ static inline void rb_builtin_function_check_arity3(rb_builtin_arity3_function_type f){}
83
+ static inline void rb_builtin_function_check_arity4(rb_builtin_arity4_function_type f){}
84
+ static inline void rb_builtin_function_check_arity5(rb_builtin_arity5_function_type f){}
85
+ static inline void rb_builtin_function_check_arity6(rb_builtin_arity6_function_type f){}
86
+ static inline void rb_builtin_function_check_arity7(rb_builtin_arity7_function_type f){}
87
+ static inline void rb_builtin_function_check_arity8(rb_builtin_arity8_function_type f){}
88
+ static inline void rb_builtin_function_check_arity9(rb_builtin_arity9_function_type f){}
89
+ static inline void rb_builtin_function_check_arity10(rb_builtin_arity10_function_type f){}
90
+ static inline void rb_builtin_function_check_arity11(rb_builtin_arity11_function_type f){}
91
+ static inline void rb_builtin_function_check_arity12(rb_builtin_arity12_function_type f){}
92
+ static inline void rb_builtin_function_check_arity13(rb_builtin_arity13_function_type f){}
93
+ static inline void rb_builtin_function_check_arity14(rb_builtin_arity14_function_type f){}
94
+ static inline void rb_builtin_function_check_arity15(rb_builtin_arity15_function_type f){}
95
+
96
+ PUREFUNC(VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index));
97
+ VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index);
98
+
99
+ // __builtin_inline!
100
+
101
+ PUREFUNC(static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index));
102
+
103
+ static inline VALUE
104
+ rb_vm_lvar(rb_execution_context_t *ec, int index)
105
+ {
106
+ #if defined(VM_CORE_H_EC_DEFINED) && VM_CORE_H_EC_DEFINED
107
+ return ec->cfp->ep[index];
108
+ #else
109
+ return rb_vm_lvar_exposed(ec, index);
110
+ #endif
111
+ }
112
+
113
+ // dump/load
114
+
115
+ struct builtin_binary {
116
+ const char *feature; // feature name
117
+ const unsigned char *bin; // binary by ISeq#to_binary
118
+ size_t bin_size;
119
+ };
120
+
121
+ #endif // BUILTIN_H_INCLUDED
@@ -0,0 +1,40 @@
1
+ /* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
2
+ #ifndef CCAN_BUILD_ASSERT_H
3
+ #define CCAN_BUILD_ASSERT_H
4
+
5
+ /**
6
+ * CCAN_BUILD_ASSERT - assert a build-time dependency.
7
+ * @cond: the compile-time condition which must be true.
8
+ *
9
+ * Your compile will fail if the condition isn't true, or can't be evaluated
10
+ * by the compiler. This can only be used within a function.
11
+ *
12
+ * Example:
13
+ * #include <stddef.h>
14
+ * ...
15
+ * static char *foo_to_char(struct foo *foo)
16
+ * {
17
+ * // This code needs string to be at start of foo.
18
+ * CCAN_BUILD_ASSERT(offsetof(struct foo, string) == 0);
19
+ * return (char *)foo;
20
+ * }
21
+ */
22
+ #define CCAN_BUILD_ASSERT(cond) \
23
+ do { (void) sizeof(char [1 - 2*!(cond)]); } while(0)
24
+
25
+ /**
26
+ * CCAN_BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.
27
+ * @cond: the compile-time condition which must be true.
28
+ *
29
+ * Your compile will fail if the condition isn't true, or can't be evaluated
30
+ * by the compiler. This can be used in an expression: its value is "0".
31
+ *
32
+ * Example:
33
+ * #define foo_to_char(foo) \
34
+ * ((char *)(foo) \
35
+ * + CCAN_BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0))
36
+ */
37
+ #define CCAN_BUILD_ASSERT_OR_ZERO(cond) \
38
+ (sizeof(char [1 - 2*!(cond)]) - 1)
39
+
40
+ #endif /* CCAN_BUILD_ASSERT_H */
@@ -0,0 +1,63 @@
1
+ /* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
2
+ #ifndef CCAN_CHECK_TYPE_H
3
+ #define CCAN_CHECK_TYPE_H
4
+
5
+ /**
6
+ * ccan_check_type - issue a warning or build failure if type is not correct.
7
+ * @expr: the expression whose type we should check (not evaluated).
8
+ * @type: the exact type we expect the expression to be.
9
+ *
10
+ * This macro is usually used within other macros to try to ensure that a macro
11
+ * argument is of the expected type. No type promotion of the expression is
12
+ * done: an unsigned int is not the same as an int!
13
+ *
14
+ * ccan_check_type() always evaluates to 0.
15
+ *
16
+ * If your compiler does not support typeof, then the best we can do is fail
17
+ * to compile if the sizes of the types are unequal (a less complete check).
18
+ *
19
+ * Example:
20
+ * // They should always pass a 64-bit value to _set_some_value!
21
+ * #define set_some_value(expr) \
22
+ * _set_some_value((ccan_check_type((expr), uint64_t), (expr)))
23
+ */
24
+
25
+ /**
26
+ * ccan_check_types_match - issue a warning or build failure if types are not same.
27
+ * @expr1: the first expression (not evaluated).
28
+ * @expr2: the second expression (not evaluated).
29
+ *
30
+ * This macro is usually used within other macros to try to ensure that
31
+ * arguments are of identical types. No type promotion of the expressions is
32
+ * done: an unsigned int is not the same as an int!
33
+ *
34
+ * ccan_check_types_match() always evaluates to 0.
35
+ *
36
+ * If your compiler does not support typeof, then the best we can do is fail
37
+ * to compile if the sizes of the types are unequal (a less complete check).
38
+ *
39
+ * Example:
40
+ * // Do subtraction to get to enclosing type, but make sure that
41
+ * // pointer is of correct type for that member.
42
+ * #define ccan_container_of(mbr_ptr, encl_type, mbr) \
43
+ * (ccan_check_types_match((mbr_ptr), &((encl_type *)0)->mbr), \
44
+ * ((encl_type *) \
45
+ * ((char *)(mbr_ptr) - offsetof(enclosing_type, mbr))))
46
+ */
47
+ #if HAVE_TYPEOF
48
+ #define ccan_check_type(expr, type) \
49
+ ((typeof(expr) *)0 != (type *)0)
50
+
51
+ #define ccan_check_types_match(expr1, expr2) \
52
+ ((typeof(expr1) *)0 != (typeof(expr2) *)0)
53
+ #else
54
+ #include "ccan/build_assert/build_assert.h"
55
+ /* Without typeof, we can only test the sizes. */
56
+ #define ccan_check_type(expr, type) \
57
+ CCAN_BUILD_ASSERT_OR_ZERO(sizeof(expr) == sizeof(type))
58
+
59
+ #define ccan_check_types_match(expr1, expr2) \
60
+ CCAN_BUILD_ASSERT_OR_ZERO(sizeof(expr1) == sizeof(expr2))
61
+ #endif /* HAVE_TYPEOF */
62
+
63
+ #endif /* CCAN_CHECK_TYPE_H */