debase-ruby_core_source 0.10.13 → 0.10.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +28 -0
  3. data/debase-ruby_core_source.gemspec +3 -3
  4. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/addr2line.h +1 -1
  5. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-2.5.4-p155}/ccan/build_assert/build_assert.h +0 -0
  6. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-2.5.4-p155}/ccan/check_type/check_type.h +0 -0
  7. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-2.5.4-p155}/ccan/container_of/container_of.h +0 -0
  8. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ccan/list/list.h +773 -0
  9. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-2.5.4-p155}/ccan/str/str.h +0 -0
  10. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/constant.h +51 -0
  11. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/debug_counter.h +109 -0
  12. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/dln.h +10 -9
  13. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/encindex.h +69 -0
  14. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/eval_intern.h +334 -0
  15. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/gc.h +27 -10
  16. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/id.h +250 -0
  17. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/id_table.h +31 -0
  18. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/insns.inc +217 -0
  19. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/insns_info.inc +1570 -0
  20. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/internal.h +2036 -0
  21. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/iseq.h +308 -0
  22. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/known_errors.inc +16 -1
  23. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/method.h +218 -0
  24. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/node.h +115 -79
  25. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/node_name.inc +12 -22
  26. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/opt_sc.inc +1601 -0
  27. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/optinsn.inc +103 -0
  28. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/optunifs.inc +28 -83
  29. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/parse.h +74 -60
  30. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/probes_helper.h +43 -0
  31. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/regenc.h +254 -0
  32. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/regint.h +299 -211
  33. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/regparse.h +45 -37
  34. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/revision.h +1 -0
  35. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/ruby_assert.h +54 -0
  36. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/ruby_atomic.h +84 -26
  37. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/siphash.h +1 -1
  38. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/symbol.h +108 -0
  39. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/thread_pthread.h +14 -11
  40. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/thread_win32.h +2 -6
  41. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/timev.h +42 -0
  42. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/transcode_data.h +34 -12
  43. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/version.h +73 -0
  44. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm.inc +3667 -0
  45. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_call_iseq_optimized.inc +213 -0
  46. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_core.h +1768 -0
  47. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550/debug.h → ruby-2.5.4-p155/vm_debug.h} +4 -8
  48. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/vm_exec.h +38 -30
  49. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vm_insnhelper.h +255 -0
  50. data/lib/debase/ruby_core_source/{ruby-1.9.3-p550 → ruby-2.5.4-p155}/vm_opts.h +14 -9
  51. data/lib/debase/ruby_core_source/ruby-2.5.4-p155/vmtc.inc +214 -0
  52. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/addr2line.h +0 -0
  53. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/builtin.h +1 -0
  54. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/build_assert/build_assert.h +40 -0
  55. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/check_type/check_type.h +63 -0
  56. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/container_of/container_of.h +142 -0
  57. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/ccan/list/list.h +0 -0
  58. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/str/str.h +16 -0
  59. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/constant.h +0 -0
  60. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/darray.h +0 -0
  61. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/debug_counter.h +2 -0
  62. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/dln.h +0 -0
  63. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/encindex.h +0 -0
  64. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/eval_intern.h +32 -1
  65. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/gc.h +0 -1
  66. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/hrtime.h +0 -0
  67. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/id.h +0 -0
  68. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/id_table.h +0 -0
  69. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/insns.inc +4 -2
  70. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/insns_info.inc +309 -224
  71. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/array.h +0 -0
  72. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/bignum.h +0 -0
  73. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/bits.h +0 -0
  74. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/class.h +13 -5
  75. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/compar.h +0 -0
  76. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/compile.h +0 -0
  77. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/compilers.h +0 -0
  78. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/complex.h +0 -0
  79. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/cont.h +0 -0
  80. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/dir.h +0 -0
  81. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/enc.h +0 -0
  82. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/encoding.h +0 -0
  83. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/enum.h +0 -0
  84. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/enumerator.h +0 -0
  85. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/error.h +0 -0
  86. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/eval.h +0 -0
  87. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/file.h +0 -0
  88. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/fixnum.h +0 -0
  89. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/gc.h +12 -1
  90. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/hash.h +0 -0
  91. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/imemo.h +0 -0
  92. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/inits.h +0 -0
  93. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/io.h +0 -0
  94. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/load.h +0 -0
  95. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/loadpath.h +0 -0
  96. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/math.h +0 -0
  97. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/missing.h +0 -0
  98. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/numeric.h +0 -0
  99. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/object.h +0 -0
  100. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/parse.h +0 -0
  101. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/proc.h +0 -0
  102. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/process.h +0 -0
  103. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/random.h +0 -0
  104. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/range.h +0 -0
  105. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/rational.h +0 -0
  106. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/re.h +0 -0
  107. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/sanitizers.h +0 -0
  108. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/serial.h +0 -0
  109. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/signal.h +0 -0
  110. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/static_assert.h +0 -0
  111. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/string.h +0 -0
  112. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/struct.h +0 -0
  113. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/symbol.h +1 -0
  114. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/thread.h +0 -0
  115. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/time.h +0 -0
  116. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/transcode.h +0 -0
  117. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/util.h +0 -0
  118. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/variable.h +0 -0
  119. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/vm.h +2 -1
  120. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal/warnings.h +0 -0
  121. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/internal.h +0 -0
  122. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/iseq.h +3 -1
  123. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/known_errors.inc +0 -0
  124. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/method.h +14 -6
  125. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/mjit.h +0 -0
  126. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/mjit_compile.inc +64 -7
  127. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/node.h +28 -17
  128. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/node_name.inc +0 -2
  129. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/opt_sc.inc +2 -0
  130. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/optinsn.inc +0 -0
  131. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/optunifs.inc +1 -1
  132. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/parse.h +0 -0
  133. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/probes_helper.h +0 -0
  134. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/ractor_core.h +0 -0
  135. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/regenc.h +0 -0
  136. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/regint.h +0 -0
  137. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/regparse.h +0 -0
  138. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/revision.h +2 -0
  139. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/ruby_assert.h +0 -0
  140. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/ruby_atomic.h +0 -0
  141. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/siphash.h +0 -0
  142. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/symbol.h +0 -0
  143. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/thread_pthread.h +0 -0
  144. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/thread_win32.h +0 -0
  145. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/timev.h +0 -0
  146. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/transcode_data.h +0 -0
  147. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/transient_heap.h +0 -0
  148. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/variable.h +0 -0
  149. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/version.h +4 -4
  150. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm.inc +338 -283
  151. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_call_iseq_optimized.inc +0 -0
  152. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_callinfo.h +41 -8
  153. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_core.h +6 -2
  154. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_debug.h +8 -3
  155. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_exec.h +0 -0
  156. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_insnhelper.h +0 -0
  157. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vm_opts.h +0 -0
  158. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_sync.h +137 -0
  159. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/vmtc.inc +4 -2
  160. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/yjit.h +11 -1
  161. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/yjit_asm.h +21 -5
  162. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/yjit_codegen.h +5 -1
  163. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/yjit_core.h +11 -6
  164. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.1.0-p0}/yjit_iface.h +0 -0
  165. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/addr2line.h +20 -0
  166. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/builtin.h +84 -0
  167. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/build_assert/build_assert.h +40 -0
  168. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/check_type/check_type.h +63 -0
  169. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/container_of/container_of.h +142 -0
  170. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/list/list.h +789 -0
  171. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ccan/str/str.h +17 -0
  172. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/constant.h +55 -0
  173. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/darray.h +226 -0
  174. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/debug_counter.h +469 -0
  175. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/dln.h +31 -0
  176. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/encindex.h +70 -0
  177. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/eval_intern.h +339 -0
  178. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/gc.h +143 -0
  179. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/hrtime.h +216 -0
  180. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/id.h +295 -0
  181. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/id_table.h +36 -0
  182. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/insns.inc +249 -0
  183. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/insns_info.inc +9064 -0
  184. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/array.h +113 -0
  185. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/bignum.h +246 -0
  186. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/bits.h +565 -0
  187. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/class.h +211 -0
  188. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/cmdlineopt.h +61 -0
  189. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/compar.h +49 -0
  190. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/compile.h +35 -0
  191. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/compilers.h +107 -0
  192. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/complex.h +29 -0
  193. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/cont.h +24 -0
  194. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/dir.h +16 -0
  195. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/enc.h +19 -0
  196. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/encoding.h +30 -0
  197. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/enum.h +18 -0
  198. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/enumerator.h +21 -0
  199. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/error.h +191 -0
  200. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/eval.h +32 -0
  201. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/file.h +38 -0
  202. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/fixnum.h +184 -0
  203. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/gc.h +188 -0
  204. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/hash.h +243 -0
  205. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/imemo.h +243 -0
  206. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/inits.h +50 -0
  207. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/io.h +38 -0
  208. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/load.h +18 -0
  209. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/loadpath.h +16 -0
  210. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/math.h +23 -0
  211. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/missing.h +18 -0
  212. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/numeric.h +271 -0
  213. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/object.h +83 -0
  214. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/parse.h +23 -0
  215. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/proc.h +32 -0
  216. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/process.h +137 -0
  217. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/ractor.h +6 -0
  218. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/random.h +16 -0
  219. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/range.h +40 -0
  220. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/rational.h +72 -0
  221. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/re.h +30 -0
  222. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/sanitizers.h +190 -0
  223. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/serial.h +23 -0
  224. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/signal.h +21 -0
  225. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/static_assert.h +16 -0
  226. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/string.h +141 -0
  227. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/struct.h +153 -0
  228. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/symbol.h +41 -0
  229. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/thread.h +53 -0
  230. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/time.h +34 -0
  231. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/transcode.h +20 -0
  232. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/util.h +27 -0
  233. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/variable.h +83 -0
  234. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/vm.h +134 -0
  235. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal/warnings.h +16 -0
  236. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/internal.h +109 -0
  237. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/iseq.h +325 -0
  238. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/known_errors.inc +791 -0
  239. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/method.h +254 -0
  240. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/mjit.h +231 -0
  241. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/mjit_compile.inc +8333 -0
  242. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/node.h +510 -0
  243. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/node_name.inc +208 -0
  244. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/opt_sc.inc +109 -0
  245. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/optinsn.inc +128 -0
  246. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/optunifs.inc +43 -0
  247. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/parse.h +214 -0
  248. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/probes_helper.h +44 -0
  249. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ractor_core.h +346 -0
  250. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/regenc.h +255 -0
  251. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/regint.h +957 -0
  252. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/regparse.h +370 -0
  253. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/revision.h +2 -0
  254. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ruby_assert.h +14 -0
  255. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/ruby_atomic.h +23 -0
  256. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/siphash.h +48 -0
  257. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/symbol.h +119 -0
  258. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/thread_none.h +17 -0
  259. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/thread_pthread.h +115 -0
  260. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/thread_win32.h +61 -0
  261. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/timev.h +57 -0
  262. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/transcode_data.h +138 -0
  263. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/transient_heap.h +65 -0
  264. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/variable.h +21 -0
  265. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/version.h +91 -0
  266. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm.inc +5481 -0
  267. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_call_iseq_optimized.inc +244 -0
  268. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_callinfo.h +502 -0
  269. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_core.h +2089 -0
  270. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_debug.h +113 -0
  271. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_exec.h +197 -0
  272. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_insnhelper.h +262 -0
  273. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vm_opts.h +73 -0
  274. data/lib/debase/ruby_core_source/{ruby-3.1.0-preview1 → ruby-3.2.0-preview1}/vm_sync.h +0 -0
  275. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/vmtc.inc +243 -0
  276. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit.h +73 -0
  277. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_asm.h +408 -0
  278. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_codegen.h +23 -0
  279. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_core.h +307 -0
  280. data/lib/debase/ruby_core_source/ruby-3.2.0-preview1/yjit_iface.h +38 -0
  281. data/lib/debase/ruby_core_source/version.rb +1 -1
  282. metadata +284 -158
  283. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/constant.h +0 -34
  284. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/encdb.h +0 -167
  285. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/eval_intern.h +0 -234
  286. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/id.h +0 -177
  287. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/insns.inc +0 -179
  288. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/insns_info.inc +0 -695
  289. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/internal.h +0 -242
  290. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/iseq.h +0 -126
  291. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/method.h +0 -105
  292. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/opt_sc.inc +0 -670
  293. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/optinsn.inc +0 -30
  294. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/regenc.h +0 -219
  295. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/revision.h +0 -1
  296. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/timev.h +0 -21
  297. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/transdb.h +0 -189
  298. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/version.h +0 -52
  299. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm.inc +0 -3054
  300. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm_core.h +0 -763
  301. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vm_insnhelper.h +0 -220
  302. data/lib/debase/ruby_core_source/ruby-1.9.3-p550/vmtc.inc +0 -97
  303. data/lib/debase/ruby_core_source/ruby-3.1.0-preview1/revision.h +0 -2
