debase-ruby_core_source 0.10.9 → 0.10.13

Sign up to get free protection for your applications and to get access to all the features.
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,34 @@
1
+ #ifndef INTERNAL_TIME_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_TIME_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header for Time.
10
+ */
11
+ #include "ruby/internal/config.h" /* for SIGNEDNESS_OF_TIME_T */
12
+ #include "internal/bits.h" /* for SIGNED_INTEGER_MAX */
13
+ #include "ruby/ruby.h" /* for VALUE */
14
+
15
+ #if SIGNEDNESS_OF_TIME_T < 0 /* signed */
16
+ # define TIMET_MAX SIGNED_INTEGER_MAX(time_t)
17
+ # define TIMET_MIN SIGNED_INTEGER_MIN(time_t)
18
+ #elif SIGNEDNESS_OF_TIME_T > 0 /* unsigned */
19
+ # define TIMET_MAX UNSIGNED_INTEGER_MAX(time_t)
20
+ # define TIMET_MIN ((time_t)0)
21
+ #endif
22
+
23
+ struct timeval; /* <- in <sys/time.h> or <winsock2.h> */
24
+
25
+ /* time.c */
26
+ struct timeval rb_time_timeval(VALUE);
27
+
28
+ RUBY_SYMBOL_EXPORT_BEGIN
29
+ /* time.c (export) */
30
+ void ruby_reset_leap_second_info(void);
31
+ void ruby_reset_timezone(void);
32
+ RUBY_SYMBOL_EXPORT_END
33
+
34
+ #endif /* INTERNAL_TIME_H */
@@ -0,0 +1,20 @@
1
+ #ifndef INTERNAL_TRANSCODE_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_TRANSCODE_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header for Encoding::Converter.
10
+ */
11
+ #include "ruby/internal/config.h"
12
+ #include <stddef.h> /* for size_t */
13
+ #include "ruby/ruby.h" /* for VALUE */
14
+ #include "ruby/encoding.h" /* for rb_econv_t */
15
+
16
+ /* transcode.c */
17
+ extern VALUE rb_cEncodingConverter;
18
+ size_t rb_econv_memsize(rb_econv_t *);
19
+
20
+ #endif /* INTERNAL_TRANSCODE_H */
@@ -0,0 +1,27 @@
1
+ #ifndef INTERNAL_UTIL_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_UTIL_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header corresponding util.c.
10
+ * @warning DO NOT ADD RANDOM GARBAGE HERE THIS FILE IS FOR util.c
11
+ */
12
+ #include "ruby/internal/config.h"
13
+ #include <stddef.h> /* for size_t */
14
+
15
+ #ifdef HAVE_SYS_TYPES_H
16
+ # include <sys/types.h> /* for ssize_t (note: on Windows ssize_t is */
17
+ #endif /* `#define`d in ruby/config.h) */
18
+
19
+ /* util.c */
20
+ char *ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve);
21
+ char *ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve);
22
+
23
+ RUBY_SYMBOL_EXPORT_BEGIN
24
+ /* util.c (export) */
25
+ RUBY_SYMBOL_EXPORT_END
26
+
27
+ #endif /* INTERNAL_UTIL_H */
@@ -0,0 +1,83 @@
1
+ #ifndef INTERNAL_VARIABLE_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_VARIABLE_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header for variables.
10
+ */
11
+ #include "ruby/internal/config.h"
12
+ #include <stddef.h> /* for size_t */
13
+ #include "constant.h" /* for rb_const_entry_t */
14
+ #include "ruby/internal/stdbool.h" /* for bool */
15
+ #include "ruby/ruby.h" /* for VALUE */
16
+
17
+ /* global variable */
18
+
19
+ #define ROBJECT_TRANSIENT_FLAG FL_USER13
20
+
21
+ /* variable.c */
22
+ void rb_gc_mark_global_tbl(void);
23
+ void rb_gc_update_global_tbl(void);
24
+ size_t rb_generic_ivar_memsize(VALUE);
25
+ VALUE rb_search_class_path(VALUE);
26
+ VALUE rb_attr_delete(VALUE, ID);
27
+ VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
28
+ void rb_autoload_str(VALUE mod, ID id, VALUE file);
29
+ VALUE rb_autoload_at_p(VALUE, ID, int);
30
+ NORETURN(VALUE rb_mod_const_missing(VALUE,VALUE));
31
+ rb_gvar_getter_t *rb_gvar_getter_function_of(ID);
32
+ rb_gvar_setter_t *rb_gvar_setter_function_of(ID);
33
+ void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_);
34
+ void rb_gvar_ractor_local(const char *name);
35
+ static inline bool ROBJ_TRANSIENT_P(VALUE obj);
36
+ static inline void ROBJ_TRANSIENT_SET(VALUE obj);
37
+ static inline void ROBJ_TRANSIENT_UNSET(VALUE obj);
38
+ uint32_t rb_obj_ensure_iv_index_mapping(VALUE obj, ID id);
39
+
40
+ RUBY_SYMBOL_EXPORT_BEGIN
41
+ /* variable.c (export) */
42
+ void rb_mark_generic_ivar(VALUE);
43
+ void rb_mv_generic_ivar(VALUE src, VALUE dst);
44
+ VALUE rb_const_missing(VALUE klass, VALUE name);
45
+ int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
46
+ void rb_iv_tbl_copy(VALUE dst, VALUE src);
47
+ RUBY_SYMBOL_EXPORT_END
48
+
49
+ MJIT_SYMBOL_EXPORT_BEGIN
50
+ VALUE rb_gvar_get(ID);
51
+ VALUE rb_gvar_set(ID, VALUE);
52
+ VALUE rb_gvar_defined(ID);
53
+ void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID);
54
+ void rb_init_iv_list(VALUE obj);
55
+ MJIT_SYMBOL_EXPORT_END
56
+
57
+ static inline bool
58
+ ROBJ_TRANSIENT_P(VALUE obj)
59
+ {
60
+ #if USE_TRANSIENT_HEAP
61
+ return FL_TEST_RAW(obj, ROBJECT_TRANSIENT_FLAG);
62
+ #else
63
+ return false;
64
+ #endif
65
+ }
66
+
67
+ static inline void
68
+ ROBJ_TRANSIENT_SET(VALUE obj)
69
+ {
70
+ #if USE_TRANSIENT_HEAP
71
+ FL_SET_RAW(obj, ROBJECT_TRANSIENT_FLAG);
72
+ #endif
73
+ }
74
+
75
+ static inline void
76
+ ROBJ_TRANSIENT_UNSET(VALUE obj)
77
+ {
78
+ #if USE_TRANSIENT_HEAP
79
+ FL_UNSET_RAW(obj, ROBJECT_TRANSIENT_FLAG);
80
+ #endif
81
+ }
82
+
83
+ #endif /* INTERNAL_VARIABLE_H */
@@ -0,0 +1,132 @@
1
+ #ifndef INTERNAL_VM_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_VM_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header for RubyVM.
10
+ */
11
+ #include "ruby/internal/stdbool.h" /* for bool */
12
+ #include "internal/serial.h" /* for rb_serial_t */
13
+ #include "internal/static_assert.h" /* for STATIC_ASSERT */
14
+ #include "ruby/ruby.h" /* for ID */
15
+ #include "ruby/st.h" /* for st_table */
16
+
17
+ #ifdef rb_funcallv
18
+ # undef rb_funcallv
19
+ #endif
20
+
21
+ #ifdef rb_method_basic_definition_p
22
+ # undef rb_method_basic_definition_p
23
+ #endif
24
+
25
+ struct rb_callable_method_entry_struct; /* in method.h */
26
+ struct rb_method_definition_struct; /* in method.h */
27
+ struct rb_execution_context_struct; /* in vm_core.h */
28
+ struct rb_control_frame_struct; /* in vm_core.h */
29
+ struct rb_callinfo; /* in vm_core.h */
30
+
31
+ enum method_missing_reason {
32
+ MISSING_NOENTRY = 0x00,
33
+ MISSING_PRIVATE = 0x01,
34
+ MISSING_PROTECTED = 0x02,
35
+ MISSING_FCALL = 0x04,
36
+ MISSING_VCALL = 0x08,
37
+ MISSING_SUPER = 0x10,
38
+ MISSING_MISSING = 0x20,
39
+ MISSING_NONE = 0x40
40
+ };
41
+
42
+ /* vm_insnhelper.h */
43
+ rb_serial_t rb_next_class_serial(void);
44
+
45
+ /* vm.c */
46
+ VALUE rb_obj_is_thread(VALUE obj);
47
+ void rb_vm_mark(void *ptr);
48
+ void rb_vm_each_stack_value(void *ptr, void (*cb)(VALUE, void*), void *ctx);
49
+ PUREFUNC(VALUE rb_vm_top_self(void));
50
+ void rb_vm_inc_const_missing_count(void);
51
+ const void **rb_vm_get_insns_address_table(void);
52
+ VALUE rb_source_location(int *pline);
53
+ const char *rb_source_location_cstr(int *pline);
54
+ MJIT_STATIC void rb_vm_pop_cfunc_frame(void);
55
+ int rb_vm_add_root_module(VALUE module);
56
+ void rb_vm_check_redefinition_by_prepend(VALUE klass);
57
+ int rb_vm_check_optimizable_mid(VALUE mid);
58
+ VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
59
+ MJIT_STATIC VALUE ruby_vm_special_exception_copy(VALUE);
60
+ PUREFUNC(st_table *rb_vm_fstring_table(void));
61
+
62
+ MJIT_SYMBOL_EXPORT_BEGIN
63
+ VALUE vm_exec(struct rb_execution_context_struct *, bool); /* used in JIT-ed code */
64
+ MJIT_SYMBOL_EXPORT_END
65
+
66
+ /* vm_eval.c */
67
+ VALUE rb_current_realfilepath(void);
68
+ VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
69
+ typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
70
+ VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
71
+ rb_check_funcall_hook *hook, VALUE arg);
72
+ VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *argv,
73
+ rb_check_funcall_hook *hook, VALUE arg, int kw_splat);
74
+ const char *rb_type_str(enum ruby_value_type type);
75
+ VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
76
+ VALUE rb_check_funcall_basic_kw(VALUE, ID, VALUE, int, const VALUE*, int);
77
+ VALUE rb_yield_1(VALUE val);
78
+ VALUE rb_yield_force_blockarg(VALUE values);
79
+ VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
80
+ rb_block_call_func_t bl_proc, int min_argc, int max_argc,
81
+ VALUE data2);
82
+ void rb_check_stack_overflow(void);
83
+
84
+ /* vm_insnhelper.c */
85
+ VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
86
+ VALUE rb_eql_opt(VALUE obj1, VALUE obj2);
87
+
88
+ struct rb_iseq_struct;
89
+ MJIT_SYMBOL_EXPORT_BEGIN
90
+ const struct rb_callcache *rb_vm_search_method_slowpath(const struct rb_callinfo *ci, VALUE klass);
91
+ MJIT_SYMBOL_EXPORT_END
92
+
93
+ /* vm_method.c */
94
+ struct rb_execution_context_struct;
95
+ MJIT_SYMBOL_EXPORT_BEGIN
96
+ int rb_ec_obj_respond_to(struct rb_execution_context_struct *ec, VALUE obj, ID id, int priv);
97
+ MJIT_SYMBOL_EXPORT_END
98
+
99
+ /* vm_dump.c */
100
+ void rb_print_backtrace(void);
101
+
102
+ /* vm_backtrace.c */
103
+ VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
104
+ VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval);
105
+ VALUE rb_vm_backtrace(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
106
+ VALUE rb_vm_backtrace_locations(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
107
+ VALUE rb_make_backtrace(void);
108
+ void rb_backtrace_print_as_bugreport(void);
109
+ int rb_backtrace_p(VALUE obj);
110
+ VALUE rb_backtrace_to_str_ary(VALUE obj);
111
+ VALUE rb_backtrace_to_location_ary(VALUE obj);
112
+ void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output);
113
+ int rb_frame_info_p(VALUE obj);
114
+ void rb_frame_info_get(VALUE obj, VALUE *path, VALUE *script_lines, int *node_id);
115
+
116
+ MJIT_SYMBOL_EXPORT_BEGIN
117
+ VALUE rb_ec_backtrace_object(const struct rb_execution_context_struct *ec);
118
+ void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self);
119
+ MJIT_SYMBOL_EXPORT_END
120
+
121
+ #define RUBY_DTRACE_CREATE_HOOK(name, arg) \
122
+ RUBY_DTRACE_HOOK(name##_CREATE, arg)
123
+ #define RUBY_DTRACE_HOOK(name, arg) \
124
+ do { \
125
+ if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { \
126
+ int dtrace_line; \
127
+ const char *dtrace_file = rb_source_location_cstr(&dtrace_line); \
128
+ if (!dtrace_file) dtrace_file = ""; \
129
+ RUBY_DTRACE_##name(arg, dtrace_file, dtrace_line); \
130
+ } \
131
+ } while (0)
132
+ #endif /* INTERNAL_VM_H */
@@ -0,0 +1,16 @@
1
+ #ifndef INTERNAL_WARNINGS_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_WARNINGS_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header to suppress / mandate warnings.
10
+ */
11
+ #include "ruby/internal/warning_push.h"
12
+ #define COMPILER_WARNING_PUSH RBIMPL_WARNING_PUSH()
13
+ #define COMPILER_WARNING_POP RBIMPL_WARNING_POP()
14
+ #define COMPILER_WARNING_ERROR(flag) RBIMPL_WARNING_ERROR(flag)
15
+ #define COMPILER_WARNING_IGNORED(flag) RBIMPL_WARNING_IGNORED(flag)
16
+ #endif /* INTERNAL_WARNINGS_H */
@@ -0,0 +1,109 @@
1
+ #ifndef RUBY_INTERNAL_H /*-*-C-*-vi:se ft=c:*/
2
+ #define RUBY_INTERNAL_H 1
3
+ /**
4
+ * @author $Author$
5
+ * @date Tue May 17 11:42:20 JST 2011
6
+ * @copyright Copyright (C) 2011 Yukihiro Matsumoto
7
+ * @copyright This file is a part of the programming language Ruby.
8
+ * Permission is hereby granted, to either redistribute and/or
9
+ * modify this file, provided that the conditions mentioned in the
10
+ * file COPYING are met. Consult the file for details.
11
+ */
12
+ #include "ruby/internal/config.h"
13
+
14
+ #ifdef __cplusplus
15
+ # error not for C++
16
+ #endif
17
+
18
+ #define LIKELY(x) RB_LIKELY(x)
19
+ #define UNLIKELY(x) RB_UNLIKELY(x)
20
+
21
+ #define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
22
+ #define roomof(x, y) (((x) + (y) - 1) / (y))
23
+ #define type_roomof(x, y) roomof(sizeof(x), sizeof(y))
24
+
25
+ /* Prevent compiler from reordering access */
26
+ #define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
27
+
28
+ #include "ruby/ruby.h"
29
+
30
+ /* Following macros were formerly defined in this header but moved to somewhere
31
+ * else. In order to detect them we undef here. */
32
+
33
+ /* internal/array.h */
34
+ #undef RARRAY_AREF
35
+
36
+ /* internal/class.h */
37
+ #undef RClass
38
+ #undef RCLASS_SUPER
39
+
40
+ /* internal/gc.h */
41
+ #undef NEWOBJ_OF
42
+ #undef RB_NEWOBJ_OF
43
+ #undef RB_OBJ_WRITE
44
+
45
+ /* internal/hash.h */
46
+ #undef RHASH_IFNONE
47
+ #undef RHASH_SIZE
48
+ #undef RHASH_TBL
49
+ #undef RHASH_EMPTY_P
50
+
51
+ /* internal/object.h */
52
+ #undef ROBJECT_IV_INDEX_TBL
53
+
54
+ /* internal/struct.h */
55
+ #undef RSTRUCT_LEN
56
+ #undef RSTRUCT_PTR
57
+ #undef RSTRUCT_SET
58
+ #undef RSTRUCT_GET
59
+
60
+ /* Also, we keep the following macros here. They are expected to be
61
+ * overridden in each headers. */
62
+
63
+ /* internal/array.h */
64
+ #define rb_ary_new_from_args(...) rb_nonexistent_symbol(__VA_ARGS__)
65
+
66
+ /* internal/io.h */
67
+ #define rb_io_fptr_finalize(...) rb_nonexistent_symbol(__VA_ARGS__)
68
+
69
+ /* internal/string.h */
70
+ #define rb_fstring_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
71
+
72
+ /* internal/symbol.h */
73
+ #define rb_sym_intern_ascii_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
74
+
75
+ /* internal/vm.h */
76
+ #define rb_funcallv(...) rb_nonexistent_symbol(__VA_ARGS__)
77
+ #define rb_method_basic_definition_p(...) rb_nonexistent_symbol(__VA_ARGS__)
78
+
79
+
80
+ /* MRI debug support */
81
+
82
+ /* gc.c */
83
+ void rb_obj_info_dump(VALUE obj);
84
+ void rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func);
85
+
86
+ /* debug.c */
87
+
88
+ RUBY_SYMBOL_EXPORT_BEGIN
89
+ void ruby_debug_breakpoint(void);
90
+ PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
91
+ RUBY_SYMBOL_EXPORT_END
92
+
93
+ // show obj data structure without any side-effect
94
+ #define rp(obj) rb_obj_info_dump_loc((VALUE)(obj), __FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING)
95
+
96
+ // same as rp, but add message header
97
+ #define rp_m(msg, obj) do { \
98
+ fputs((msg), stderr); \
99
+ rb_obj_info_dump((VALUE)(obj)); \
100
+ } while (0)
101
+
102
+ // `ruby_debug_breakpoint()` does nothing,
103
+ // but breakpoint is set in run.gdb, so `make gdb` can stop here.
104
+ #define bp() ruby_debug_breakpoint()
105
+
106
+ #define RBOOL(v) ((v) ? Qtrue : Qfalse)
107
+ #define RB_BIGNUM_TYPE_P(x) RB_TYPE_P((x), T_BIGNUM)
108
+
109
+ #endif /* RUBY_INTERNAL_H */
@@ -1,3 +1,5 @@
1
+ #ifndef RUBY_ISEQ_H
2
+ #define RUBY_ISEQ_H 1
1
3
  /**********************************************************************
2
4
 
3
5
  iseq.h -
@@ -8,14 +10,17 @@
8
10
  Copyright (C) 2004-2008 Koichi Sasada
9
11
 
10
12
  **********************************************************************/
