debase-ruby_core_source 3.3.6 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (293) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -0
  3. data/CHANGELOG.md +6 -0
  4. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/builtin.h +7 -1
  5. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/darray.h +1 -3
  6. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/id.h +5 -0
  7. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/insns.inc +2 -0
  8. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/insns_info.inc +310 -175
  9. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/basic_operators.h +1 -0
  10. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/bits.h +82 -0
  11. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/encoding.h +2 -0
  12. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/error.h +26 -0
  13. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/fixnum.h +1 -0
  14. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/gc.h +14 -6
  15. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/imemo.h +6 -1
  16. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/io.h +1 -1
  17. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/parse.h +2 -1
  18. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/proc.h +1 -0
  19. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/ractor.h +4 -0
  20. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/sanitizers.h +31 -39
  21. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/string.h +22 -10
  22. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/thread.h +23 -0
  23. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/vm.h +1 -1
  24. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/method.h +1 -0
  25. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/optunifs.inc +1 -1
  26. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/parse.h +2 -2
  27. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/ast.h +427 -3
  28. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/defines.h +8 -7
  29. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/diagnostic.h +1 -0
  30. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/extension.h +1 -1
  31. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/prism.h +47 -11
  32. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/version.h +2 -2
  33. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism_compile.h +5 -5
  34. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/ractor_core.h +6 -6
  35. data/lib/debase/ruby_core_source/ruby-3.4.0/revision.h +5 -0
  36. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/rubyparser.h +3 -2
  37. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/thread_pthread.h +0 -1
  38. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/version.h +1 -1
  39. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/vm.inc +151 -88
  40. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/vm_core.h +40 -12
  41. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/vm_sync.h +3 -3
  42. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/vmtc.inc +2 -0
  43. data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/yjit.h +1 -0
  44. data/lib/debase/ruby_core_source/version.rb +1 -1
  45. metadata +147 -293
  46. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/darray.h +0 -191
  47. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/debug_counter.h +0 -423
  48. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/dln.h +0 -34
  49. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/id.h +0 -343
  50. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/insns.inc +0 -259
  51. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/insns_info.inc +0 -9530
  52. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/array.h +0 -151
  53. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/basic_operators.h +0 -63
  54. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/bits.h +0 -568
  55. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/class.h +0 -283
  56. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/error.h +0 -216
  57. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/fixnum.h +0 -184
  58. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/gc.h +0 -334
  59. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/hash.h +0 -191
  60. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/imemo.h +0 -260
  61. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/io.h +0 -140
  62. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/parse.h +0 -117
  63. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/ractor.h +0 -6
  64. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/sanitizers.h +0 -297
  65. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/string.h +0 -182
  66. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/thread.h +0 -79
  67. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/internal/vm.h +0 -137
  68. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/known_errors.inc +0 -1419
  69. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/method.h +0 -255
  70. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/optunifs.inc +0 -43
  71. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/parse.h +0 -243
  72. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/ast.h +0 -6245
  73. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/defines.h +0 -206
  74. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/diagnostic.h +0 -433
  75. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/extension.h +0 -19
  76. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/node.h +0 -150
  77. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/options.h +0 -305
  78. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/parser.h +0 -891
  79. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/regexp.h +0 -33
  80. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/static_literals.h +0 -120
  81. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_char.h +0 -205
  82. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_constant_pool.h +0 -226
  83. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_integer.h +0 -119
  84. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_newline_list.h +0 -102
  85. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_string.h +0 -174
  86. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/util/pm_string_list.h +0 -44
  87. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism/version.h +0 -29
  88. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/prism_compile.h +0 -88
  89. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/ractor_core.h +0 -393
  90. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/regint.h +0 -1010
  91. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/revision.h +0 -5
  92. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/rubyparser.h +0 -1430
  93. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/shape.h +0 -233
  94. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/symbol.h +0 -118
  95. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/thread_pthread.h +0 -166
  96. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/version.h +0 -69
  97. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm.inc +0 -5643
  98. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_callinfo.h +0 -605
  99. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_core.h +0 -2236
  100. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_insnhelper.h +0 -272
  101. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vm_sync.h +0 -137
  102. data/lib/debase/ruby_core_source/ruby-3.4.0-preview1/vmtc.inc +0 -253
  103. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/addr2line.h +0 -22
  104. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/builtin.h +0 -119
  105. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/build_assert/build_assert.h +0 -40
  106. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/check_type/check_type.h +0 -63
  107. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/container_of/container_of.h +0 -142
  108. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/list/list.h +0 -791
  109. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ccan/str/str.h +0 -17
  110. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/constant.h +0 -53
  111. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/encindex.h +0 -70
  112. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/eval_intern.h +0 -324
  113. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/hrtime.h +0 -237
  114. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/id_table.h +0 -39
  115. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/bignum.h +0 -244
  116. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/cmdlineopt.h +0 -65
  117. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/compar.h +0 -29
  118. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/compile.h +0 -34
  119. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/compilers.h +0 -107
  120. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/complex.h +0 -29
  121. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/cont.h +0 -35
  122. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/dir.h +0 -16
  123. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/enc.h +0 -19
  124. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/encoding.h +0 -36
  125. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/enum.h +0 -18
  126. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/enumerator.h +0 -21
  127. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/eval.h +0 -33
  128. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/file.h +0 -38
  129. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/inits.h +0 -47
  130. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/load.h +0 -18
  131. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/loadpath.h +0 -16
  132. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/math.h +0 -23
  133. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/missing.h +0 -19
  134. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/numeric.h +0 -274
  135. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/object.h +0 -63
  136. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/proc.h +0 -30
  137. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/process.h +0 -124
  138. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/random.h +0 -17
  139. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/range.h +0 -40
  140. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/rational.h +0 -71
  141. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/re.h +0 -28
  142. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/ruby_parser.h +0 -102
  143. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/serial.h +0 -23
  144. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/signal.h +0 -24
  145. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/st.h +0 -11
  146. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/static_assert.h +0 -16
  147. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/struct.h +0 -127
  148. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/symbol.h +0 -45
  149. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/time.h +0 -34
  150. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/transcode.h +0 -23
  151. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/util.h +0 -27
  152. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/variable.h +0 -72
  153. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal/warnings.h +0 -16
  154. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/internal.h +0 -108
  155. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/iseq.h +0 -340
  156. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/node.h +0 -111
  157. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/node_name.inc +0 -224
  158. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/optinsn.inc +0 -128
  159. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/parser_bits.h +0 -564
  160. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/parser_node.h +0 -32
  161. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/parser_st.h +0 -162
  162. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/parser_value.h +0 -106
  163. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/encoding.h +0 -283
  164. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/pack.h +0 -163
  165. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/prettyprint.h +0 -34
  166. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/prism.h +0 -336
  167. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_buffer.h +0 -218
  168. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_list.h +0 -97
  169. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_memchr.h +0 -29
  170. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_strncasecmp.h +0 -32
  171. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/prism/util/pm_strpbrk.h +0 -46
  172. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/probes_helper.h +0 -42
  173. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/regenc.h +0 -254
  174. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/regparse.h +0 -371
  175. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/revision.h +0 -5
  176. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/rjit.h +0 -101
  177. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/rjit_c.h +0 -165
  178. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ruby_assert.h +0 -14
  179. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/ruby_atomic.h +0 -23
  180. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/siphash.h +0 -48
  181. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/thread_none.h +0 -21
  182. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/thread_win32.h +0 -58
  183. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/timev.h +0 -58
  184. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/transcode_data.h +0 -138
  185. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/variable.h +0 -39
  186. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_call_iseq_optimized.inc +0 -244
  187. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_debug.h +0 -124
  188. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_exec.h +0 -199
  189. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/vm_opts.h +0 -67
  190. data/lib/debase/ruby_core_source/ruby-3.4.0-preview2/yjit.h +0 -79
  191. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/addr2line.h +0 -0
  192. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ccan/build_assert/build_assert.h +0 -0
  193. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ccan/check_type/check_type.h +0 -0
  194. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ccan/container_of/container_of.h +0 -0
  195. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ccan/list/list.h +0 -0
  196. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ccan/str/str.h +0 -0
  197. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/constant.h +0 -0
  198. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/debug_counter.h +0 -0
  199. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/dln.h +0 -0
  200. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/encindex.h +0 -0
  201. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/eval_intern.h +0 -0
  202. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/hrtime.h +0 -0
  203. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/id_table.h +0 -0
  204. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/array.h +0 -0
  205. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/bignum.h +0 -0
  206. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/class.h +0 -0
  207. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/cmdlineopt.h +0 -0
  208. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/compar.h +0 -0
  209. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/compile.h +0 -0
  210. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/compilers.h +0 -0
  211. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/complex.h +0 -0
  212. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/cont.h +0 -0
  213. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/dir.h +0 -0
  214. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/enc.h +0 -0
  215. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/enum.h +0 -0
  216. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/enumerator.h +0 -0
  217. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/eval.h +0 -0
  218. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/file.h +0 -0
  219. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/internal/hash.h +0 -0
  220. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/inits.h +0 -0
  221. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/load.h +0 -0
  222. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/loadpath.h +0 -0
  223. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/math.h +0 -0
  224. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/missing.h +0 -0
  225. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/numeric.h +0 -0
  226. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/object.h +0 -0
  227. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/process.h +0 -0
  228. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/random.h +0 -0
  229. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/range.h +0 -0
  230. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/rational.h +0 -0
  231. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/re.h +0 -0
  232. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/ruby_parser.h +0 -0
  233. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/serial.h +0 -0
  234. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/signal.h +0 -0
  235. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/st.h +0 -0
  236. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/static_assert.h +0 -0
  237. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/struct.h +0 -0
  238. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/symbol.h +0 -0
  239. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/time.h +0 -0
  240. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/transcode.h +0 -0
  241. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/util.h +0 -0
  242. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/variable.h +0 -0
  243. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal/warnings.h +0 -0
  244. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/internal.h +0 -0
  245. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/iseq.h +0 -0
  246. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/known_errors.inc +0 -0
  247. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/node.h +0 -0
  248. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/node_name.inc +0 -0
  249. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/optinsn.inc +0 -0
  250. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/parser_bits.h +0 -0
  251. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/parser_node.h +0 -0
  252. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/parser_st.h +0 -0
  253. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/parser_value.h +0 -0
  254. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/encoding.h +0 -0
  255. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/node.h +0 -0
  256. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/options.h +0 -0
  257. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/pack.h +0 -0
  258. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/parser.h +0 -0
  259. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/prettyprint.h +0 -0
  260. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/regexp.h +0 -0
  261. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/static_literals.h +0 -0
  262. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/util/pm_buffer.h +0 -0
  263. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/util/pm_char.h +0 -0
  264. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/util/pm_constant_pool.h +0 -0
  265. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/util/pm_integer.h +0 -0
  266. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/util/pm_list.h +0 -0
  267. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/util/pm_memchr.h +0 -0
  268. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/util/pm_newline_list.h +0 -0
  269. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/prism/util/pm_string.h +0 -0
  270. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/util/pm_strncasecmp.h +0 -0
  271. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/prism/util/pm_strpbrk.h +0 -0
  272. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/probes_helper.h +0 -0
  273. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/regenc.h +0 -0
  274. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/regint.h +0 -0
  275. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/regparse.h +0 -0
  276. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/rjit.h +0 -0
  277. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/rjit_c.h +0 -0
  278. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ruby_assert.h +0 -0
  279. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/ruby_atomic.h +0 -0
  280. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/shape.h +0 -0
  281. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/siphash.h +0 -0
  282. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/symbol.h +0 -0
  283. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/thread_none.h +0 -0
  284. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/thread_win32.h +0 -0
  285. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/timev.h +0 -0
  286. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/transcode_data.h +0 -0
  287. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/variable.h +0 -0
  288. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/vm_call_iseq_optimized.inc +0 -0
  289. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/vm_callinfo.h +0 -0
  290. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/vm_debug.h +0 -0
  291. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/vm_exec.h +0 -0
  292. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview2 → ruby-3.4.0}/vm_insnhelper.h +0 -0
  293. /data/lib/debase/ruby_core_source/{ruby-3.4.0-preview1 → ruby-3.4.0}/vm_opts.h +0 -0
