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,119 +0,0 @@
1
- #ifndef BUILTIN_H_INCLUDED
2
- #define BUILTIN_H_INCLUDED
3
-
4
- // invoke
5
-
6
- struct rb_builtin_function {
7
- // for invocation
8
- const void * const func_ptr;
9
- const int argc;
10
-
11
- // for load
12
- const int index;
13
- const char * const name;
14
- };
15
-
16
- #define RB_BUILTIN_FUNCTION(_i, _name, _fname, _arity) {\
17
- .name = _i < 0 ? NULL : #_name, \
18
- .func_ptr = (void *)_fname, \
19
- .argc = _arity, \
20
- .index = _i, \
21
- }
22
-
23
- void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table);
24
-
25
- #ifndef rb_execution_context_t
26
- typedef struct rb_execution_context_struct rb_execution_context_t;
27
- #define rb_execution_context_t rb_execution_context_t
28
- #endif
29
-
30
- /* The following code is generated by the following Ruby script:
31
-
32
- typedef = proc {|i, args|
33
- "typedef VALUE (*rb_builtin_arity#{i}_function_type)(rb_execution_context_t *ec, VALUE self#{args});"
34
- }
35
- puts typedef[0, ""]
36
- (1..15).each {|i|
37
- puts typedef[i, ",\n " + (0...i).map{"VALUE"}.join(", ")]
38
- }
39
- 16.times{|i|
40
- puts "static inline void rb_builtin_function_check_arity#{i}(rb_builtin_arity#{i}_function_type f){}"
41
- }
42
- */
43
-
44
- typedef VALUE (*rb_builtin_arity0_function_type)(rb_execution_context_t *ec, VALUE self);
45
- typedef VALUE (*rb_builtin_arity1_function_type)(rb_execution_context_t *ec, VALUE self,
46
- VALUE);
47
- typedef VALUE (*rb_builtin_arity2_function_type)(rb_execution_context_t *ec, VALUE self,
48
- VALUE, VALUE);
49
- typedef VALUE (*rb_builtin_arity3_function_type)(rb_execution_context_t *ec, VALUE self,
50
- VALUE, VALUE, VALUE);
51
- typedef VALUE (*rb_builtin_arity4_function_type)(rb_execution_context_t *ec, VALUE self,
52
- VALUE, VALUE, VALUE, VALUE);
53
- typedef VALUE (*rb_builtin_arity5_function_type)(rb_execution_context_t *ec, VALUE self,
54
- VALUE, VALUE, VALUE, VALUE, VALUE);
55
- typedef VALUE (*rb_builtin_arity6_function_type)(rb_execution_context_t *ec, VALUE self,
56
- VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
57
- typedef VALUE (*rb_builtin_arity7_function_type)(rb_execution_context_t *ec, VALUE self,
58
- VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
59
- typedef VALUE (*rb_builtin_arity8_function_type)(rb_execution_context_t *ec, VALUE self,
60
- VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
61
- typedef VALUE (*rb_builtin_arity9_function_type)(rb_execution_context_t *ec, VALUE self,
62
- VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
63
- typedef VALUE (*rb_builtin_arity10_function_type)(rb_execution_context_t *ec, VALUE self,
64
- VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
65
- typedef VALUE (*rb_builtin_arity11_function_type)(rb_execution_context_t *ec, VALUE self,
66
- VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
67
- typedef VALUE (*rb_builtin_arity12_function_type)(rb_execution_context_t *ec, VALUE self,
68
- VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
69
- typedef VALUE (*rb_builtin_arity13_function_type)(rb_execution_context_t *ec, VALUE self,
70
- VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
71
- typedef VALUE (*rb_builtin_arity14_function_type)(rb_execution_context_t *ec, VALUE self,
72
- VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
73
- typedef VALUE (*rb_builtin_arity15_function_type)(rb_execution_context_t *ec, VALUE self,
74
- VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
75
- static inline void rb_builtin_function_check_arity0(rb_builtin_arity0_function_type f){}
76
- static inline void rb_builtin_function_check_arity1(rb_builtin_arity1_function_type f){}
77
- static inline void rb_builtin_function_check_arity2(rb_builtin_arity2_function_type f){}
78
- static inline void rb_builtin_function_check_arity3(rb_builtin_arity3_function_type f){}
79
- static inline void rb_builtin_function_check_arity4(rb_builtin_arity4_function_type f){}
80
- static inline void rb_builtin_function_check_arity5(rb_builtin_arity5_function_type f){}
81
- static inline void rb_builtin_function_check_arity6(rb_builtin_arity6_function_type f){}
82
- static inline void rb_builtin_function_check_arity7(rb_builtin_arity7_function_type f){}
83
- static inline void rb_builtin_function_check_arity8(rb_builtin_arity8_function_type f){}
84
- static inline void rb_builtin_function_check_arity9(rb_builtin_arity9_function_type f){}
85
- static inline void rb_builtin_function_check_arity10(rb_builtin_arity10_function_type f){}
86
- static inline void rb_builtin_function_check_arity11(rb_builtin_arity11_function_type f){}
87
- static inline void rb_builtin_function_check_arity12(rb_builtin_arity12_function_type f){}
88
- static inline void rb_builtin_function_check_arity13(rb_builtin_arity13_function_type f){}
89
- static inline void rb_builtin_function_check_arity14(rb_builtin_arity14_function_type f){}
90
- static inline void rb_builtin_function_check_arity15(rb_builtin_arity15_function_type f){}
91
-
92
- PUREFUNC(VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index));
93
- VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index);
94
-
95
- // __builtin_inline!
96
-
97
- PUREFUNC(static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index));
98
-
99
- static inline VALUE
100
- rb_vm_lvar(rb_execution_context_t *ec, int index)
101
- {
102
- #if defined(VM_CORE_H_EC_DEFINED) && VM_CORE_H_EC_DEFINED
103
- return ec->cfp->ep[index];
104
- #else
105
- return rb_vm_lvar_exposed(ec, index);
106
- #endif
107
- }
108
-
109
- #define LOCAL_PTR(local) local ## __ptr
110
-
111
- // dump/load
112
-
113
- struct builtin_binary {
114
- const char *feature; // feature name
115
- const unsigned char *bin; // binary by ISeq#to_binary
116
- size_t bin_size;
117
- };
118
-
119
- #endif // BUILTIN_H_INCLUDED
@@ -1,40 +0,0 @@
1
- /* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
2
- #ifndef CCAN_BUILD_ASSERT_H
3
- #define CCAN_BUILD_ASSERT_H
4
-
5
- /**
6
- * CCAN_BUILD_ASSERT - assert a build-time dependency.
7
- * @cond: the compile-time condition which must be true.
8
- *
9
- * Your compile will fail if the condition isn't true, or can't be evaluated
10
- * by the compiler. This can only be used within a function.
11
- *
12
- * Example:
13
- * #include <stddef.h>
14
- * ...
15
- * static char *foo_to_char(struct foo *foo)
16
- * {
17
- * // This code needs string to be at start of foo.
18
- * CCAN_BUILD_ASSERT(offsetof(struct foo, string) == 0);
19
- * return (char *)foo;
20
- * }
21
- */
22
- #define CCAN_BUILD_ASSERT(cond) \
23
- do { (void) sizeof(char [1 - 2*!(cond)]); } while(0)
24
-
25
- /**
26
- * CCAN_BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.
27
- * @cond: the compile-time condition which must be true.
28
- *
29
- * Your compile will fail if the condition isn't true, or can't be evaluated
30
- * by the compiler. This can be used in an expression: its value is "0".
31
- *
32
- * Example:
33
- * #define foo_to_char(foo) \
34
- * ((char *)(foo) \
35
- * + CCAN_BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0))
36
- */
37
- #define CCAN_BUILD_ASSERT_OR_ZERO(cond) \
38
- (sizeof(char [1 - 2*!(cond)]) - 1)
39
-
40
- #endif /* CCAN_BUILD_ASSERT_H */
@@ -1,63 +0,0 @@
1
- /* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
2
- #ifndef CCAN_CHECK_TYPE_H
3
- #define CCAN_CHECK_TYPE_H
4
-
5
- /**
6
- * ccan_check_type - issue a warning or build failure if type is not correct.
7
- * @expr: the expression whose type we should check (not evaluated).
8
- * @type: the exact type we expect the expression to be.
9
- *
10
- * This macro is usually used within other macros to try to ensure that a macro
11
- * argument is of the expected type. No type promotion of the expression is
12
- * done: an unsigned int is not the same as an int!
13
- *
14
- * ccan_check_type() always evaluates to 0.
15
- *
16
- * If your compiler does not support typeof, then the best we can do is fail
17
- * to compile if the sizes of the types are unequal (a less complete check).
18
- *
19
- * Example:
20
- * // They should always pass a 64-bit value to _set_some_value!
21
- * #define set_some_value(expr) \
22
- * _set_some_value((ccan_check_type((expr), uint64_t), (expr)))
23
- */
24
-
25
- /**
26
- * ccan_check_types_match - issue a warning or build failure if types are not same.
27
- * @expr1: the first expression (not evaluated).
28
- * @expr2: the second expression (not evaluated).
29
- *
30
- * This macro is usually used within other macros to try to ensure that
31
- * arguments are of identical types. No type promotion of the expressions is
32
- * done: an unsigned int is not the same as an int!
33
- *
34
- * ccan_check_types_match() always evaluates to 0.
35
- *
36
- * If your compiler does not support typeof, then the best we can do is fail
37
- * to compile if the sizes of the types are unequal (a less complete check).
38
- *
39
- * Example:
40
- * // Do subtraction to get to enclosing type, but make sure that
41
- * // pointer is of correct type for that member.
42
- * #define ccan_container_of(mbr_ptr, encl_type, mbr) \
43
- * (ccan_check_types_match((mbr_ptr), &((encl_type *)0)->mbr), \
44
- * ((encl_type *) \
45
- * ((char *)(mbr_ptr) - offsetof(enclosing_type, mbr))))
46
- */
47
- #if defined(HAVE_TYPEOF) && HAVE_TYPEOF
48
- #define ccan_check_type(expr, type) \
49
- ((typeof(expr) *)0 != (type *)0)
50
-
51
- #define ccan_check_types_match(expr1, expr2) \
52
- ((typeof(expr1) *)0 != (typeof(expr2) *)0)
53
- #else
54
- #include "ccan/build_assert/build_assert.h"
55
- /* Without typeof, we can only test the sizes. */
56
- #define ccan_check_type(expr, type) \
57
- CCAN_BUILD_ASSERT_OR_ZERO(sizeof(expr) == sizeof(type))
58
-
59
- #define ccan_check_types_match(expr1, expr2) \
60
- CCAN_BUILD_ASSERT_OR_ZERO(sizeof(expr1) == sizeof(expr2))
61
- #endif /* HAVE_TYPEOF */
62
-
63
- #endif /* CCAN_CHECK_TYPE_H */
@@ -1,142 +0,0 @@
1
- /* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
2
- #ifndef CCAN_CONTAINER_OF_H
3
- #define CCAN_CONTAINER_OF_H
4
- #include "ccan/check_type/check_type.h"
5
-
6
- /**
7
- * ccan_container_of - get pointer to enclosing structure
8
- * @member_ptr: pointer to the structure member
9
- * @containing_type: the type this member is within
10
- * @member: the name of this member within the structure.
11
- *
12
- * Given a pointer to a member of a structure, this macro does pointer
13
- * subtraction to return the pointer to the enclosing type.
14
- *
15
- * Example:
16
- * struct foo {
17
- * int fielda, fieldb;
18
- * // ...
19
- * };
20
- * struct info {
21
- * int some_other_field;
22
- * struct foo my_foo;
23
- * };
24
- *
25
- * static struct info *foo_to_info(struct foo *foo)
26
- * {
27
- * return ccan_container_of(foo, struct info, my_foo);
28
- * }
29
- */
30
- #define ccan_container_of(member_ptr, containing_type, member) \
31
- ((containing_type *) \
32
- ((char *)(member_ptr) \
33
- - ccan_container_off(containing_type, member)) \
34
- + ccan_check_types_match(*(member_ptr), ((containing_type *)0)->member))
35
-
36
-
37
- /**
38
- * ccan_container_of_or_null - get pointer to enclosing structure, or NULL
39
- * @member_ptr: pointer to the structure member
40
- * @containing_type: the type this member is within
41
- * @member: the name of this member within the structure.
42
- *
43
- * Given a pointer to a member of a structure, this macro does pointer
44
- * subtraction to return the pointer to the enclosing type, unless it
45
- * is given NULL, in which case it also returns NULL.
46
- *
47
- * Example:
48
- * struct foo {
49
- * int fielda, fieldb;
50
- * // ...
51
- * };
52
- * struct info {
53
- * int some_other_field;
54
- * struct foo my_foo;
55
- * };
56
- *
57
- * static struct info *foo_to_info_allowing_null(struct foo *foo)
58
- * {
59
- * return ccan_container_of_or_null(foo, struct info, my_foo);
60
- * }
61
- */
62
- static inline char *container_of_or_null_(void *member_ptr, size_t offset)
63
- {
64
- return member_ptr ? (char *)member_ptr - offset : NULL;
65
- }
66
- #define ccan_container_of_or_null(member_ptr, containing_type, member) \
67
- ((containing_type *) \
68
- ccan_container_of_or_null_(member_ptr, \
69
- ccan_container_off(containing_type, member)) \
70
- + ccan_check_types_match(*(member_ptr), ((containing_type *)0)->member))
71
-
72
- /**
73
- * ccan_container_off - get offset to enclosing structure
74
- * @containing_type: the type this member is within
75
- * @member: the name of this member within the structure.
76
- *
77
- * Given a pointer to a member of a structure, this macro does
78
- * typechecking and figures out the offset to the enclosing type.
79
- *
80
- * Example:
81
- * struct foo {
82
- * int fielda, fieldb;
83
- * // ...
84
- * };
85
- * struct info {
86
- * int some_other_field;
87
- * struct foo my_foo;
88
- * };
89
- *
90
- * static struct info *foo_to_info(struct foo *foo)
91
- * {
92
- * size_t off = ccan_container_off(struct info, my_foo);
93
- * return (void *)((char *)foo - off);
94
- * }
95
- */
96
- #define ccan_container_off(containing_type, member) \
97
- offsetof(containing_type, member)
98
-
99
- /**
100
- * ccan_container_of_var - get pointer to enclosing structure using a variable
101
- * @member_ptr: pointer to the structure member
102
- * @container_var: a pointer of same type as this member's container
103
- * @member: the name of this member within the structure.
104
- *
105
- * Given a pointer to a member of a structure, this macro does pointer
106
- * subtraction to return the pointer to the enclosing type.
107
- *
108
- * Example:
109
- * static struct info *foo_to_i(struct foo *foo)
110
- * {
111
- * struct info *i = ccan_container_of_var(foo, i, my_foo);
112
- * return i;
113
- * }
114
- */
115
- #if defined(HAVE_TYPEOF) && HAVE_TYPEOF
116
- #define ccan_container_of_var(member_ptr, container_var, member) \
117
- ccan_container_of(member_ptr, typeof(*container_var), member)
118
- #else
119
- #define ccan_container_of_var(member_ptr, container_var, member) \
120
- ((void *)((char *)(member_ptr) - \
121
- ccan_container_off_var(container_var, member)))
122
- #endif
123
-
124
- /**
125
- * ccan_container_off_var - get offset of a field in enclosing structure
126
- * @container_var: a pointer to a container structure
127
- * @member: the name of a member within the structure.
128
- *
129
- * Given (any) pointer to a structure and a its member name, this
130
- * macro does pointer subtraction to return offset of member in a
131
- * structure memory layout.
132
- *
133
- */
134
- #if defined(HAVE_TYPEOF) && HAVE_TYPEOF
135
- #define ccan_container_off_var(var, member) \
136
- ccan_container_off(typeof(*var), member)
137
- #else
138
- #define ccan_container_off_var(var, member) \
139
- ((const char *)&(var)->member - (const char *)(var))
140
- #endif
141
-
142
- #endif /* CCAN_CONTAINER_OF_H */