11
-
12
- #ifndef RUBY_ISEQ_H
13
- #define RUBY_ISEQ_H 1
13
+ #include "internal/gc.h"
14
+ #include "vm_core.h"
14
15
 
15
16
  RUBY_EXTERN const int ruby_api_version[];
16
17
  #define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0])
17
18
  #define ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1])
18
19
 
20
+ #ifndef USE_ISEQ_NODE_ID
21
+ #define USE_ISEQ_NODE_ID 1
22
+ #endif
23
+
19
24
  #ifndef rb_iseq_t
20
25
  typedef struct rb_iseq_struct rb_iseq_t;
21
26
  #define rb_iseq_t rb_iseq_t
@@ -23,14 +28,6 @@ typedef struct rb_iseq_struct rb_iseq_t;
23
28
 
24
29
  extern const ID rb_iseq_shared_exc_local_tbl[];
25
30
 
26
- static inline size_t
27
- rb_call_info_kw_arg_bytes(int keyword_len)
28
- {
29
- return rb_size_mul_add_or_raise(
30
- keyword_len - 1, sizeof(VALUE), sizeof(struct rb_call_info_kw_arg),
31
- rb_eRuntimeError);
32
- }
33
-
34
31
  #define ISEQ_COVERAGE(iseq) iseq->body->variable.coverage