@@ -1,283 +0,0 @@
1
- #ifndef INTERNAL_CLASS_H /*-*-C-*-vi:se ft=c:*/
2
- #define INTERNAL_CLASS_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 Class.
10
- */
11
- #include "id.h"
12
- #include "id_table.h" /* for struct rb_id_table */
13
- #include "internal/serial.h" /* for rb_serial_t */
14
- #include "internal/static_assert.h"
15
- #include "internal/variable.h" /* for rb_class_ivar_set */
16
- #include "ruby/internal/stdbool.h" /* for bool */
17
- #include "ruby/intern.h" /* for rb_alloc_func_t */
18
- #include "ruby/ruby.h" /* for struct RBasic */
19
- #include "shape.h"
20
- #include "ruby_assert.h"
21
- #include "vm_core.h"
22
- #include "vm_sync.h"
23
- #include "method.h" /* for rb_cref_t */
24
-
25
- #ifdef RCLASS_SUPER
26
- # undef RCLASS_SUPER
27
- #endif
28
-
29
- struct rb_subclass_entry {
30
- VALUE klass;
31
- struct rb_subclass_entry *next;
32
- struct rb_subclass_entry *prev;
33
- };
34
- typedef struct rb_subclass_entry rb_subclass_entry_t;
35
-
36
- struct rb_cvar_class_tbl_entry {
37
- uint32_t index;
38
- rb_serial_t global_cvar_state;
39
- const rb_cref_t * cref;
40
- VALUE class_value;
41
- };
42
-
43
- struct rb_classext_struct {
44
- VALUE *iv_ptr;
45
- struct rb_id_table *const_tbl;
46
- struct rb_id_table *callable_m_tbl;
47
- struct rb_id_table *cc_tbl; /* ID -> [[ci1, cc1], [ci2, cc2] ...] */
48
- struct rb_id_table *cvc_tbl;
49
- size_t superclass_depth;
50
- VALUE *superclasses;
51
- struct rb_subclass_entry *subclasses;
52
- struct rb_subclass_entry *subclass_entry;
53
- /**
54
- * In the case that this is an `ICLASS`, `module_subclasses` points to the link
55
- * in the module's `subclasses` list that indicates that the klass has been
56
- * included. Hopefully that makes sense.
57
- */
58
- struct rb_subclass_entry *module_subclass_entry;
59
- const VALUE origin_;
60
- const VALUE refined_class;
61
- union {
62
- struct {
63
- rb_alloc_func_t allocator;
64
- } class;
65
- struct {
66
- VALUE attached_object;
67
- } singleton_class;
68
- } as;
69
- const VALUE includer;
70
- attr_index_t max_iv_count;
71
- unsigned char variation_count;
72
- bool permanent_classpath : 1;
73
- bool cloned : 1;
74
- VALUE classpath;
75
- };
76
- typedef struct rb_classext_struct rb_classext_t;
77
-
78
- STATIC_ASSERT(shape_max_variations, SHAPE_MAX_VARIATIONS < (1 << (sizeof(((rb_classext_t *)0)->variation_count) * CHAR_BIT)));
79
-
80
- struct RClass {
81
- struct RBasic basic;
82
- VALUE super;
83
- struct rb_id_table *m_tbl;
84
- };
85
-
86
- // Assert that classes can be embedded in size_pools[2] (which has 160B slot size)
87
- STATIC_ASSERT(sizeof_rb_classext_t, sizeof(struct RClass) + sizeof(rb_classext_t) <= 4 * RVALUE_SIZE);
88
-
89
- struct RClass_and_rb_classext_t {
90
- struct RClass rclass;
91
- rb_classext_t classext;
92
- };
93
-
94
- #define RCLASS_EXT(c) (&((struct RClass_and_rb_classext_t*)(c))->classext)
95
- #define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
96
- #define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
97
- #define RCLASS_IVPTR(c) (RCLASS_EXT(c)->iv_ptr)
98
- #define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
99
- #define RCLASS_CC_TBL(c) (RCLASS_EXT(c)->cc_tbl)
100
- #define RCLASS_CVC_TBL(c) (RCLASS_EXT(c)->cvc_tbl)
101
- #define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
102
- #define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
103
- #define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
104
- #define RCLASS_SUBCLASS_ENTRY(c) (RCLASS_EXT(c)->subclass_entry)
105
- #define RCLASS_MODULE_SUBCLASS_ENTRY(c) (RCLASS_EXT(c)->module_subclass_entry)
106
- #define RCLASS_SUBCLASSES(c) (RCLASS_EXT(c)->subclasses)
107
- #define RCLASS_SUPERCLASS_DEPTH(c) (RCLASS_EXT(c)->superclass_depth)
108
- #define RCLASS_SUPERCLASSES(c) (RCLASS_EXT(c)->superclasses)
109
- #define RCLASS_ATTACHED_OBJECT(c) (RCLASS_EXT(c)->as.singleton_class.attached_object)
110
-
111
- #define RCLASS_IS_ROOT FL_USER0
112
- #define RICLASS_IS_ORIGIN FL_USER0
113
- #define RCLASS_SUPERCLASSES_INCLUDE_SELF FL_USER2
114
- #define RICLASS_ORIGIN_SHARED_MTBL FL_USER3
115
-
116
- static inline st_table *
117
- RCLASS_IV_HASH(VALUE obj)
118
- {
119
- RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE));
120
- RUBY_ASSERT(rb_shape_obj_too_complex(obj));
121
- return (st_table *)RCLASS_IVPTR(obj);
122
- }
123
-
124
- static inline void
125
- RCLASS_SET_IV_HASH(VALUE obj, const st_table *tbl)
126
- {
127
- RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE));
128
- RUBY_ASSERT(rb_shape_obj_too_complex(obj));
129
- RCLASS_IVPTR(obj) = (VALUE *)tbl;
130
- }
131
-
132
- static inline uint32_t
133
- RCLASS_IV_COUNT(VALUE obj)
134
- {
135
- RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE));
136
- if (rb_shape_obj_too_complex(obj)) {
137
- uint32_t count;
138
-
139
- // "Too complex" classes could have their IV hash mutated in
140
- // parallel, so lets lock around getting the hash size.
141
- RB_VM_LOCK_ENTER();
142
- {
143
- count = (uint32_t)rb_st_table_size(RCLASS_IV_HASH(obj));
144
- }
145
- RB_VM_LOCK_LEAVE();
146
-
147
- return count;
148
- }
149
- else {
150
- return rb_shape_get_shape_by_id(RCLASS_SHAPE_ID(obj))->next_iv_index;
151
- }
152
- }
153
-
154
- static inline void
155
- RCLASS_SET_M_TBL(VALUE klass, struct rb_id_table *table)
156
- {
157
- RUBY_ASSERT(!RB_OBJ_PROMOTED(klass));
158
- RCLASS_M_TBL(klass) = table;
159
- }
160
-
161
- /* class.c */
162
- void rb_class_subclass_add(VALUE super, VALUE klass);
163
- void rb_class_remove_from_super_subclasses(VALUE);
164
- void rb_class_update_superclasses(VALUE);
165
- size_t rb_class_superclasses_memsize(VALUE);
166
- void rb_class_remove_subclass_head(VALUE);
167
- int rb_singleton_class_internal_p(VALUE sklass);
168
- VALUE rb_class_boot(VALUE);
169
- VALUE rb_class_s_alloc(VALUE klass);
170
- VALUE rb_module_s_alloc(VALUE klass);
171
- void rb_module_set_initialized(VALUE module);
172
- void rb_module_check_initializable(VALUE module);
173
- VALUE rb_make_metaclass(VALUE, VALUE);
174
- VALUE rb_include_class_new(VALUE, VALUE);
175
- void rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE);
176
- void rb_class_detach_subclasses(VALUE);
177
- void rb_class_detach_module_subclasses(VALUE);
178
- void rb_class_remove_from_module_subclasses(VALUE);
179
- VALUE rb_define_class_id_under_no_pin(VALUE outer, ID id, VALUE super);
180
- VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj);
181
- VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj);
182
- VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj);
183
- VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj);
184
- VALUE rb_class_undefined_instance_methods(VALUE mod);
185
- VALUE rb_special_singleton_class(VALUE);
186
- VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach);
187
- VALUE rb_singleton_class_get(VALUE obj);
188
- void rb_undef_methods_from(VALUE klass, VALUE super);
189
-
190
- static inline void RCLASS_SET_ORIGIN(VALUE klass, VALUE origin);
191
- static inline void RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass);
192
- static inline VALUE RCLASS_SUPER(VALUE klass);
193
- static inline VALUE RCLASS_SET_SUPER(VALUE klass, VALUE super);
194
- static inline void RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass);
195
-
196
- VALUE rb_class_inherited(VALUE, VALUE);
197
- VALUE rb_keyword_error_new(const char *, VALUE);
198
-
199
- static inline bool
200
- RCLASS_SINGLETON_P(VALUE klass)
201
- {
202
- return RB_TYPE_P(klass, T_CLASS) && FL_TEST_RAW(klass, FL_SINGLETON);
203
- }
204
-
205
- static inline rb_alloc_func_t
206
- RCLASS_ALLOCATOR(VALUE klass)
207
- {
208
- if (RCLASS_SINGLETON_P(klass)) {
209
- return 0;
210
- }
211
- return RCLASS_EXT(klass)->as.class.allocator;
212
- }
213
-
214
- static inline void
215
- RCLASS_SET_ALLOCATOR(VALUE klass, rb_alloc_func_t allocator)
216
- {
217
- assert(!RCLASS_SINGLETON_P(klass));
218
- RCLASS_EXT(klass)->as.class.allocator = allocator;
219
- }
220
-
221
- static inline void
222
- RCLASS_SET_ORIGIN(VALUE klass, VALUE origin)
223
- {
224
- RB_OBJ_WRITE(klass, &RCLASS_ORIGIN(klass), origin);
225
- if (klass != origin) FL_SET(origin, RICLASS_IS_ORIGIN);
226
- }
227
-
228
- static inline void
229
- RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass)
230
- {
231
- FL_SET(iclass, RICLASS_ORIGIN_SHARED_MTBL);
232
- }
233
-
234
- static inline bool
235
- RICLASS_OWNS_M_TBL_P(VALUE iclass)
236
- {
237
- return FL_TEST_RAW(iclass, RICLASS_IS_ORIGIN | RICLASS_ORIGIN_SHARED_MTBL) == RICLASS_IS_ORIGIN;
238
- }
239
-
240
- static inline void
241
- RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass)
242
- {
243
- RB_OBJ_WRITE(iclass, &RCLASS_INCLUDER(iclass), klass);
244
- }
245
-
246
- static inline VALUE
247
- RCLASS_SUPER(VALUE klass)
248
- {
249
- return RCLASS(klass)->super;
250
- }
251
-
252
- static inline VALUE
253
- RCLASS_SET_SUPER(VALUE klass, VALUE super)
254
- {
255
- if (super) {
256
- rb_class_remove_from_super_subclasses(klass);
257
- rb_class_subclass_add(super, klass);
258
- }
259
- RB_OBJ_WRITE(klass, &RCLASS(klass)->super, super);
260
- rb_class_update_superclasses(klass);
261
- return super;
262
- }
263
-
264
- static inline void
265
- RCLASS_SET_CLASSPATH(VALUE klass, VALUE classpath, bool permanent)
266
- {
267
- assert(BUILTIN_TYPE(klass) == T_CLASS || BUILTIN_TYPE(klass) == T_MODULE);
268
- assert(classpath == 0 || BUILTIN_TYPE(classpath) == T_STRING);
269
-
270
- RB_OBJ_WRITE(klass, &(RCLASS_EXT(klass)->classpath), classpath);
271
- RCLASS_EXT(klass)->permanent_classpath = permanent;
272
- }
273
-
274
- static inline VALUE
275
- RCLASS_SET_ATTACHED_OBJECT(VALUE klass, VALUE attached_object)
276
- {
277
- assert(RCLASS_SINGLETON_P(klass));
278
-
279
- RB_OBJ_WRITE(klass, &RCLASS_EXT(klass)->as.singleton_class.attached_object, attached_object);
280
- return attached_object;
281
- }
282
-
283
- #endif /* INTERNAL_CLASS_H */
@@ -1,216 +0,0 @@
1
- #ifndef INTERNAL_ERROR_H /*-*-C-*-vi:se ft=c:*/
2
- #define INTERNAL_ERROR_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 Exception.
10
- */
11
- #include "ruby/internal/config.h"
12
- #include <stdarg.h> /* for va_list */
13
- #include "internal/string.h" /* for rb_fstring_cstr */
14
- #include "ruby/internal/stdbool.h" /* for bool */
15
- #include "ruby/encoding.h" /* for rb_encoding */
16
- #include "ruby/intern.h" /* for rb_exc_raise */
17
- #include "ruby/ruby.h" /* for enum ruby_value_type */
18
-
19
- #ifdef Check_Type
20
- # undef Check_Type /* in ruby/ruby.h */
21
- #endif
22
-
23
- #ifdef rb_raise_static
24
- # undef rb_raise_static
25
- # undef rb_sys_fail_path
26
- # undef rb_syserr_fail_path
27
- #endif
28
-
29
- #define rb_raise_static(e, m) \
30
- rb_raise_cstr_i((e), rb_str_new_static((m), rb_strlen_lit(m)))
31
- #ifdef RUBY_FUNCTION_NAME_STRING
32
- # define rb_syserr_fail_path(err, path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
33
- # define rb_syserr_new_path(err, path) rb_syserr_new_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
34
- #else
35
- # define rb_syserr_fail_path(err, path) rb_syserr_fail_str((err), (path))
36
- # define rb_syserr_new_path(err, path) rb_syserr_new_str((err), (path))
37
- #endif
38
-
39
- #define rb_sys_fail(mesg) \
40
- do { \
41
- int errno_to_fail = errno; \
42
- rb_syserr_fail(errno_to_fail, (mesg)); \
43
- } while (0)
44
-
45
- #define rb_sys_fail_str(mesg) \
46
- do { \
47
- int errno_to_fail = errno; \
48
- rb_syserr_fail_str(errno_to_fail, (mesg)); \
49
- } while (0)
50
-
51
- #define rb_sys_fail_path(path) \
52
- do { \
53
- int errno_to_fail = errno; \
54
- rb_syserr_fail_path(errno_to_fail, (path)); \
55
- } while (0)
56
-
57
- #define rb_sys_fail_sprintf(...) \
58
- do { \
59
- int errno_to_fail = errno; \
60
- rb_syserr_fail_str(errno_to_fail, rb_sprintf("" __VA_ARGS__)); \
61
- } while (0)
62
-
63
- /* error.c */
64
- extern long rb_backtrace_length_limit;
65
- extern VALUE rb_eEAGAIN;
66
- extern VALUE rb_eEWOULDBLOCK;
67
- extern VALUE rb_eEINPROGRESS;
68
- RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 3, 0)
69
- void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
70
- NORETURN(void rb_async_bug_errno(const char *,int));
71
- const char *rb_builtin_type_name(int t);
72
- const char *rb_builtin_class_name(VALUE x);
73
- PRINTF_ARGS(void rb_warn_deprecated(const char *fmt, const char *suggest, ...), 1, 3);
74
- PRINTF_ARGS(void rb_warn_deprecated_to_remove(const char *removal, const char *fmt, const char *suggest, ...), 2, 4);
75
- #if RUBY_DEBUG
76
- # include "ruby/version.h"
77
- # define RUBY_VERSION_SINCE(major, minor) (RUBY_API_VERSION_CODE >= (major * 10000) + (minor) * 100)
78
- # define RUBY_VERSION_BEFORE(major, minor) (RUBY_API_VERSION_CODE < (major * 10000) + (minor) * 100)
79
- # if defined(RBIMPL_WARNING_PRAGMA0)
80
- # define RBIMPL_TODO0(x) RBIMPL_WARNING_PRAGMA0(message(x))
81
- # elif RBIMPL_COMPILER_SINCE(MSVC, 12, 0, 0)
82
- # define RBIMPL_TODO0(x) __pragma(message(x))
83
- # endif
84
-
85
- # if RBIMPL_HAS_ATTRIBUTE(diagnose_if) || defined(__OPTIMIZE__)
86
-
87
- #define RUBY_VERSION_isdigit(c) ('0'<=(c)&&(c)<='9')
88
- // upto 99
89
- #define RUBY_VERSION__number_len(v, ofs) \
90
- (!RUBY_VERSION_isdigit((v)[ofs]) ? \
91
- 0 : !RUBY_VERSION_isdigit((v)[(ofs) + 1]) ? 1 : 2)
92
- #define RUBY_VERSION__to_number(v, ofs) \
93
- (!RUBY_VERSION_isdigit((v)[ofs]) ? \
94
- 0 : !RUBY_VERSION_isdigit((v)[(ofs) + 1]) ? \
95
- ((v)[ofs]-'0') : \
96
- (((v)[ofs]-'0')*10+(v)[(ofs)+1]-'0'))
97
-
98
- #define RUBY_VERSION_CODE_FROM_MAJOR_MINOR_STRING(v) \
99
- (RUBY_VERSION__to_number(v, 0) * 10000 + \
100
- ((v)[RUBY_VERSION__number_len(v, 0)] == '.' ? \
101
- RUBY_VERSION__to_number(v, RUBY_VERSION__number_len(v, 0)+1) * 100 : 0))
102
- #define RUBY_VERSION_STRING_SINCE(v) (RUBY_API_VERSION_CODE >= RUBY_VERSION_CODE_FROM_MAJOR_MINOR_STRING(v))
103
- #define RUBY_VERSION_STRING_BEFORE(v) (RUBY_API_VERSION_CODE < RUBY_VERSION_CODE_FROM_MAJOR_MINOR_STRING(v))
104
-
105
- # if RBIMPL_HAS_ATTRIBUTE(diagnose_if)
106
- RBIMPL_ATTR_FORCEINLINE()
107
- static void
108
- rb_deprecated_method_to_be_removed(const char *removal)
109
- RBIMPL_ATTR_DIAGNOSE_IF(!RUBY_VERSION_isdigit(removal[0]), "malformed version number", "error")
110
- RBIMPL_ATTR_DIAGNOSE_IF(RUBY_VERSION_STRING_SINCE(removal), "deprecated method to be removed", "error")
111
- {
112
- }
113
- # else
114
- RBIMPL_ATTR_ERROR(("deprecated"))
115
- void rb_deprecated_method_to_be_removed(const char *);
116
- # define rb_deprecated_method_to_be_removed(removal) \
117
- (sizeof(char[1-2*(!RUBY_VERSION_isdigit(removal[0]) || RUBY_VERSION_STRING_SINCE(removal))])!=1 ? \
118
- rb_deprecated_method_to_be_removed(removal) : \
119
- RBIMPL_ASSERT_NOTHING)
120
- # endif
121
- # define rb_warn_deprecated_to_remove_at(removal, ...) \
122
- (rb_deprecated_method_to_be_removed(#removal), \
123
- rb_warn_deprecated_to_remove(#removal, __VA_ARGS__))
124
- # endif
125
- #endif
126
- #ifndef rb_warn_deprecated_to_remove_at
127
- # define rb_warn_deprecated_to_remove_at(removal, ...) \
128
- rb_warn_deprecated_to_remove(#removal, __VA_ARGS__)
129
- #endif
130
- #ifndef RUBY_VERSION_SINCE
131
- # define RUBY_VERSION_SINCE(major, minor) 0
132
- #endif
133
- #ifndef RUBY_VERSION_BEFORE
134
- # define RUBY_VERSION_BEFORE(major, minor) 0
135
- #endif
136
- #ifndef RBIMPL_TODO0
137
- # define RBIMPL_TODO0(x)
138
- #endif
139
- #define RBIMPL_TODO(message) RBIMPL_TODO0("TODO: " message)
140
- RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 6, 0)
141
- VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
142
- PRINTF_ARGS(void rb_enc_warn(rb_encoding *enc, const char *fmt, ...), 2, 3);
143
- PRINTF_ARGS(void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...), 2, 3);
144
- PRINTF_ARGS(void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...), 3, 4);
145
- rb_warning_category_t rb_warning_category_from_name(VALUE category);
146
- bool rb_warning_category_enabled_p(rb_warning_category_t category);
147
- VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method);
148
- VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv);
149
- VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name);
150
- PRINTF_ARGS(VALUE rb_warning_string(const char *fmt, ...), 1, 2);
151
- RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 0)
152
- NORETURN(void rb_vraise(VALUE, const char *, va_list));
153
- NORETURN(static inline void rb_raise_cstr(VALUE etype, const char *mesg));
154
- NORETURN(static inline void rb_raise_cstr_i(VALUE etype, VALUE mesg));
155
- NORETURN(static inline void rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name));
156
- NORETURN(static inline void rb_name_err_raise(const char *mesg, VALUE recv, VALUE name));
157
- NORETURN(static inline void rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name));
158
- static inline void Check_Type(VALUE v, enum ruby_value_type t);
159
- static inline bool rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type);
160
- #define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline
161
-
162
- RUBY_SYMBOL_EXPORT_BEGIN
163
- /* error.c (export) */
164
- int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
165
- #ifdef RUBY_FUNCTION_NAME_STRING
166
- NORETURN(void rb_sys_fail_path_in(const char *func_name, VALUE path));
167
- NORETURN(void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path));
168
- VALUE rb_syserr_new_path_in(const char *func_name, int n, VALUE path);
169
- #endif
170
- RUBY_SYMBOL_EXPORT_END
171
-
172
- /* vm.c */
173
- void rb_free_warning(void);
174
-
175
- static inline void
176
- rb_raise_cstr_i(VALUE etype, VALUE mesg)
177
- {
178
- VALUE exc = rb_exc_new_str(etype, mesg);
179
- rb_exc_raise(exc);
180
- }
181
-
182
- static inline void
183
- rb_raise_cstr(VALUE etype, const char *mesg)
184
- {
185
- VALUE str = rb_str_new_cstr(mesg);
186
- rb_raise_cstr_i(etype, str);
187
- }
188
-
189
- static inline void
190
- rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name)
191
- {
192
- VALUE exc = rb_name_err_new(mesg, recv, name);
193
- rb_exc_raise(exc);
194
- }
195
-
196
- static inline void
197
- rb_name_err_raise(const char *mesg, VALUE recv, VALUE name)
198
- {
199
- VALUE str = rb_fstring_cstr(mesg);
200
- rb_name_err_raise_str(str, recv, name);
201
- }
202
-
203
- static inline void
204
- rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name)
205
- {
206
- VALUE exc = rb_key_err_new(mesg, recv, name);
207
- rb_exc_raise(exc);
208
- }
209
-
210
- static inline bool
211
- rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type)
212
- {
213
- return RB_TYPE_P(obj, T_DATA) && RTYPEDDATA_P(obj) && (RTYPEDDATA_TYPE(obj) == data_type);
214
- }
215
-
216
- #endif /* INTERNAL_ERROR_H */
@@ -1,184 +0,0 @@
1
- #ifndef INTERNAL_FIXNUM_H /*-*-C-*-vi:se ft=c:*/
2
- #define INTERNAL_FIXNUM_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 Fixnums.
10
- */
11
- #include "ruby/internal/config.h" /* for HAVE_LONG_LONG */
12
- #include <limits.h> /* for CHAR_BIT */
13
- #include "internal/compilers.h" /* for __has_builtin */
14
- #include "ruby/internal/stdbool.h" /* for bool */
15
- #include "ruby/intern.h" /* for rb_big_mul */
16
- #include "ruby/ruby.h" /* for RB_FIXABLE */
17
-
18
- #if HAVE_LONG_LONG && SIZEOF_LONG * 2 <= SIZEOF_LONG_LONG
19
- # define DLONG LONG_LONG
20
- # define DL2NUM(x) LL2NUM(x)
21
- #elif defined(HAVE_INT128_T) && !(defined(__OpenBSD__) && defined(__mips64__))
22
- # define DLONG int128_t
23
- # define DL2NUM(x) (RB_FIXABLE(x) ? LONG2FIX(x) : rb_int128t2big(x))
24
- VALUE rb_int128t2big(int128_t n); /* in bignum.c */
25
- #endif
26
-
27
- static inline long rb_overflowed_fix_to_int(long x);
28
- static inline VALUE rb_fix_plus_fix(VALUE x, VALUE y);
29
- static inline VALUE rb_fix_minus_fix(VALUE x, VALUE y);
30
- static inline VALUE rb_fix_mul_fix(VALUE x, VALUE y);
31
- static inline void rb_fix_divmod_fix(VALUE x, VALUE y, VALUE *divp, VALUE *modp);
32
- static inline VALUE rb_fix_div_fix(VALUE x, VALUE y);
33
- static inline VALUE rb_fix_mod_fix(VALUE x, VALUE y);
34
- static inline bool FIXNUM_POSITIVE_P(VALUE num);
35
- static inline bool FIXNUM_NEGATIVE_P(VALUE num);
36
- static inline bool FIXNUM_ZERO_P(VALUE num);
37
-
38
- static inline long
39
- rb_overflowed_fix_to_int(long x)
40
- {
41
- return (long)((unsigned long)(x >> 1) ^ (1LU << (SIZEOF_LONG * CHAR_BIT - 1)));
42
- }
43
-
44
- static inline VALUE
45
- rb_fix_plus_fix(VALUE x, VALUE y)
46
- {
47
- #if !__has_builtin(__builtin_add_overflow)
48
- long lz = FIX2LONG(x) + FIX2LONG(y);
49
- return LONG2NUM(lz);
50
- #else
51
- long lz;
52
- /* NOTE
53
- * (1) `LONG2FIX(FIX2LONG(x)+FIX2LONG(y))`
54
- + = `((lx*2+1)/2 + (ly*2+1)/2)*2+1`
55
- + = `lx*2 + ly*2 + 1`
56
- + = `(lx*2+1) + (ly*2+1) - 1`
57
- + = `x + y - 1`
58
- * (2) Fixnum's LSB is always 1.
59
- * It means you can always run `x - 1` without overflow.
60
- * (3) Of course `z = x + (y-1)` may overflow.
61
- * At that time true value is
62
- * * positive: 0b0 1xxx...1, and z = 0b1xxx...1
63
- * * negative: 0b1 0xxx...1, and z = 0b0xxx...1
64
- * To convert this true value to long,
65
- * (a) Use arithmetic shift
66
- * * positive: 0b11xxx...
67
- * * negative: 0b00xxx...
68
- * (b) invert MSB
69
- * * positive: 0b01xxx...
70
- * * negative: 0b10xxx...
71
- */
72
- if (__builtin_add_overflow((long)x, (long)y-1, &lz)) {
73
- return rb_int2big(rb_overflowed_fix_to_int(lz));
74
- }
75
- else {
76
- return (VALUE)lz;
77
- }
78
- #endif
79
- }
80
-
81
- static inline VALUE
82
- rb_fix_minus_fix(VALUE x, VALUE y)
83
- {
84
- #if !__has_builtin(__builtin_sub_overflow)
85
- long lz = FIX2LONG(x) - FIX2LONG(y);
86
- return LONG2NUM(lz);
87
- #else
88
- long lz;
89
- if (__builtin_sub_overflow((long)x, (long)y-1, &lz)) {
90
- return rb_int2big(rb_overflowed_fix_to_int(lz));
91
- }
92
- else {
93
- return (VALUE)lz;
94
- }
95
- #endif
96
- }
97
-
98
- /* arguments must be Fixnum */
99
- static inline VALUE
100
- rb_fix_mul_fix(VALUE x, VALUE y)
101
- {
102
- long lx = FIX2LONG(x);
103
- long ly = FIX2LONG(y);
104
- #ifdef DLONG
105
- return DL2NUM((DLONG)lx * (DLONG)ly);
106
- #else
107
- if (MUL_OVERFLOW_FIXNUM_P(lx, ly)) {
108
- return rb_big_mul(rb_int2big(lx), rb_int2big(ly));
109
- }
110
- else {
111
- return LONG2FIX(lx * ly);
112
- }
113
- #endif
114
- }
115
-
116
- /*
117
- * This behaves different from C99 for negative arguments.
118
- * Note that div may overflow fixnum.
119
- */
120
- static inline void
121
- rb_fix_divmod_fix(VALUE a, VALUE b, VALUE *divp, VALUE *modp)
122
- {
123
- /* assume / and % comply C99.
124
- * ldiv(3) won't be inlined by GCC and clang.
125
- * I expect / and % are compiled as single idiv.
126
- */
127
- long x = FIX2LONG(a);
128
- long y = FIX2LONG(b);
129
- long div, mod;
130
- if (x == FIXNUM_MIN && y == -1) {
131
- if (divp) *divp = LONG2NUM(-FIXNUM_MIN);
132
- if (modp) *modp = LONG2FIX(0);
133
- return;
134
- }
135
- div = x / y;
136
- mod = x % y;
137
- if (y > 0 ? mod < 0 : mod > 0) {
138
- mod += y;
139
- div -= 1;
140
- }
141
- if (divp) *divp = LONG2FIX(div);
142
- if (modp) *modp = LONG2FIX(mod);
143
- }
144
-
145
- /* div() for Ruby
146
- * This behaves different from C99 for negative arguments.
147
- */
148
- static inline VALUE
149
- rb_fix_div_fix(VALUE x, VALUE y)
150
- {
151
- VALUE div;
152
- rb_fix_divmod_fix(x, y, &div, NULL);
153
- return div;
154
- }
155
-
156
- /* mod() for Ruby
157
- * This behaves different from C99 for negative arguments.
158
- */
159
- static inline VALUE
160
- rb_fix_mod_fix(VALUE x, VALUE y)
161
- {
162
- VALUE mod;
163
- rb_fix_divmod_fix(x, y, NULL, &mod);
164
- return mod;
165
- }
166
-
167
- static inline bool
168
- FIXNUM_POSITIVE_P(VALUE num)
169
- {
170
- return (SIGNED_VALUE)num > (SIGNED_VALUE)INT2FIX(0);
171
- }
172
-
173
- static inline bool
174
- FIXNUM_NEGATIVE_P(VALUE num)
175
- {
176
- return (SIGNED_VALUE)num < 0;
177
- }
178
-
179
- static inline bool
180
- FIXNUM_ZERO_P(VALUE num)
181
- {
182
- return num == INT2FIX(0);
183
- }
184
- #endif /* INTERNAL_FIXNUM_H */