debase-ruby_core_source 0.10.9 → 0.10.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/README.md +1 -1
  4. data/Rakefile +6 -3
  5. data/debase-ruby_core_source.gemspec +2 -1
  6. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/addr2line.h +2 -3
  7. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/builtin.h +17 -2
  8. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/build_assert/build_assert.h +0 -0
  9. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/check_type/check_type.h +0 -0
  10. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/container_of/container_of.h +0 -0
  11. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/list/list.h +0 -0
  12. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/ccan/str/str.h +0 -0
  13. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/constant.h +10 -5
  14. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/debug_counter.h +127 -48
  15. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/dln.h +3 -18
  16. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/encindex.h +3 -2
  17. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/eval_intern.h +16 -7
  18. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/gc.h +13 -2
  19. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/hrtime.h +0 -0
  20. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/id.h +0 -0
  21. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/id_table.h +2 -0
  22. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/insns.inc +0 -4
  23. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/insns_info.inc +323 -536
  24. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/array.h +119 -0
  25. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bignum.h +246 -0
  26. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bits.h +566 -0
  27. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/class.h +174 -0
  28. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compar.h +50 -0
  29. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compile.h +32 -0
  30. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compilers.h +108 -0
  31. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/complex.h +29 -0
  32. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/cont.h +25 -0
  33. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/dir.h +17 -0
  34. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enc.h +20 -0
  35. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/encoding.h +28 -0
  36. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enum.h +19 -0
  37. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enumerator.h +22 -0
  38. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/error.h +124 -0
  39. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/eval.h +33 -0
  40. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/file.h +39 -0
  41. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/fixnum.h +185 -0
  42. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/gc.h +161 -0
  43. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/hash.h +241 -0
  44. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/imemo.h +243 -0
  45. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/inits.h +51 -0
  46. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/io.h +35 -0
  47. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/load.h +19 -0
  48. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/loadpath.h +17 -0
  49. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/math.h +24 -0
  50. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/missing.h +19 -0
  51. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/numeric.h +255 -0
  52. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/object.h +83 -0
  53. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/parse.h +23 -0
  54. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/proc.h +33 -0
  55. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/process.h +136 -0
  56. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/random.h +17 -0
  57. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/range.h +41 -0
  58. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/rational.h +71 -0
  59. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/re.h +29 -0
  60. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/sanitizers.h +191 -0
  61. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/scheduler.h +44 -0
  62. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/serial.h +24 -0
  63. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/signal.h +22 -0
  64. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/static_assert.h +17 -0
  65. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/string.h +140 -0
  66. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/struct.h +154 -0
  67. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/symbol.h +41 -0
  68. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/thread.h +54 -0
  69. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/time.h +35 -0
  70. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/transcode.h +21 -0
  71. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/util.h +31 -0
  72. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/variable.h +84 -0
  73. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/vm.h +136 -0
  74. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/warnings.h +17 -0
  75. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal.h +107 -0
  76. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/iseq.h +11 -18
  77. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/known_errors.inc +0 -0
  78. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/method.h +21 -8
  79. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/mjit.h +89 -48
  80. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/mjit_compile.inc +2746 -2288
  81. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/node.h +32 -24
  82. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/node_name.inc +2 -2
  83. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/opt_sc.inc +0 -0
  84. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/optinsn.inc +0 -0
  85. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/optunifs.inc +0 -0
  86. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/parse.h +1 -0
  87. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/probes_helper.h +2 -0
  88. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ractor_core.h +343 -0
  89. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/regenc.h +0 -0
  90. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/regint.h +1 -1
  91. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/regparse.h +0 -0
  92. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/revision.h +2 -0
  93. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_assert.h +15 -0
  94. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_atomic.h +23 -0
  95. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/siphash.h +0 -0
  96. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/symbol.h +4 -4
  97. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/thread_pthread.h +45 -5
  98. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/thread_win32.h +28 -3
  99. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/timev.h +1 -0
  100. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/transcode_data.h +2 -3
  101. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/transient_heap.h +6 -3
  102. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/variable.h +22 -0
  103. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/version.h +23 -11
  104. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/vm.inc +707 -671
  105. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/vm_call_iseq_optimized.inc +93 -86
  106. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_callinfo.h +456 -0
  107. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/vm_core.h +262 -194
  108. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_debug.h +116 -0
  109. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/vm_exec.h +9 -6
  110. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/vm_insnhelper.h +28 -26
  111. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/vm_opts.h +6 -5
  112. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_sync.h +136 -0
  113. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.0.0-p0}/vmtc.inc +0 -4
  114. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/addr2line.h +2 -3
  115. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/builtin.h +83 -0
  116. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/build_assert/build_assert.h +13 -13
  117. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/check_type/check_type.h +17 -17
  118. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/container_of/container_of.h +63 -63
  119. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/list/list.h +262 -262
  120. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/ccan/str/str.h +4 -4
  121. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/constant.h +10 -9
  122. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/darray.h +198 -0
  123. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/debug_counter.h +137 -48
  124. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/dln.h +3 -23
  125. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/encindex.h +3 -2
  126. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/eval_intern.h +34 -41
  127. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/gc.h +24 -11
  128. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/hrtime.h +9 -9
  129. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/id.h +4 -3
  130. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/id_table.h +3 -1
  131. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/insns.inc +6 -8
  132. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/insns_info.inc +1907 -2543
  133. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/array.h +113 -0
  134. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/bignum.h +246 -0
  135. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/bits.h +565 -0
  136. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/class.h +188 -0
  137. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/compar.h +49 -0
  138. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/compile.h +35 -0
  139. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/compilers.h +107 -0
  140. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/complex.h +29 -0
  141. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/cont.h +24 -0
  142. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/dir.h +16 -0
  143. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/enc.h +19 -0
  144. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/encoding.h +30 -0
  145. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/enum.h +18 -0
  146. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/enumerator.h +21 -0
  147. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/error.h +191 -0
  148. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/eval.h +32 -0
  149. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/file.h +38 -0
  150. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/fixnum.h +184 -0
  151. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/gc.h +175 -0
  152. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/hash.h +243 -0
  153. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/imemo.h +243 -0
  154. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/inits.h +50 -0
  155. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/io.h +38 -0
  156. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/load.h +18 -0
  157. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/loadpath.h +16 -0
  158. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/math.h +23 -0
  159. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/missing.h +18 -0
  160. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/numeric.h +271 -0
  161. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/object.h +83 -0
  162. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/parse.h +23 -0
  163. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/proc.h +32 -0
  164. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/process.h +137 -0
  165. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/random.h +16 -0
  166. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/range.h +40 -0
  167. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/rational.h +72 -0
  168. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/re.h +30 -0
  169. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/sanitizers.h +190 -0
  170. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/serial.h +23 -0
  171. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/signal.h +21 -0
  172. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/static_assert.h +16 -0
  173. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/string.h +141 -0
  174. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/struct.h +153 -0
  175. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/symbol.h +40 -0
  176. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/thread.h +53 -0
  177. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/time.h +34 -0
  178. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/transcode.h +20 -0
  179. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/util.h +27 -0
  180. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/variable.h +83 -0
  181. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/vm.h +132 -0
  182. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal/warnings.h +16 -0
  183. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/internal.h +109 -0
  184. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/iseq.h +44 -35
  185. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/known_errors.inc +0 -0
  186. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/method.h +21 -4
  187. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/mjit.h +231 -0
  188. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/mjit_compile.inc +3322 -2940
  189. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/node.h +39 -23
  190. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/node_name.inc +210 -0
  191. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/opt_sc.inc +0 -2
  192. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/optinsn.inc +7 -7
  193. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/optunifs.inc +1 -1
  194. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/parse.h +9 -5
  195. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/probes_helper.h +9 -7
  196. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ractor_core.h +346 -0
  197. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/regenc.h +8 -8
  198. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/regint.h +16 -12
  199. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/regparse.h +2 -2
  200. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/revision.h +2 -0
  201. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ruby_assert.h +14 -0
  202. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/ruby_atomic.h +23 -0
  203. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/siphash.h +0 -0
  204. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/symbol.h +14 -14
  205. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/thread_pthread.h +45 -5
  206. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/thread_win32.h +30 -5
  207. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/timev.h +1 -0
  208. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/transcode_data.h +49 -50
  209. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/transient_heap.h +6 -3
  210. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/variable.h +21 -0
  211. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/version.h +15 -4
  212. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/vm.inc +1033 -887
  213. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_call_iseq_optimized.inc +244 -0
  214. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_callinfo.h +454 -0
  215. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/vm_core.h +508 -362
  216. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_debug.h +119 -0
  217. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/vm_exec.h +22 -18
  218. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview3 → ruby-3.1.0-preview1}/vm_insnhelper.h +42 -32
  219. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/vm_opts.h +8 -5
  220. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/vm_sync.h +137 -0
  221. data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.1.0-preview1}/vmtc.inc +6 -8
  222. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit.h +63 -0
  223. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_asm.h +392 -0
  224. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_codegen.h +19 -0
  225. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_core.h +302 -0
  226. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/yjit_iface.h +38 -0
  227. data/lib/debase/ruby_core_source/version.rb +1 -1
  228. data/lib/debase/ruby_core_source.rb +0 -2
  229. metadata +240 -110
  230. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/internal.h +0 -2682
  231. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/revision.h +0 -2
  232. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/ruby_assert.h +0 -15
  233. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/ruby_atomic.h +0 -244
  234. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vm_call_iseq_optimized.inc +0 -237
  235. data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/vm_debug.h +0 -34
  236. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/internal.h +0 -2657
  237. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/mjit.h +0 -175
  238. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/node_name.inc +0 -208
  239. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/revision.h +0 -2
  240. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/ruby_assert.h +0 -15
  241. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/ruby_atomic.h +0 -244
  242. data/lib/debase/ruby_core_source/ruby-2.7.0-preview3/vm_debug.h +0 -34