35
32
  #define ISEQ_COVERAGE_SET(iseq, cov) RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov)
36
33
  #define ISEQ_LINE_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES)
@@ -73,12 +70,14 @@ ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
73
70
  }
74
71
 
75
72
  #define ISEQ_TRACE_EVENTS (RUBY_EVENT_LINE | \
76
- RUBY_EVENT_CLASS | \
77
- RUBY_EVENT_END | \
78
- RUBY_EVENT_CALL | \
79
- RUBY_EVENT_RETURN| \
80
- RUBY_EVENT_B_CALL| \
81
- RUBY_EVENT_B_RETURN| \
73
+ RUBY_EVENT_CLASS | \
74
+ RUBY_EVENT_END | \
75
+ RUBY_EVENT_CALL | \
76
+ RUBY_EVENT_RETURN| \
77
+ RUBY_EVENT_C_CALL| \
78
+ RUBY_EVENT_C_RETURN| \
79
+ RUBY_EVENT_B_CALL| \
80
+ RUBY_EVENT_B_RETURN| \
82
81
  RUBY_EVENT_COVERAGE_LINE| \
83
82
  RUBY_EVENT_COVERAGE_BRANCH)
84
83
 
@@ -87,12 +86,12 @@ ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
87
86
  #define ISEQ_TRANSLATED IMEMO_FL_USER3