@@ -0,0 +1,243 @@
1
+ #ifndef INTERNAL_HASH_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_HASH_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 Hash.
10
+ */
11
+ #include "ruby/internal/config.h"
12
+ #include <stddef.h> /* for size_t */
13
+ #include "ruby/internal/stdbool.h" /* for bool */
14
+ #include "ruby/ruby.h" /* for struct RBasic */
15
+ #include "ruby/st.h" /* for struct st_table */
16
+
17
+ #define RHASH_AR_TABLE_MAX_SIZE SIZEOF_VALUE
18
+
19
+ struct ar_table_struct;
20
+ typedef unsigned char ar_hint_t;
21
+
22
+ enum ruby_rhash_flags {
23
+ RHASH_PASS_AS_KEYWORDS = FL_USER1, /* FL 1 */
24
+ RHASH_PROC_DEFAULT = FL_USER2, /* FL 2 */
25
+ RHASH_ST_TABLE_FLAG = FL_USER3, /* FL 3 */
26
+ RHASH_AR_TABLE_SIZE_MASK = (FL_USER4|FL_USER5|FL_USER6|FL_USER7), /* FL 4..7 */
27
+ RHASH_AR_TABLE_SIZE_SHIFT = (FL_USHIFT+4),
28
+ RHASH_AR_TABLE_BOUND_MASK = (FL_USER8|FL_USER9|FL_USER10|FL_USER11), /* FL 8..11 */
29
+ RHASH_AR_TABLE_BOUND_SHIFT = (FL_USHIFT+8),
30
+
31
+ #if USE_TRANSIENT_HEAP
32
+ RHASH_TRANSIENT_FLAG = FL_USER12, /* FL 12 */
33
+ #endif
34
+
35
+ // we can not put it in "enum" because it can exceed "int" range.
36
+ #define RHASH_LEV_MASK (FL_USER13 | FL_USER14 | FL_USER15 | /* FL 13..19 */ \
37
+ FL_USER16 | FL_USER17 | FL_USER18 | FL_USER19)
38
+
39
+ RHASH_LEV_SHIFT = (FL_USHIFT + 13),
40
+ RHASH_LEV_MAX = 127, /* 7 bits */
41
+ };
42
+
43
+ struct RHash {
44
+ struct RBasic basic;
45
+ union {
46
+ st_table *st;
47
+ struct ar_table_struct *ar; /* possibly 0 */
48
+ } as;
49
+ const VALUE ifnone;
50
+ union {
51
+ ar_hint_t ary[RHASH_AR_TABLE_MAX_SIZE];
52
+ VALUE word;
53
+ } ar_hint;
54
+ };
55
+
56
+ #define RHASH(obj) ((struct RHash *)(obj))
57
+
58
+ #ifdef RHASH_IFNONE
59
+ # undef RHASH_IFNONE
60
+ #endif
61
+
62
+ #ifdef RHASH_SIZE
63
+ # undef RHASH_SIZE
64
+ #endif
65
+
66
+ #ifdef RHASH_EMPTY_P
67
+ # undef RHASH_EMPTY_P
68
+ #endif
69
+
70
+ /* hash.c */
71
+ void rb_hash_st_table_set(VALUE hash, st_table *st);
72
+ VALUE rb_hash_default_value(VALUE hash, VALUE key);
73
+ VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc);
74
+ long rb_dbl_long_hash(double d);
75
+ st_table *rb_init_identtable(void);
76
+ VALUE rb_to_hash_type(VALUE obj);
77
+ VALUE rb_hash_key_str(VALUE);
78
+ VALUE rb_hash_values(VALUE hash);
79
+ VALUE rb_hash_rehash(VALUE hash);
80
+ int rb_hash_add_new_element(VALUE hash, VALUE key, VALUE val);
81
+ VALUE rb_hash_set_pair(VALUE hash, VALUE pair);
82
+ int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval);
83
+ int rb_hash_stlike_foreach_with_replace(VALUE hash, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
84
+ int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func *func, st_data_t arg);
85
+ extern st_table *rb_hash_st_table(VALUE hash);
86
+ VALUE rb_ident_hash_new_with_size(st_index_t size);
87
+
88
+ static inline unsigned RHASH_AR_TABLE_SIZE_RAW(VALUE h);
89
+ static inline VALUE RHASH_IFNONE(VALUE h);
90
+ static inline size_t RHASH_SIZE(VALUE h);
91
+ static inline bool RHASH_EMPTY_P(VALUE h);
92
+ static inline bool RHASH_AR_TABLE_P(VALUE h);
93
+ static inline bool RHASH_ST_TABLE_P(VALUE h);
94
+ static inline struct ar_table_struct *RHASH_AR_TABLE(VALUE h);
95
+ static inline st_table *RHASH_ST_TABLE(VALUE h);
96
+ static inline size_t RHASH_ST_SIZE(VALUE h);
97
+ static inline void RHASH_ST_CLEAR(VALUE h);
98
+ static inline bool RHASH_TRANSIENT_P(VALUE h);
99
+ static inline void RHASH_SET_TRANSIENT_FLAG(VALUE h);
100
+ static inline void RHASH_UNSET_TRANSIENT_FLAG(VALUE h);
101
+
102
+ RUBY_SYMBOL_EXPORT_BEGIN
103
+ /* hash.c (export) */
104
+ VALUE rb_hash_delete_entry(VALUE hash, VALUE key);
105
+ VALUE rb_ident_hash_new(void);
106
+ int rb_hash_stlike_foreach(VALUE hash, st_foreach_callback_func *func, st_data_t arg);
107
+ RUBY_SYMBOL_EXPORT_END
108
+
109
+ MJIT_SYMBOL_EXPORT_BEGIN
110
+ VALUE rb_hash_new_with_size(st_index_t size);
111
+ VALUE rb_hash_resurrect(VALUE hash);
112
+ int rb_hash_stlike_lookup(VALUE hash, st_data_t key, st_data_t *pval);
113
+ VALUE rb_hash_keys(VALUE hash);
114
+ VALUE rb_hash_has_key(VALUE hash, VALUE key);
115
+ VALUE rb_hash_compare_by_id_p(VALUE hash);
116
+
117
+ st_table *rb_hash_tbl_raw(VALUE hash, const char *file, int line);
118
+ #define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h, __FILE__, __LINE__)
119
+ MJIT_SYMBOL_EXPORT_END
120
+
121
+ VALUE rb_hash_compare_by_id(VALUE hash);
122
+
123
+ #if 0 /* for debug */
124
+
125
+ static inline bool
126
+ RHASH_AR_TABLE_P(VALUE h)
127
+ {
128
+ extern int rb_hash_ar_table_p(VALUE hash);
129
+ return rb_hash_ar_table_p(h)
130
+ }
131
+
132
+ static inline struct ar_table_struct *
133
+ RHASH_AR_TABLE(VALUE h)
134
+ {
135
+ extern struct ar_table_struct *rb_hash_ar_table(VALUE hash);
136
+ return rb_hash_ar_table(h)
137
+ }
138
+
139
+ static inline st_table *
140
+ RHASH_ST_TABLE(VALUE h)
141
+ {
142
+ return rb_hash_st_table(h)
143
+ }
144
+
145
+ #else
146
+
147
+ static inline bool
148
+ RHASH_AR_TABLE_P(VALUE h)
149
+ {
150
+ return ! FL_TEST_RAW(h, RHASH_ST_TABLE_FLAG);
151
+ }
152
+
153
+ static inline struct ar_table_struct *
154
+ RHASH_AR_TABLE(VALUE h)
155
+ {
156
+ return RHASH(h)->as.ar;
157
+ }
158
+
159
+ static inline st_table *
160
+ RHASH_ST_TABLE(VALUE h)
161
+ {
162
+ return RHASH(h)->as.st;
163
+ }
164
+
165
+ #endif
166
+
167
+ static inline VALUE
168
+ RHASH_IFNONE(VALUE h)
169
+ {
170
+ return RHASH(h)->ifnone;
171
+ }
172
+
173
+ static inline size_t
174
+ RHASH_SIZE(VALUE h)
175
+ {
176
+ if (RHASH_AR_TABLE_P(h)) {
177
+ return RHASH_AR_TABLE_SIZE_RAW(h);
178
+ }
179
+ else {
180
+ return RHASH_ST_SIZE(h);
181
+ }
182
+ }
183
+
184
+ static inline bool
185
+ RHASH_EMPTY_P(VALUE h)
186
+ {
187
+ return RHASH_SIZE(h) == 0;
188
+ }
189
+
190
+ static inline bool
191
+ RHASH_ST_TABLE_P(VALUE h)
192
+ {
193
+ return ! RHASH_AR_TABLE_P(h);
194
+ }
195
+
196
+ static inline size_t
197
+ RHASH_ST_SIZE(VALUE h)
198
+ {
199
+ return RHASH_ST_TABLE(h)->num_entries;
200
+ }
201
+
202
+ static inline void
203
+ RHASH_ST_CLEAR(VALUE h)
204
+ {
205
+ FL_UNSET_RAW(h, RHASH_ST_TABLE_FLAG);
206
+ RHASH(h)->as.ar = NULL;
207
+ }
208
+
209
+ static inline unsigned
210
+ RHASH_AR_TABLE_SIZE_RAW(VALUE h)
211
+ {
212
+ VALUE ret = FL_TEST_RAW(h, RHASH_AR_TABLE_SIZE_MASK);
213
+ ret >>= RHASH_AR_TABLE_SIZE_SHIFT;
214
+ return (unsigned)ret;
215
+ }
216
+
217
+ static inline bool
218
+ RHASH_TRANSIENT_P(VALUE h)
219
+ {
220
+ #if USE_TRANSIENT_HEAP
221
+ return FL_TEST_RAW(h, RHASH_TRANSIENT_FLAG);
222
+ #else
223
+ return false;
224
+ #endif
225
+ }
226
+
227
+ static inline void
228
+ RHASH_SET_TRANSIENT_FLAG(VALUE h)
229
+ {
230
+ #if USE_TRANSIENT_HEAP
231
+ FL_SET_RAW(h, RHASH_TRANSIENT_FLAG);
232
+ #endif
233
+ }
234
+
235
+ static inline void
236
+ RHASH_UNSET_TRANSIENT_FLAG(VALUE h)
237
+ {
238
+ #if USE_TRANSIENT_HEAP
239
+ FL_UNSET_RAW(h, RHASH_TRANSIENT_FLAG);
240
+ #endif
241
+ }
242
+
243
+ #endif /* INTERNAL_HASH_H */
@@ -0,0 +1,243 @@
1
+ #ifndef INTERNAL_IMEMO_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_IMEMO_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 IMEMO: Internal memo object.
10
+ */
11
+ #include "ruby/internal/config.h"
12
+ #include <stddef.h> /* for size_t */
13
+ #include "internal/array.h" /* for rb_ary_tmp_new_fill */
14
+ #include "internal/gc.h" /* for RB_OBJ_WRITE */
15
+ #include "ruby/internal/stdbool.h" /* for bool */
16
+ #include "ruby/ruby.h" /* for rb_block_call_func_t */
17
+
18
+ #ifndef IMEMO_DEBUG
19
+ # define IMEMO_DEBUG 0
20
+ #endif
21
+
22
+ #define IMEMO_MASK 0x0f
23
+
24
+ /* FL_USER0 to FL_USER3 is for type */
25
+ #define IMEMO_FL_USHIFT (FL_USHIFT + 4)
26
+ #define IMEMO_FL_USER0 FL_USER4
27
+ #define IMEMO_FL_USER1 FL_USER5
28
+ #define IMEMO_FL_USER2 FL_USER6
29
+ #define IMEMO_FL_USER3 FL_USER7
30
+ #define IMEMO_FL_USER4 FL_USER8
31
+ #define IMEMO_FL_USER5 FL_USER9
32
+
33
+ enum imemo_type {
34
+ imemo_env = 0,
35
+ imemo_cref = 1, /*!< class reference */
36
+ imemo_svar = 2, /*!< special variable */
37
+ imemo_throw_data = 3,
38
+ imemo_ifunc = 4, /*!< iterator function */
39
+ imemo_memo = 5,
40
+ imemo_ment = 6,
41
+ imemo_iseq = 7,
42
+ imemo_tmpbuf = 8,
43
+ imemo_ast = 9,
44
+ imemo_parser_strterm = 10,
45
+ imemo_callinfo = 11,
46
+ imemo_callcache = 12,
47
+ imemo_constcache = 13,
48
+ };
49
+
50
+ /* CREF (Class REFerence) is defined in method.h */
51
+
52
+ /*! SVAR (Special VARiable) */
53
+ struct vm_svar {
54
+ VALUE flags;
55
+ const VALUE cref_or_me; /*!< class reference or rb_method_entry_t */
56
+ const VALUE lastline;
57
+ const VALUE backref;
58
+ const VALUE others;
59
+ };
60
+
61
+ /*! THROW_DATA */
62
+ struct vm_throw_data {
63
+ VALUE flags;
64
+ VALUE reserved;
65
+ const VALUE throw_obj;
66
+ const struct rb_control_frame_struct *catch_frame;
67
+ int throw_state;
68
+ };
69
+
70
+ #define THROW_DATA_CONSUMED IMEMO_FL_USER0
71
+
72
+ /* IFUNC (Internal FUNCtion) */
73
+
74
+ struct vm_ifunc_argc {
75
+ #if SIZEOF_INT * 2 > SIZEOF_VALUE
76
+ signed int min: (SIZEOF_VALUE * CHAR_BIT) / 2;
77
+ signed int max: (SIZEOF_VALUE * CHAR_BIT) / 2;
78
+ #else
79
+ int min, max;
80
+ #endif
81
+ };
82
+
83
+ /*! IFUNC (Internal FUNCtion) */
84
+ struct vm_ifunc {
85
+ VALUE flags;
86
+ VALUE reserved;
87
+ rb_block_call_func_t func;
88
+ const void *data;
89
+ struct vm_ifunc_argc argc;
90
+ };
91
+
92
+ struct rb_imemo_tmpbuf_struct {
93
+ VALUE flags;
94
+ VALUE reserved;
95
+ VALUE *ptr; /* malloc'ed buffer */
96
+ struct rb_imemo_tmpbuf_struct *next; /* next imemo */
97
+ size_t cnt; /* buffer size in VALUE */
98
+ };
99
+
100
+ /*! MEMO
101
+ *
102
+ * @see imemo_type
103
+ * */
104
+ struct MEMO {
105
+ VALUE flags;
106
+ VALUE reserved;
107
+ const VALUE v1;
108
+ const VALUE v2;
109
+ union {
110
+ long cnt;
111
+ long state;
112
+ const VALUE value;
113
+ void (*func)(void);
114
+ } u3;
115
+ };
116
+
117
+ /* ment is in method.h */
118
+
119
+ #define THROW_DATA_P(err) imemo_throw_data_p((VALUE)err)
120
+ #define MEMO_CAST(m) ((struct MEMO *)(m))
121
+ #define MEMO_NEW(a, b, c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
122
+ #define MEMO_FOR(type, value) ((type *)RARRAY_PTR(value))
123
+ #define NEW_MEMO_FOR(type, value) \
124
+ ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value))
125
+ #define NEW_PARTIAL_MEMO_FOR(type, value, member) \
126
+ ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), \
127
+ rb_ary_set_len((value), offsetof(type, member) / sizeof(VALUE)), \
128
+ MEMO_FOR(type, value))
129
+
130
+ typedef struct rb_imemo_tmpbuf_struct rb_imemo_tmpbuf_t;
131
+ VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
132
+ rb_imemo_tmpbuf_t *rb_imemo_tmpbuf_parser_heap(void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt);
133
+ struct vm_ifunc *rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc);
134
+ void rb_strterm_mark(VALUE obj);
135
+ static inline enum imemo_type imemo_type(VALUE imemo);
136
+ static inline int imemo_type_p(VALUE imemo, enum imemo_type imemo_type);
137
+ static inline bool imemo_throw_data_p(VALUE imemo);
138
+ static inline struct vm_ifunc *rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data);
139
+ static inline VALUE rb_imemo_tmpbuf_auto_free_pointer(void);
140
+ static inline void *RB_IMEMO_TMPBUF_PTR(VALUE v);
141
+ static inline void *rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr);
142
+ static inline VALUE rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str);
143
+ static inline void MEMO_V1_SET(struct MEMO *m, VALUE v);
144
+ static inline void MEMO_V2_SET(struct MEMO *m, VALUE v);
145
+
146
+ RUBY_SYMBOL_EXPORT_BEGIN
147
+ #if IMEMO_DEBUG
148
+ VALUE rb_imemo_new_debug(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0, const char *file, int line);
149
+ #define rb_imemo_new(type, v1, v2, v3, v0) rb_imemo_new_debug(type, v1, v2, v3, v0, __FILE__, __LINE__)
150
+ #else
151
+ VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
152
+ #endif
153
+ const char *rb_imemo_name(enum imemo_type type);
154
+ RUBY_SYMBOL_EXPORT_END
155
+
156
+ static inline enum imemo_type
157
+ imemo_type(VALUE imemo)
158
+ {
159
+ return (RBASIC(imemo)->flags >> FL_USHIFT) & IMEMO_MASK;
160
+ }
161
+
162
+ static inline int
163
+ imemo_type_p(VALUE imemo, enum imemo_type imemo_type)
164
+ {
165
+ if (LIKELY(!RB_SPECIAL_CONST_P(imemo))) {
166
+ /* fixed at compile time if imemo_type is given. */
167
+ const VALUE mask = (IMEMO_MASK << FL_USHIFT) | RUBY_T_MASK;
168
+ const VALUE expected_type = (imemo_type << FL_USHIFT) | T_IMEMO;
169
+ /* fixed at runtime. */
170
+ return expected_type == (RBASIC(imemo)->flags & mask);
171
+ }
172
+ else {
173
+ return 0;
174
+ }
175
+ }
176
+
177
+ #define IMEMO_TYPE_P(v, t) imemo_type_p((VALUE)v, t)
178
+
179
+ static inline bool
180
+ imemo_throw_data_p(VALUE imemo)
181
+ {
182
+ return RB_TYPE_P(imemo, T_IMEMO);
183
+ }
184
+
185
+ static inline struct vm_ifunc *
186
+ rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data)
187
+ {
188
+ return rb_vm_ifunc_new(func, data, 0, UNLIMITED_ARGUMENTS);
189
+ }
190
+
191
+ static inline VALUE
192
+ rb_imemo_tmpbuf_auto_free_pointer(void)
193
+ {
194
+ return rb_imemo_new(imemo_tmpbuf, 0, 0, 0, 0);
195
+ }
196
+
197
+ static inline void *
198
+ RB_IMEMO_TMPBUF_PTR(VALUE v)
199
+ {
200
+ const struct rb_imemo_tmpbuf_struct *p = (const void *)v;
201
+ return p->ptr;
202
+ }
203
+
204
+ static inline void *
205
+ rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr)
206
+ {
207
+ return ((rb_imemo_tmpbuf_t *)v)->ptr = ptr;
208
+ }
209
+
210
+ static inline VALUE
211
+ rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str)
212
+ {
213
+ const void *src;
214
+ VALUE imemo;
215
+ rb_imemo_tmpbuf_t *tmpbuf;
216
+ void *dst;
217
+ size_t len;
218
+
219
+ SafeStringValue(str);
220
+ /* create tmpbuf to keep the pointer before xmalloc */
221
+ imemo = rb_imemo_tmpbuf_auto_free_pointer();
222
+ tmpbuf = (rb_imemo_tmpbuf_t *)imemo;
223
+ len = RSTRING_LEN(str);
224
+ src = RSTRING_PTR(str);
225
+ dst = ruby_xmalloc(len);
226
+ memcpy(dst, src, len);
227
+ tmpbuf->ptr = dst;
228
+ return imemo;
229
+ }
230
+
231
+ static inline void
232
+ MEMO_V1_SET(struct MEMO *m, VALUE v)
233
+ {
234
+ RB_OBJ_WRITE(m, &m->v1, v);
235
+ }
236
+
237
+ static inline void
238
+ MEMO_V2_SET(struct MEMO *m, VALUE v)
239
+ {
240
+ RB_OBJ_WRITE(m, &m->v2, v);
241
+ }
242
+
243
+ #endif /* INTERNAL_IMEMO_H */
@@ -0,0 +1,50 @@
1
+ #ifndef INTERNAL_INITS_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_INITS_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 aggregating init functions.
10
+ */
11
+
12
+ /* class.c */
13
+ void Init_class_hierarchy(void);
14
+
15
+ /* dmyext.c */
16
+ void Init_enc(void);
17
+ void Init_ext(void);
18
+
19
+ /* file.c */
20
+ void Init_File(void);
21
+
22
+ /* gc.c */
23
+ void Init_heap(void);
24
+
25
+ /* localeinit.c */
26
+ int Init_enc_set_filesystem_encoding(void);
27
+
28
+ /* newline.c */
29
+ void Init_newline(void);
30
+
31
+ /* vm.c */
32
+ void Init_BareVM(void);
33
+ void Init_vm_objects(void);
34
+
35
+ /* vm_backtrace.c */
36
+ void Init_vm_backtrace(void);
37
+
38
+ /* vm_eval.c */
39
+ void Init_vm_eval(void);
40
+
41
+ /* vm_insnhelper.c */
42
+ void Init_vm_stack_canary(void);
43
+
44
+ /* vm_method.c */
45
+ void Init_eval_method(void);
46
+
47
+ /* inits.c */
48
+ void rb_call_inits(void);
49
+
50
+ #endif /* INTERNAL_INITS_H */
@@ -0,0 +1,38 @@
1
+ #ifndef INTERNAL_IO_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_IO_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 IO.
10
+ */
11
+ #include "ruby/ruby.h" /* for VALUE */
12
+ #include "ruby/io.h" /* for rb_io_t */
13
+
14
+ /* io.c */
15
+ void ruby_set_inplace_mode(const char *);
16
+ void rb_stdio_set_default_encoding(void);
17
+ VALUE rb_io_flush_raw(VALUE, int);
18
+ size_t rb_io_memsize(const rb_io_t *);
19
+ int rb_stderr_tty_p(void);
20
+ void rb_io_fptr_finalize_internal(void *ptr);
21
+ #ifdef rb_io_fptr_finalize
22
+ # undef rb_io_fptr_finalize
23
+ #endif
24
+ #define rb_io_fptr_finalize rb_io_fptr_finalize_internal
25
+ VALUE rb_io_popen(VALUE pname, VALUE pmode, VALUE env, VALUE opt);
26
+
27
+ VALUE rb_io_prep_stdin(void);
28
+ VALUE rb_io_prep_stdout(void);
29
+ VALUE rb_io_prep_stderr(void);
30
+
31
+ RUBY_SYMBOL_EXPORT_BEGIN
32
+ /* io.c (export) */
33
+ void rb_maygvl_fd_fix_cloexec(int fd);
34
+ int rb_gc_for_fd(int err);
35
+ void rb_write_error_str(VALUE mesg);
36
+ RUBY_SYMBOL_EXPORT_END
37
+
38
+ #endif /* INTERNAL_IO_H */
@@ -0,0 +1,18 @@
1
+ #ifndef INTERNAL_LOAD_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_LOAD_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 require.
10
+ */
11
+ #include "ruby/ruby.h" /* for VALUE */
12
+
13
+ /* load.c */
14
+ VALUE rb_get_expanded_load_path(void);
15
+ int rb_require_internal(VALUE fname);
16
+ NORETURN(void rb_load_fail(VALUE, const char*));
17
+
18
+ #endif /* INTERNAL_LOAD_H */
@@ -0,0 +1,16 @@
1
+ #ifndef INTERNAL_LOADPATH_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_LOADPATH_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 $LOAD_PATH.
10
+ */
11
+
12
+ /* loadpath.c */
13
+ extern const char ruby_exec_prefix[];
14
+ extern const char ruby_initial_load_paths[];
15
+
16
+ #endif /* INTERNAL_LOADPATH_H */
@@ -0,0 +1,23 @@
1
+ #ifndef INTERNAL_MATH_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_MATH_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 Math.
10
+ */
11
+ #include "ruby/ruby.h" /* for VALUE */
12
+
13
+ /* math.c */
14
+ VALUE rb_math_atan2(VALUE, VALUE);
15
+ VALUE rb_math_cos(VALUE);
16
+ VALUE rb_math_cosh(VALUE);
17
+ VALUE rb_math_exp(VALUE);
18
+ VALUE rb_math_hypot(VALUE, VALUE);
19
+ VALUE rb_math_log(int argc, const VALUE *argv);
20
+ VALUE rb_math_sin(VALUE);
21
+ VALUE rb_math_sinh(VALUE);
22
+
23
+ #endif /* INTERNAL_MATH_H */
@@ -0,0 +1,18 @@
1
+ #ifndef INTERNAL_MISSING_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_MISSING_H
3
+ /**
4
+ * @author Ruby developers <ruby-core@ruby-lang.org>
5
+ * @copyright This file is a part of the programming language Ruby.
6
+ * Permission is hereby granted, to either redistribute and/or
7
+ * modify this file, provided that the conditions mentioned in the
8
+ * file COPYING are met. Consult the file for details.
9
+ * @brief Internal header corresponding missing.
10
+ */
11
+ #include "ruby/internal/config.h" /* for HAVE_SETPROCTITLE */
12
+
13
+ /* missing/setproctitle.c */
14
+ #ifndef HAVE_SETPROCTITLE
15
+ extern void ruby_init_setproctitle(int argc, char *argv[]);
16
+ #endif
17
+
18
+ #endif /* INTERNAL_MISSING_H */