@@ -0,0 +1,174 @@
1
+ #ifndef INTERNAL_CLASS_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_CLASS_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header for Class.
11
+ */
12
+ #include "id_table.h" /* for struct rb_id_table */
13
+ #include "internal/gc.h" /* for RB_OBJ_WRITE */
14
+ #include "internal/serial.h" /* for rb_serial_t */
15
+ #include "ruby/internal/stdbool.h" /* for bool */
16
+ #include "ruby/intern.h" /* for rb_alloc_func_t */
17
+ #include "ruby/ruby.h" /* for struct RBasic */
18
+
19
+ #ifdef RCLASS_SUPER
20
+ # undef RCLASS_SUPER
21
+ #endif
22
+
23
+ struct rb_subclass_entry {
24
+ VALUE klass;
25
+ struct rb_subclass_entry *next;
26
+ };
27
+
28
+ struct rb_iv_index_tbl_entry {
29
+ uint32_t index;
30
+ rb_serial_t class_serial;
31
+ VALUE class_value;
32
+ };
33
+
34
+ struct rb_classext_struct {
35
+ struct st_table *iv_index_tbl; // ID -> struct rb_iv_index_tbl_entry
36
+ struct st_table *iv_tbl;
37
+ #if SIZEOF_SERIAL_T == SIZEOF_VALUE /* otherwise m_tbl is in struct RClass */
38
+ struct rb_id_table *m_tbl;
39
+ #endif
40
+ struct rb_id_table *const_tbl;
41
+ struct rb_id_table *callable_m_tbl;
42
+ struct rb_id_table *cc_tbl; /* ID -> [[ci, cc1], cc2, ...] */
43
+ struct rb_subclass_entry *subclasses;
44
+ struct rb_subclass_entry **parent_subclasses;
45
+ /**
46
+ * In the case that this is an `ICLASS`, `module_subclasses` points to the link
47
+ * in the module's `subclasses` list that indicates that the klass has been
48
+ * included. Hopefully that makes sense.
49
+ */
50
+ struct rb_subclass_entry **module_subclasses;
51
+ #if SIZEOF_SERIAL_T != SIZEOF_VALUE /* otherwise class_serial is in struct RClass */
52
+ rb_serial_t class_serial;
53
+ #endif
54
+ const VALUE origin_;
55
+ const VALUE refined_class;
56
+ rb_alloc_func_t allocator;
57
+ const VALUE includer;
58
+ };
59
+
60
+ struct RClass {
61
+ struct RBasic basic;
62
+ VALUE super;
63
+ struct rb_classext_struct *ptr;
64
+ #if SIZEOF_SERIAL_T == SIZEOF_VALUE
65
+ /* Class serial is as wide as VALUE. Place it here. */
66
+ rb_serial_t class_serial;
67
+ #else
68
+ /* Class serial does not fit into struct RClass. Place m_tbl instead. */
69
+ struct rb_id_table *m_tbl;
70
+ #endif
71
+ };
72
+
73
+ typedef struct rb_subclass_entry rb_subclass_entry_t;
74
+ typedef struct rb_classext_struct rb_classext_t;
75
+
76
+ #define RCLASS_EXT(c) (RCLASS(c)->ptr)
77
+ #define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
78
+ #define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
79
+ #if SIZEOF_SERIAL_T == SIZEOF_VALUE
80
+ # define RCLASS_M_TBL(c) (RCLASS_EXT(c)->m_tbl)
81
+ #else
82
+ # define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
83
+ #endif
84
+ #define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
85
+ #define RCLASS_CC_TBL(c) (RCLASS_EXT(c)->cc_tbl)
86
+ #define RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
87
+ #define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
88
+ #define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
89
+ #if SIZEOF_SERIAL_T == SIZEOF_VALUE
90
+ # define RCLASS_SERIAL(c) (RCLASS(c)->class_serial)
91
+ #else
92
+ # define RCLASS_SERIAL(c) (RCLASS_EXT(c)->class_serial)
93
+ #endif
94
+ #define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
95
+
96
+ #define RICLASS_IS_ORIGIN FL_USER5
97
+ #define RCLASS_CLONED FL_USER6
98
+ #define RICLASS_ORIGIN_SHARED_MTBL FL_USER8
99
+
100
+ /* class.c */
101
+ void rb_class_subclass_add(VALUE super, VALUE klass);
102
+ void rb_class_remove_from_super_subclasses(VALUE);
103
+ int rb_singleton_class_internal_p(VALUE sklass);
104
+ VALUE rb_class_boot(VALUE);
105
+ VALUE rb_make_metaclass(VALUE, VALUE);
106
+ VALUE rb_include_class_new(VALUE, VALUE);
107
+ void rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE);
108
+ void rb_class_detach_subclasses(VALUE);
109
+ void rb_class_detach_module_subclasses(VALUE);
110
+ void rb_class_remove_from_module_subclasses(VALUE);
111
+ VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj);
112
+ VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj);
113
+ VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj);
114
+ VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj);
115
+ VALUE rb_special_singleton_class(VALUE);
116
+ VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach);
117
+ VALUE rb_singleton_class_get(VALUE obj);
118
+ int rb_class_has_methods(VALUE c);
119
+ void rb_undef_methods_from(VALUE klass, VALUE super);
120
+
121
+ static inline void RCLASS_SET_ORIGIN(VALUE klass, VALUE origin);
122
+ static inline void RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass);
123
+ static inline VALUE RCLASS_SUPER(VALUE klass);
124
+ static inline VALUE RCLASS_SET_SUPER(VALUE klass, VALUE super);
125
+ static inline void RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass);
126
+
127
+ MJIT_SYMBOL_EXPORT_BEGIN
128
+ VALUE rb_class_inherited(VALUE, VALUE);
129
+ VALUE rb_keyword_error_new(const char *, VALUE);
130
+ MJIT_SYMBOL_EXPORT_END
131
+
132
+ static inline void
133
+ RCLASS_SET_ORIGIN(VALUE klass, VALUE origin)
134
+ {
135
+ RB_OBJ_WRITE(klass, &RCLASS_ORIGIN(klass), origin);
136
+ if (klass != origin) FL_SET(origin, RICLASS_IS_ORIGIN);
137
+ }
138
+
139
+ static inline void
140
+ RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass)
141
+ {
142
+ FL_SET(iclass, RICLASS_ORIGIN_SHARED_MTBL);
143
+ }
144
+
145
+ static inline bool
146
+ RICLASS_OWNS_M_TBL_P(VALUE iclass)
147
+ {
148
+ return FL_TEST_RAW(iclass, RICLASS_IS_ORIGIN | RICLASS_ORIGIN_SHARED_MTBL) == RICLASS_IS_ORIGIN;
149
+ }
150
+
151
+ static inline void
152
+ RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass)
153
+ {
154
+ RB_OBJ_WRITE(iclass, &RCLASS_INCLUDER(iclass), klass);
155
+ }
156
+
157
+ static inline VALUE
158
+ RCLASS_SUPER(VALUE klass)
159
+ {
160
+ return RCLASS(klass)->super;
161
+ }
162
+
163
+ static inline VALUE
164
+ RCLASS_SET_SUPER(VALUE klass, VALUE super)
165
+ {
166
+ if (super) {
167
+ rb_class_remove_from_super_subclasses(klass);
168
+ rb_class_subclass_add(super, klass);
169
+ }
170
+ RB_OBJ_WRITE(klass, &RCLASS(klass)->super, super);
171
+ return super;
172
+ }
173
+
174
+ #endif /* INTERNAL_CLASS_H */
@@ -0,0 +1,50 @@
1
+ #ifndef INTERNAL_COMPAR_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_COMPAR_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header for Comparable.
11
+ */
12
+ #include "internal/vm.h" /* for rb_method_basic_definition_p */
13
+
14
+ #define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString)
15
+
16
+ enum {
17
+ cmp_opt_Integer,
18
+ cmp_opt_String,
19
+ cmp_opt_Float,
20
+ cmp_optimizable_count
21
+ };
22
+
23
+ struct cmp_opt_data {
24
+ unsigned int opt_methods;
25
+ unsigned int opt_inited;
26
+ };
27
+
28
+ #define NEW_CMP_OPT_MEMO(type, value) \
29
+ NEW_PARTIAL_MEMO_FOR(type, value, cmp_opt)
30
+ #define CMP_OPTIMIZABLE_BIT(type) (1U << TOKEN_PASTE(cmp_opt_,type))
31
+ #define CMP_OPTIMIZABLE(data, type) \
32
+ (((data).opt_inited & CMP_OPTIMIZABLE_BIT(type)) ? \
33
+ ((data).opt_methods & CMP_OPTIMIZABLE_BIT(type)) : \
34
+ (((data).opt_inited |= CMP_OPTIMIZABLE_BIT(type)), \
35
+ rb_method_basic_definition_p(TOKEN_PASTE(rb_c,type), id_cmp) && \
36
+ ((data).opt_methods |= CMP_OPTIMIZABLE_BIT(type))))
37
+
38
+ #define OPTIMIZED_CMP(a, b, data) \
39
+ ((FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(data, Integer)) ? \
40
+ (((long)a > (long)b) ? 1 : ((long)a < (long)b) ? -1 : 0) : \
41
+ (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(data, String)) ? \
42
+ rb_str_cmp(a, b) : \
43
+ (RB_FLOAT_TYPE_P(a) && RB_FLOAT_TYPE_P(b) && CMP_OPTIMIZABLE(data, Float)) ? \
44
+ rb_float_cmp(a, b) : \
45
+ rb_cmpint(rb_funcallv(a, id_cmp, 1, &b), a, b))
46
+
47
+ /* compar.c */
48
+ VALUE rb_invcmp(VALUE, VALUE);
49
+
50
+ #endif /* INTERNAL_COMPAR_H */
@@ -0,0 +1,32 @@
1
+ #ifndef INTERNAL_COMPILE_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_COMPILE_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header for the compiler.
11
+ */
12
+ #include "ruby/internal/config.h"
13
+ #include <stddef.h> /* for size_t */
14
+ #include "ruby/ruby.h" /* for rb_event_flag_t */
15
+
16
+ struct rb_iseq_struct; /* in vm_core.h */
17
+
18
+ /* compile.c */
19
+ int rb_dvar_defined(ID, const struct rb_iseq_struct *);
20
+ int rb_local_defined(ID, const struct rb_iseq_struct *);
21
+ const char *rb_insns_name(int i);
22
+ VALUE rb_insns_name_array(void);
23
+
24
+ /* iseq.c */
25
+ int rb_vm_insn_addr2insn(const void *);
26
+
27
+ MJIT_SYMBOL_EXPORT_BEGIN
28
+ /* iseq.c (export) */
29
+ rb_event_flag_t rb_iseq_event_flags(const struct rb_iseq_struct *iseq, size_t pos);
30
+ MJIT_SYMBOL_EXPORT_END
31
+
32
+ #endif /* INTERNAL_COMPILE_H */
@@ -0,0 +1,108 @@
1
+ #ifndef INTERNAL_COMPILERS_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_COMPILERS_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header absorbing C compipler differences.
11
+ */
12
+ #include "ruby/internal/compiler_since.h"
13
+ #include "ruby/internal/has/attribute.h"
14
+ #include "ruby/internal/has/builtin.h"
15
+ #include "ruby/internal/has/c_attribute.h"
16
+ #include "ruby/internal/has/declspec_attribute.h"
17
+ #include "ruby/internal/has/extension.h"
18
+ #include "ruby/internal/has/feature.h"
19
+ #include "ruby/internal/has/warning.h"
20
+ #include "ruby/backward/2/gcc_version_since.h"
21
+
22
+ #define MSC_VERSION_SINCE(_) RBIMPL_COMPILER_SINCE(MSVC, (_) / 100, (_) % 100, 0)
23
+ #define MSC_VERSION_BEFORE(_) RBIMPL_COMPILER_BEFORE(MSVC, (_) / 100, (_) % 100, 0)
24
+
25
+ #ifndef __has_attribute
26
+ # define __has_attribute(...) RBIMPL_HAS_ATTRIBUTE(__VA_ARGS__)
27
+ #endif
28
+
29
+ #ifndef __has_c_attribute
30
+ # /* As of writing everything that lacks __has_c_attribute also completely
31
+ # * lacks C2x attributes as well. Might change in future? */
32
+ # define __has_c_attribute(...) 0
33
+ #endif
34
+
35
+ #ifndef __has_declspec_attribute
36
+ # define __has_declspec_attribute(...) RBIMPL_HAS_DECLSPEC_ATTRIBUTE(__VA_ARGS__)
37
+ #endif
38
+
39
+ #ifndef __has_builtin
40
+ # define __has_builtin(...) RBIMPL_HAS_BUILTIN(__VA_ARGS__)
41
+ #endif
42
+
43
+ #ifndef __has_feature
44
+ # define __has_feature(...) RBIMPL_HAS_FEATURE(__VA_ARGS__)
45
+ #endif
46
+
47
+ #ifndef __has_extension
48
+ # define __has_extension(...) RBIMPL_HAS_EXTENSION(__VA_ARGS__)
49
+ #endif
50
+
51
+ #ifndef __has_warning
52
+ # define __has_warning(...) RBIMPL_HAS_WARNING(__VA_ARGS__)
53
+ #endif
54
+
55
+ #ifndef __GNUC__
56
+ # define __extension__ /* void */
57
+ #endif
58
+
59
+ #ifndef MAYBE_UNUSED
60
+ # define MAYBE_UNUSED(x) x
61
+ #endif
62
+
63
+ #ifndef WARN_UNUSED_RESULT
64
+ # define WARN_UNUSED_RESULT(x) x
65
+ #endif
66
+
67
+ #define RB_OBJ_BUILTIN_TYPE(obj) rb_obj_builtin_type(obj)
68
+ #define OBJ_BUILTIN_TYPE(obj) RB_OBJ_BUILTIN_TYPE(obj)
69
+ #ifdef __GNUC__
70
+ #define rb_obj_builtin_type(obj) \
71
+ __extension__({ \
72
+ VALUE arg_obj = (obj); \
73
+ RB_SPECIAL_CONST_P(arg_obj) ? -1 : \
74
+ (int)RB_BUILTIN_TYPE(arg_obj); \
75
+ })
76
+ #else
77
+ # include "ruby/ruby.h"
78
+ static inline int
79
+ rb_obj_builtin_type(VALUE obj)
80
+ {
81
+ return RB_SPECIAL_CONST_P(obj) ? -1 :
82
+ (int)RB_BUILTIN_TYPE(obj);
83
+ }
84
+ #endif
85
+
86
+ /* A macro for defining a flexible array, like: VALUE ary[FLEX_ARY_LEN]; */
87
+ #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
88
+ # define FLEX_ARY_LEN /* VALUE ary[]; */
89
+ #elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
90
+ # define FLEX_ARY_LEN 0 /* VALUE ary[0]; */
91
+ #else
92
+ # define FLEX_ARY_LEN 1 /* VALUE ary[1]; */
93
+ #endif
94
+
95
+ /*
96
+ * For declaring bitfields out of non-unsigned int types:
97
+ * struct date {
98
+ * BITFIELD(enum months, month, 4);
99
+ * ...
100
+ * };
101
+ */
102
+ #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
103
+ # define BITFIELD(type, name, size) type name : size
104
+ #else
105
+ # define BITFIELD(type, name, size) unsigned int name : size
106
+ #endif
107
+
108
+ #endif /* INTERNAL_COMPILERS_H */
@@ -0,0 +1,29 @@
1
+ #ifndef INTERNAL_COMPLEX_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_COMPLEX_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header for Complex.
11
+ */
12
+ #include "ruby/internal/value.h" /* for struct RBasic */
13
+
14
+ struct RComplex {
15
+ struct RBasic basic;
16
+ VALUE real;
17
+ VALUE imag;
18
+ };
19
+
20
+ #define RCOMPLEX(obj) ((struct RComplex *)(obj))
21
+
22
+ /* shortcut macro for internal only */
23
+ #define RCOMPLEX_SET_REAL(cmp, r) RB_OBJ_WRITE((cmp), &RCOMPLEX(cmp)->real, (r))
24
+ #define RCOMPLEX_SET_IMAG(cmp, i) RB_OBJ_WRITE((cmp), &RCOMPLEX(cmp)->imag, (i))
25
+
26
+ /* complex.c */
27
+ VALUE rb_dbl_complex_new_polar_pi(double abs, double ang);
28
+
29
+ #endif /* INTERNAL_COMPLEX_H */
@@ -0,0 +1,25 @@
1
+ #ifndef INTERNAL_CONT_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_CONT_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header for Fiber.
11
+ */
12
+ #include "ruby/ruby.h" /* for VALUE */
13
+
14
+ struct rb_thread_struct; /* in vm_core.h */
15
+ struct rb_fiber_struct; /* in cont.c */
16
+
17
+ /* cont.c */
18
+ VALUE rb_obj_is_fiber(VALUE);
19
+ void rb_fiber_reset_root_local_storage(struct rb_thread_struct *);
20
+ void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(VALUE), VALUE (*rollback_func)(VALUE));
21
+ void rb_fiber_init_mjit_cont(struct rb_fiber_struct *fiber);
22
+
23
+ VALUE rb_fiberptr_self(struct rb_fiber_struct *fiber);
24
+
25
+ #endif /* INTERNAL_CONT_H */
@@ -0,0 +1,17 @@
1
+ #ifndef INTERNAL_DIR_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_DIR_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header for Dir.
11
+ */
12
+ #include "ruby/ruby.h" /* for VALUE */
13
+
14
+ /* dir.c */
15
+ VALUE rb_dir_getwd_ospath(void);
16
+
17
+ #endif /* INTERNAL_DIR_H */
@@ -0,0 +1,20 @@
1
+ #ifndef INTERNAL_ENC_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_ENC_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header for Encoding.
11
+ */
12
+ #include "ruby/encoding.h" /* for rb_encoding */
13
+
14
+ /* us_ascii.c */
15
+ extern rb_encoding OnigEncodingUS_ASCII;
16
+
17
+ /* utf_8.c */
18
+ extern rb_encoding OnigEncodingUTF_8;
19
+
20
+ #endif /* INTERNAL_ENC_H */
@@ -0,0 +1,28 @@
1
+ #ifndef INTERNAL_ENCODING_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_ENCODING_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header for Encoding.
11
+ */
12
+ #include "ruby/ruby.h" /* for ID */
13
+ #include "ruby/encoding.h" /* for rb_encoding */
14
+
15
+ /* encoding.c */
16
+ ID rb_id_encoding(void);
17
+ rb_encoding *rb_enc_get_from_index(int index);
18
+ rb_encoding *rb_enc_check_str(VALUE str1, VALUE str2);
19
+ int rb_encdb_replicate(const char *alias, const char *orig);
20
+ int rb_encdb_alias(const char *alias, const char *orig);
21
+ int rb_encdb_dummy(const char *name);
22
+ void rb_encdb_declare(const char *name);
23
+ void rb_enc_set_base(const char *name, const char *orig);
24
+ int rb_enc_set_dummy(int index);
25
+ void rb_encdb_set_unicode(int index);
26
+ PUREFUNC(int rb_data_is_encoding(VALUE obj));
27
+
28
+ #endif /* INTERNAL_ENCODING_H */
@@ -0,0 +1,19 @@
1
+ #ifndef INTERNAL_ENUM_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_ENUM_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header for Enumerable.
11
+ */
12
+ #include "ruby/ruby.h" /* for VALUE */
13
+
14
+ /* enum.c */
15
+ extern VALUE rb_cArithSeq;
16
+ VALUE rb_f_send(int argc, VALUE *argv, VALUE recv);
17
+ VALUE rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary);
18
+
19
+ #endif /* INTERNAL_ENUM_H */
@@ -0,0 +1,22 @@
1
+ #ifndef INTERNAL_ENUMERATOR_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_ENUMERATOR_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header for Enumerator.
11
+ */
12
+ #include "ruby/ruby.h" /* for VALUE */
13
+ #include "ruby/intern.h" /* for rb_enumerator_size_func */
14
+
15
+ RUBY_SYMBOL_EXPORT_BEGIN
16
+ /* enumerator.c (export) */
17
+ VALUE rb_arith_seq_new(VALUE obj, VALUE meth, int argc, VALUE const *argv,
18
+ rb_enumerator_size_func *size_fn,
19
+ VALUE beg, VALUE end, VALUE step, int excl);
20
+ RUBY_SYMBOL_EXPORT_END
21
+
22
+ #endif /* INTERNAL_ENUMERATOR_H */
@@ -0,0 +1,124 @@
1
+ #ifndef INTERNAL_ERROR_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_ERROR_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header for Exception.
11
+ */
12
+ #include "ruby/internal/config.h"
13
+ #include <stdarg.h> /* for va_list */
14
+ #include "internal/string.h" /* for rb_fstring_cstr */
15
+ #include "ruby/internal/stdbool.h" /* for bool */
16
+ #include "ruby/encoding.h" /* for rb_encoding */
17
+ #include "ruby/intern.h" /* for rb_exc_raise */
18
+ #include "ruby/ruby.h" /* for enum ruby_value_type */
19
+
20
+ #ifdef Check_Type
21
+ # undef Check_Type /* in ruby/ruby.h */
22
+ #endif
23
+
24
+ #ifdef rb_raise_static
25
+ # undef rb_raise_static
26
+ # undef rb_sys_fail_path
27
+ # undef rb_syserr_fail_path
28
+ #endif
29
+
30
+ #define rb_raise_static(e, m) \
31
+ rb_raise_cstr_i((e), rb_str_new_static((m), rb_strlen_lit(m)))
32
+ #ifdef RUBY_FUNCTION_NAME_STRING
33
+ # define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
34
+ # define rb_syserr_fail_path(err, path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
35
+ # define rb_syserr_new_path(err, path) rb_syserr_new_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
36
+ #else
37
+ # define rb_sys_fail_path(path) rb_sys_fail_str(path)
38
+ # define rb_syserr_fail_path(err, path) rb_syserr_fail_str((err), (path))
39
+ # define rb_syserr_new_path(err, path) rb_syserr_new_str((err), (path))
40
+ #endif
41
+
42
+ /* error.c */
43
+ extern long rb_backtrace_length_limit;
44
+ extern VALUE rb_eEAGAIN;
45
+ extern VALUE rb_eEWOULDBLOCK;
46
+ extern VALUE rb_eEINPROGRESS;
47
+ void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
48
+ NORETURN(void rb_async_bug_errno(const char *,int));
49
+ const char *rb_builtin_type_name(int t);
50
+ const char *rb_builtin_class_name(VALUE x);
51
+ PRINTF_ARGS(void rb_warn_deprecated(const char *fmt, const char *suggest, ...), 1, 3);
52
+ PRINTF_ARGS(void rb_warn_deprecated_to_remove(const char *fmt, const char *removal, ...), 1, 3);
53
+ VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
54
+ PRINTF_ARGS(void rb_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3);
55
+ PRINTF_ARGS(void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, 3);
56
+ PRINTF_ARGS(void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...), 3, 4);
57
+ rb_warning_category_t rb_warning_category_from_name(VALUE category);
58
+ bool rb_warning_category_enabled_p(rb_warning_category_t category);
59
+ VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method);
60
+ VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv);
61
+ VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name);
62
+ PRINTF_ARGS(VALUE rb_warning_string(const char *fmt, ...), 1, 2);
63
+ NORETURN(void rb_vraise(VALUE, const char *, va_list));
64
+ NORETURN(static inline void rb_raise_cstr(VALUE etype, const char *mesg));
65
+ NORETURN(static inline void rb_raise_cstr_i(VALUE etype, VALUE mesg));
66
+ NORETURN(static inline void rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name));
67
+ NORETURN(static inline void rb_name_err_raise(const char *mesg, VALUE recv, VALUE name));
68
+ NORETURN(static inline void rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name));
69
+ static inline void Check_Type(VALUE v, enum ruby_value_type t);
70
+ static inline bool rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type);
71
+ #define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline
72
+
73
+ RUBY_SYMBOL_EXPORT_BEGIN
74
+ /* error.c (export) */
75
+ int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
76
+ #ifdef RUBY_FUNCTION_NAME_STRING
77
+ NORETURN(void rb_sys_fail_path_in(const char *func_name, VALUE path));
78
+ NORETURN(void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path));
79
+ VALUE rb_syserr_new_path_in(const char *func_name, int n, VALUE path);
80
+ #endif
81
+ RUBY_SYMBOL_EXPORT_END
82
+
83
+ static inline void
84
+ rb_raise_cstr_i(VALUE etype, VALUE mesg)
85
+ {
86
+ VALUE exc = rb_exc_new_str(etype, mesg);
87
+ rb_exc_raise(exc);
88
+ }
89
+
90
+ static inline void
91
+ rb_raise_cstr(VALUE etype, const char *mesg)
92
+ {
93
+ VALUE str = rb_str_new_cstr(mesg);
94
+ rb_raise_cstr_i(etype, str);
95
+ }
96
+
97
+ static inline void
98
+ rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name)
99
+ {
100
+ VALUE exc = rb_name_err_new(mesg, recv, name);
101
+ rb_exc_raise(exc);
102
+ }
103
+
104
+ static inline void
105
+ rb_name_err_raise(const char *mesg, VALUE recv, VALUE name)
106
+ {
107
+ VALUE str = rb_fstring_cstr(mesg);
108
+ rb_name_err_raise_str(str, recv, name);
109
+ }
110
+
111
+ static inline void
112
+ rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name)
113
+ {
114
+ VALUE exc = rb_key_err_new(mesg, recv, name);
115
+ rb_exc_raise(exc);
116
+ }
117
+
118
+ static inline bool
119
+ rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type)
120
+ {
121
+ return RB_TYPE_P(obj, T_DATA) && RTYPEDDATA_P(obj) && (RTYPEDDATA_TYPE(obj) == data_type);
122
+ }
123
+
124
+ #endif /* INTERNAL_ERROR_H */