88
87
  #define ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4
89
88
 
90
- #define ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW((iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)
89
+ #define ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW(((VALUE)iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)
91
90
 
92
91
  struct iseq_compile_data {
93
92
  /* GC is needed */
94
93
  const VALUE err_info;
95
- const VALUE catch_table_ary; /* Array */
94
+ const VALUE catch_table_ary; /* Array */
96
95
 
97
96
  /* GC is not needed */
98
97
  struct iseq_label_data *start_label;
@@ -108,12 +107,13 @@ struct iseq_compile_data {
108
107
  struct iseq_compile_data_storage *storage_head;
109
108
  struct iseq_compile_data_storage *storage_current;
110
109
  } insn;
111
- int loopval_popped; /* used by NODE_BREAK */
110
+ bool in_rescue;
111
+ int loopval_popped; /* used by NODE_BREAK */
112
112
  int last_line;
113
113
  int label_no;
114
114
  int node_level;
115
+ int isolated_depth;
115
116
  unsigned int ci_index;
116
- unsigned int ci_kw_index;
117
117
  const rb_compile_option_t *option;
118
118
  struct rb_id_table *ivar_cache_table;
119
119
  const struct rb_builtin_function *builtin_function_table;
@@ -126,10 +126,10 @@ static inline struct iseq_compile_data *
126
126
  ISEQ_COMPILE_DATA(const rb_iseq_t *iseq)
127
127
  {
128
128
  if (iseq->flags & ISEQ_USE_COMPILE_DATA) {
129
- return iseq->aux.compile_data;
129
+ return iseq->aux.compile_data;
130
130
  }
131
131
  else {
132
- return NULL;
132
+ return NULL;
133
133
  }
134
134
  }
135
135
 
@@ -167,6 +167,8 @@ const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
167
167
  unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
168
168
  #endif
169
169
 
170
+ int rb_vm_insn_addr2opcode(const void *addr);
171
+
170
172
  RUBY_SYMBOL_EXPORT_BEGIN
171
173
 
172
174
  /* compile.c */
@@ -174,22 +176,27 @@ VALUE rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node);
174
176
  VALUE rb_iseq_compile_callback(rb_iseq_t *iseq, const struct rb_iseq_new_with_callback_callback_func * ifunc);
175
177
  VALUE *rb_iseq_original_iseq(const rb_iseq_t *iseq);
176
178
  void rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc,
177
- VALUE locals, VALUE args,
178
- VALUE exception, VALUE body);
179
+ VALUE locals, VALUE args,
180
+ VALUE exception, VALUE body);
179
181
  void rb_iseq_mark_insn_storage(struct iseq_compile_data_storage *arena);
180
182
 
181
183
  /* iseq.c */
182
184
  VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
183
185
  VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
184
186
  unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos);
187
+ #ifdef USE_ISEQ_NODE_ID
188
+ int rb_iseq_node_id(const rb_iseq_t *iseq, size_t pos);
189
+ #endif
185
190
  void rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events);
186
191
  void rb_iseq_trace_set_all(rb_event_flag_t turnon_events);
187
192
  void rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq);
188
193
 
194
+ struct rb_iseq_constant_body *rb_iseq_constant_body_alloc(void);
189
195
  VALUE rb_iseqw_new(const rb_iseq_t *iseq);
190
196
  const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
191
197
 
192
198
  VALUE rb_iseq_absolute_path(const rb_iseq_t *iseq); /* obsolete */
199
+ int rb_iseq_from_eval_p(const rb_iseq_t *iseq);
193
200
  VALUE rb_iseq_label(const rb_iseq_t *iseq);
194
201
  VALUE rb_iseq_base_label(const rb_iseq_t *iseq);
195
202
  VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq);
@@ -218,17 +225,20 @@ struct rb_compile_option_struct {
218
225
 
219
226
  struct iseq_insn_info_entry {
220
227
  int line_no;
228
+ #ifdef USE_ISEQ_NODE_ID
229
+ int node_id;
230
+ #endif
221
231
  rb_event_flag_t events;
222
232
  };
223
233
 
224
234
  struct iseq_catch_table_entry {
225
235
  enum catch_type {
226
- CATCH_TYPE_RESCUE = INT2FIX(1),
227
- CATCH_TYPE_ENSURE = INT2FIX(2),
228
- CATCH_TYPE_RETRY = INT2FIX(3),
229
- CATCH_TYPE_BREAK = INT2FIX(4),
230
- CATCH_TYPE_REDO = INT2FIX(5),
231
- CATCH_TYPE_NEXT = INT2FIX(6)
236
+ CATCH_TYPE_RESCUE = INT2FIX(1),
237
+ CATCH_TYPE_ENSURE = INT2FIX(2),
238
+ CATCH_TYPE_RETRY = INT2FIX(3),
239
+ CATCH_TYPE_BREAK = INT2FIX(4),
240
+ CATCH_TYPE_REDO = INT2FIX(5),
241
+ CATCH_TYPE_NEXT = INT2FIX(6)
232
242
  } type;
233
243
 
234
244
  /*
@@ -260,12 +270,12 @@ static inline int
260
270
  iseq_catch_table_bytes(int n)
261
271
  {
262
272
  enum {
263
- catch_table_entry_size = sizeof(struct iseq_catch_table_entry),
264
- catch_table_entries_max = (INT_MAX - offsetof(struct iseq_catch_table, entries)) / catch_table_entry_size
273
+ catch_table_entry_size = sizeof(struct iseq_catch_table_entry),
274
+ catch_table_entries_max = (INT_MAX - offsetof(struct iseq_catch_table, entries)) / catch_table_entry_size
265
275
  };
266
276
  if (n > catch_table_entries_max) rb_fatal("too large iseq_catch_table - %d", n);
267
277
  return (int)(offsetof(struct iseq_catch_table, entries) +
268
- n * catch_table_entry_size);
278
+ n * catch_table_entry_size);
269
279
  }
270
280
 
271
281
  #define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)
@@ -295,7 +305,6 @@ enum defined_type {
295
305
  DEFINED_FALSE,
296
306
  DEFINED_ASGN,
297
307
  DEFINED_EXPR,
298
- DEFINED_IVAR2,
299
308
  DEFINED_REF,
300
309
  DEFINED_FUNC,
301
310
  DEFINED_CONST_FROM