debase-ruby_core_source 0.10.10 → 0.10.14

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 (226) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +6 -3
  3. data/debase-ruby_core_source.gemspec +4 -4
  4. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/addr2line.h +20 -0
  5. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/builtin.h +83 -0
  6. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/build_assert/build_assert.h +40 -0
  7. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/check_type/check_type.h +63 -0
  8. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/container_of/container_of.h +142 -0
  9. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/list/list.h +788 -0
  10. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/str/str.h +16 -0
  11. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/constant.h +55 -0
  12. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/debug_counter.h +457 -0
  13. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/dln.h +36 -0
  14. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/encindex.h +70 -0
  15. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/eval_intern.h +323 -0
  16. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/gc.h +140 -0
  17. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/hrtime.h +168 -0
  18. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/id.h +290 -0
  19. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/id_table.h +36 -0
  20. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/insns.inc +249 -0
  21. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/insns_info.inc +8983 -0
  22. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/array.h +119 -0
  23. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bignum.h +246 -0
  24. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bits.h +566 -0
  25. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/class.h +174 -0
  26. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compar.h +50 -0
  27. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compile.h +32 -0
  28. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compilers.h +108 -0
  29. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/complex.h +29 -0
  30. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/cont.h +25 -0
  31. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/dir.h +17 -0
  32. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enc.h +20 -0
  33. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/encoding.h +28 -0
  34. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enum.h +19 -0
  35. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enumerator.h +22 -0
  36. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/error.h +124 -0
  37. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/eval.h +33 -0
  38. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/file.h +39 -0
  39. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/fixnum.h +185 -0
  40. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/gc.h +161 -0
  41. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/hash.h +241 -0
  42. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/imemo.h +243 -0
  43. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/inits.h +51 -0
  44. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/io.h +35 -0
  45. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/load.h +19 -0
  46. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/loadpath.h +17 -0
  47. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/math.h +24 -0
  48. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/missing.h +19 -0
  49. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/numeric.h +255 -0
  50. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/object.h +83 -0
  51. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/parse.h +23 -0
  52. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/proc.h +33 -0
  53. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/process.h +136 -0
  54. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/random.h +17 -0
  55. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/range.h +41 -0
  56. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/rational.h +71 -0
  57. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/re.h +29 -0
  58. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/sanitizers.h +191 -0
  59. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/scheduler.h +44 -0
  60. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/serial.h +24 -0
  61. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/signal.h +22 -0
  62. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/static_assert.h +17 -0
  63. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/string.h +140 -0
  64. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/struct.h +154 -0
  65. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/symbol.h +41 -0
  66. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/thread.h +54 -0
  67. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/time.h +35 -0
  68. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/transcode.h +21 -0
  69. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/util.h +31 -0
  70. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/variable.h +84 -0
  71. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/vm.h +136 -0
  72. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/warnings.h +17 -0
  73. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal.h +107 -0
  74. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/iseq.h +305 -0
  75. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/known_errors.inc +791 -0
  76. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/method.h +245 -0
  77. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/mjit.h +220 -0
  78. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/mjit_compile.inc +8240 -0
  79. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/node.h +484 -0
  80. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/node_name.inc +210 -0
  81. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/opt_sc.inc +109 -0
  82. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/optinsn.inc +128 -0
  83. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/optunifs.inc +43 -0
  84. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/parse.h +211 -0
  85. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/probes_helper.h +44 -0
  86. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ractor_core.h +343 -0
  87. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/regenc.h +254 -0
  88. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/regint.h +938 -0
  89. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/regparse.h +370 -0
  90. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/revision.h +2 -0
  91. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_assert.h +15 -0
  92. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_atomic.h +23 -0
  93. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/siphash.h +48 -0
  94. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/symbol.h +119 -0
  95. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/thread_pthread.h +115 -0
  96. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/thread_win32.h +61 -0
  97. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/timev.h +57 -0
  98. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/transcode_data.h +138 -0
  99. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/transient_heap.h +65 -0
  100. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/variable.h +22 -0
  101. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/version.h +89 -0
  102. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm.inc +5355 -0
  103. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_call_iseq_optimized.inc +244 -0
  104. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_callinfo.h +456 -0
  105. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_core.h +2023 -0
  106. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_debug.h +116 -0
  107. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_exec.h +196 -0
  108. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_insnhelper.h +257 -0
  109. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_opts.h +73 -0
  110. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_sync.h +136 -0
  111. data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vmtc.inc +243 -0
  112. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/addr2line.h +20 -0
  113. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/builtin.h +84 -0
  114. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/build_assert/build_assert.h +40 -0
  115. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/check_type/check_type.h +63 -0
  116. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/container_of/container_of.h +142 -0
  117. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/list/list.h +788 -0
  118. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/str/str.h +16 -0
  119. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/constant.h +55 -0
  120. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/darray.h +198 -0
  121. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/debug_counter.h +469 -0
  122. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/dln.h +31 -0
  123. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/encindex.h +70 -0
  124. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/eval_intern.h +335 -0
  125. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/gc.h +141 -0
  126. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/hrtime.h +168 -0
  127. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/id.h +293 -0
  128. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/id_table.h +36 -0
  129. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/insns.inc +249 -0
  130. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/insns_info.inc +9063 -0
  131. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/array.h +113 -0
  132. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/bignum.h +246 -0
  133. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/bits.h +565 -0
  134. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/class.h +196 -0
  135. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/compar.h +49 -0
  136. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/compile.h +35 -0
  137. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/compilers.h +107 -0
  138. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/complex.h +29 -0
  139. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/cont.h +24 -0
  140. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/dir.h +16 -0
  141. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/enc.h +19 -0
  142. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/encoding.h +30 -0
  143. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/enum.h +18 -0
  144. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/enumerator.h +21 -0
  145. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/error.h +191 -0
  146. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/eval.h +32 -0
  147. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/file.h +38 -0
  148. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/fixnum.h +184 -0
  149. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/gc.h +186 -0
  150. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/hash.h +243 -0
  151. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/imemo.h +243 -0
  152. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/inits.h +50 -0
  153. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/io.h +38 -0
  154. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/load.h +18 -0
  155. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/loadpath.h +16 -0
  156. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/math.h +23 -0
  157. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/missing.h +18 -0
  158. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/numeric.h +271 -0
  159. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/object.h +83 -0
  160. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/parse.h +23 -0
  161. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/proc.h +32 -0
  162. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/process.h +137 -0
  163. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/random.h +16 -0
  164. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/range.h +40 -0
  165. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/rational.h +72 -0
  166. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/re.h +30 -0
  167. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/sanitizers.h +190 -0
  168. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/serial.h +23 -0
  169. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/signal.h +21 -0
  170. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/static_assert.h +16 -0
  171. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/string.h +141 -0
  172. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/struct.h +153 -0
  173. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/symbol.h +41 -0
  174. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/thread.h +53 -0
  175. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/time.h +34 -0
  176. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/transcode.h +20 -0
  177. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/util.h +27 -0
  178. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/variable.h +83 -0
  179. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/vm.h +133 -0
  180. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/warnings.h +16 -0
  181. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal.h +109 -0
  182. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/iseq.h +322 -0
  183. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/known_errors.inc +791 -0
  184. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/method.h +253 -0
  185. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/mjit.h +231 -0
  186. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/mjit_compile.inc +8322 -0
  187. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/node.h +510 -0
  188. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/node_name.inc +208 -0
  189. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/opt_sc.inc +109 -0
  190. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/optinsn.inc +128 -0
  191. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/optunifs.inc +43 -0
  192. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/parse.h +214 -0
  193. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/probes_helper.h +44 -0
  194. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ractor_core.h +346 -0
  195. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/regenc.h +254 -0
  196. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/regint.h +942 -0
  197. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/regparse.h +370 -0
  198. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/revision.h +2 -0
  199. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ruby_assert.h +14 -0
  200. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ruby_atomic.h +23 -0
  201. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/siphash.h +48 -0
  202. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/symbol.h +119 -0
  203. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/thread_pthread.h +115 -0
  204. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/thread_win32.h +61 -0
  205. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/timev.h +57 -0
  206. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/transcode_data.h +138 -0
  207. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/transient_heap.h +65 -0
  208. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/variable.h +21 -0
  209. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/version.h +88 -0
  210. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm.inc +5470 -0
  211. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_call_iseq_optimized.inc +244 -0
  212. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_callinfo.h +487 -0
  213. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_core.h +2107 -0
  214. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_debug.h +124 -0
  215. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_exec.h +197 -0
  216. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_insnhelper.h +265 -0
  217. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_opts.h +73 -0
  218. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_sync.h +137 -0
  219. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vmtc.inc +243 -0
  220. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/yjit.h +73 -0
  221. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/yjit_asm.h +408 -0
  222. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/yjit_codegen.h +23 -0
  223. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/yjit_core.h +307 -0
  224. data/lib/debase/ruby_core_source/ruby-3.1.0-p0/yjit_iface.h +38 -0
  225. data/lib/debase/ruby_core_source/version.rb +1 -1
  226. metadata +235 -14
@@ -0,0 +1,136 @@
1
+ #ifndef INTERNAL_VM_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_VM_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header for RubyVM.
11
+ */
12
+ #include "ruby/internal/stdbool.h" /* for bool */
13
+ #include "internal/serial.h" /* for rb_serial_t */
14
+ #include "internal/static_assert.h" /* for STATIC_ASSERT */
15
+ #include "ruby/ruby.h" /* for ID */
16
+ #include "ruby/st.h" /* for st_table */
17
+
18
+ #ifdef rb_funcallv
19
+ # undef rb_funcallv
20
+ #endif
21
+
22
+ #ifdef rb_method_basic_definition_p
23
+ # undef rb_method_basic_definition_p
24
+ #endif
25
+
26
+ struct rb_callable_method_entry_struct; /* in method.h */
27
+ struct rb_method_definition_struct; /* in method.h */
28
+ struct rb_execution_context_struct; /* in vm_core.h */
29
+ struct rb_control_frame_struct; /* in vm_core.h */
30
+ struct rb_callinfo; /* in vm_core.h */
31
+
32
+ enum method_missing_reason {
33
+ MISSING_NOENTRY = 0x00,
34
+ MISSING_PRIVATE = 0x01,
35
+ MISSING_PROTECTED = 0x02,
36
+ MISSING_FCALL = 0x04,
37
+ MISSING_VCALL = 0x08,
38
+ MISSING_SUPER = 0x10,
39
+ MISSING_MISSING = 0x20,
40
+ MISSING_NONE = 0x40
41
+ };
42
+
43
+ /* vm_insnhelper.h */
44
+ rb_serial_t rb_next_class_serial(void);
45
+
46
+ /* vm.c */
47
+ VALUE rb_obj_is_thread(VALUE obj);
48
+ void rb_vm_mark(void *ptr);
49
+ void rb_vm_each_stack_value(void *ptr, void (*cb)(VALUE, void*), void *ctx);
50
+ PUREFUNC(VALUE rb_vm_top_self(void));
51
+ void rb_vm_inc_const_missing_count(void);
52
+ const void **rb_vm_get_insns_address_table(void);
53
+ VALUE rb_source_location(int *pline);
54
+ const char *rb_source_location_cstr(int *pline);
55
+ MJIT_STATIC void rb_vm_pop_cfunc_frame(void);
56
+ int rb_vm_add_root_module(VALUE module);
57
+ void rb_vm_check_redefinition_by_prepend(VALUE klass);
58
+ int rb_vm_check_optimizable_mid(VALUE mid);
59
+ VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
60
+ MJIT_STATIC VALUE ruby_vm_special_exception_copy(VALUE);
61
+ PUREFUNC(st_table *rb_vm_fstring_table(void));
62
+
63
+ MJIT_SYMBOL_EXPORT_BEGIN
64
+ VALUE vm_exec(struct rb_execution_context_struct *, bool); /* used in JIT-ed code */
65
+ MJIT_SYMBOL_EXPORT_END
66
+
67
+ /* vm_eval.c */
68
+ VALUE rb_current_realfilepath(void);
69
+ VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
70
+ typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
71
+ VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
72
+ rb_check_funcall_hook *hook, VALUE arg);
73
+ VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *argv,
74
+ rb_check_funcall_hook *hook, VALUE arg, int kw_splat);
75
+ const char *rb_type_str(enum ruby_value_type type);
76
+ VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
77
+ VALUE rb_check_funcall_basic_kw(VALUE, ID, VALUE, int, const VALUE*, int);
78
+ VALUE rb_yield_1(VALUE val);
79
+ VALUE rb_yield_force_blockarg(VALUE values);
80
+ VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
81
+ rb_block_call_func_t bl_proc, int min_argc, int max_argc,
82
+ VALUE data2);
83
+
84
+ MJIT_SYMBOL_EXPORT_BEGIN
85
+ VALUE rb_vm_call0(struct rb_execution_context_struct *ec, VALUE recv, ID id, int argc, const VALUE *argv, const struct rb_callable_method_entry_struct *me, int kw_splat);
86
+ VALUE rb_vm_call_kw(struct rb_execution_context_struct *ec, VALUE recv, VALUE id, int argc, const VALUE *argv, const struct rb_callable_method_entry_struct *me, int kw_splat);
87
+ VALUE rb_make_no_method_exception(VALUE exc, VALUE format, VALUE obj, int argc, const VALUE *argv, int priv);
88
+ MJIT_SYMBOL_EXPORT_END
89
+
90
+ /* vm_insnhelper.c */
91
+ VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
92
+ VALUE rb_eql_opt(VALUE obj1, VALUE obj2);
93
+
94
+ struct rb_iseq_struct;
95
+ MJIT_SYMBOL_EXPORT_BEGIN
96
+ const struct rb_callcache *rb_vm_search_method_slowpath(const struct rb_callinfo *ci, VALUE klass);
97
+ MJIT_SYMBOL_EXPORT_END
98
+
99
+ /* vm_method.c */
100
+ struct rb_execution_context_struct;
101
+ MJIT_SYMBOL_EXPORT_BEGIN
102
+ int rb_ec_obj_respond_to(struct rb_execution_context_struct *ec, VALUE klass, VALUE obj, ID id, int priv);
103
+ MJIT_SYMBOL_EXPORT_END
104
+
105
+ /* vm_dump.c */
106
+ void rb_print_backtrace(void);
107
+
108
+ /* vm_backtrace.c */
109
+ VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
110
+ VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval);
111
+ VALUE rb_vm_backtrace(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
112
+ VALUE rb_vm_backtrace_locations(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
113
+ VALUE rb_make_backtrace(void);
114
+ void rb_backtrace_print_as_bugreport(void);
115
+ int rb_backtrace_p(VALUE obj);
116
+ VALUE rb_backtrace_to_str_ary(VALUE obj);
117
+ VALUE rb_backtrace_to_location_ary(VALUE obj);
118
+ void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output);
119
+
120
+ MJIT_SYMBOL_EXPORT_BEGIN
121
+ VALUE rb_ec_backtrace_object(const struct rb_execution_context_struct *ec);
122
+ void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self);
123
+ MJIT_SYMBOL_EXPORT_END
124
+
125
+ #define RUBY_DTRACE_CREATE_HOOK(name, arg) \
126
+ RUBY_DTRACE_HOOK(name##_CREATE, arg)
127
+ #define RUBY_DTRACE_HOOK(name, arg) \
128
+ do { \
129
+ if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { \
130
+ int dtrace_line; \
131
+ const char *dtrace_file = rb_source_location_cstr(&dtrace_line); \
132
+ if (!dtrace_file) dtrace_file = ""; \
133
+ RUBY_DTRACE_##name(arg, dtrace_file, dtrace_line); \
134
+ } \
135
+ } while (0)
136
+ #endif /* INTERNAL_VM_H */
@@ -0,0 +1,17 @@
1
+ #ifndef INTERNAL_WARNINGS_H /*-*-C-*-vi:se ft=c:*/
2
+ #define INTERNAL_WARNINGS_H
3
+ /**
4
+ * @file
5
+ * @author Ruby developers <ruby-core@ruby-lang.org>
6
+ * @copyright This file is a part of the programming language Ruby.
7
+ * Permission is hereby granted, to either redistribute and/or
8
+ * modify this file, provided that the conditions mentioned in the
9
+ * file COPYING are met. Consult the file for details.
10
+ * @brief Internal header to suppres / mandate warnings.
11
+ */
12
+ #include "ruby/internal/warning_push.h"
13
+ #define COMPILER_WARNING_PUSH RBIMPL_WARNING_PUSH()
14
+ #define COMPILER_WARNING_POP RBIMPL_WARNING_POP()
15
+ #define COMPILER_WARNING_ERROR(flag) RBIMPL_WARNING_ERROR(flag)
16
+ #define COMPILER_WARNING_IGNORED(flag) RBIMPL_WARNING_IGNORED(flag)
17
+ #endif /* INTERNAL_WARNINGS_H */
@@ -0,0 +1,107 @@
1
+ #ifndef RUBY_INTERNAL_H /*-*-C-*-vi:se ft=c:*/
2
+ #define RUBY_INTERNAL_H 1
3
+ /**
4
+ * @file
5
+ * @author $Author$
6
+ * @date Tue May 17 11:42:20 JST 2011
7
+ * @copyright Copyright (C) 2011 Yukihiro Matsumoto
8
+ * @copyright This file is a part of the programming language Ruby.
9
+ * Permission is hereby granted, to either redistribute and/or
10
+ * modify this file, provided that the conditions mentioned in the
11
+ * file COPYING are met. Consult the file for details.
12
+ */
13
+ #include "ruby/internal/config.h"
14
+
15
+ #ifdef __cplusplus
16
+ # error not for C++
17
+ #endif
18
+
19
+ #define LIKELY(x) RB_LIKELY(x)
20
+ #define UNLIKELY(x) RB_UNLIKELY(x)
21
+
22
+ #define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
23
+ #define roomof(x, y) (((x) + (y) - 1) / (y))
24
+ #define type_roomof(x, y) roomof(sizeof(x), sizeof(y))
25
+
26
+ /* Prevent compiler from reordering access */
27
+ #define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
28
+
29
+ #include "ruby/ruby.h"
30
+
31
+ /* Following macros were formerly defined in this header but moved to somewhere
32
+ * else. In order to detect them we undef here. */
33
+
34
+ /* internal/array.h */
35
+ #undef RARRAY_AREF
36
+
37
+ /* internal/class.h */
38
+ #undef RClass
39
+ #undef RCLASS_SUPER
40
+
41
+ /* internal/gc.h */
42
+ #undef NEWOBJ_OF
43
+ #undef RB_NEWOBJ_OF
44
+ #undef RB_OBJ_WRITE
45
+
46
+ /* internal/hash.h */
47
+ #undef RHASH_IFNONE
48
+ #undef RHASH_SIZE
49
+ #undef RHASH_TBL
50
+ #undef RHASH_EMPTY_P
51
+
52
+ /* internal/object.h */
53
+ #undef ROBJECT_IV_INDEX_TBL
54
+
55
+ /* internal/struct.h */
56
+ #undef RSTRUCT_LEN
57
+ #undef RSTRUCT_PTR
58
+ #undef RSTRUCT_SET
59
+ #undef RSTRUCT_GET
60
+
61
+ /* Also, we keep the following macros here. They are expected to be
62
+ * overridden in each headers. */
63
+
64
+ /* internal/array.h */
65
+ #define rb_ary_new_from_args(...) rb_nonexistent_symbol(__VA_ARGS__)
66
+
67
+ /* internal/io.h */
68
+ #define rb_io_fptr_finalize(...) rb_nonexistent_symbol(__VA_ARGS__)
69
+
70
+ /* internal/string.h */
71
+ #define rb_fstring_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
72
+
73
+ /* internal/symbol.h */
74
+ #define rb_sym_intern_ascii_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
75
+
76
+ /* internal/vm.h */
77
+ #define rb_funcallv(...) rb_nonexistent_symbol(__VA_ARGS__)
78
+ #define rb_method_basic_definition_p(...) rb_nonexistent_symbol(__VA_ARGS__)
79
+
80
+
81
+ /* MRI debug support */
82
+
83
+ /* gc.c */
84
+ void rb_obj_info_dump(VALUE obj);
85
+ void rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func);
86
+
87
+ /* debug.c */
88
+
89
+ RUBY_SYMBOL_EXPORT_BEGIN
90
+ void ruby_debug_breakpoint(void);
91
+ PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
92
+ RUBY_SYMBOL_EXPORT_END
93
+
94
+ // show obj data structure without any side-effect
95
+ #define rp(obj) rb_obj_info_dump_loc((VALUE)(obj), __FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING)
96
+
97
+ // same as rp, but add message header
98
+ #define rp_m(msg, obj) do { \
99
+ fprintf(stderr, "%s", (msg)); \
100
+ rb_obj_info_dump((VALUE)obj); \
101
+ } while (0)
102
+
103
+ // `ruby_debug_breakpoint()` does nothing,
104
+ // but breakpoint is set in run.gdb, so `make gdb` can stop here.
105
+ #define bp() ruby_debug_breakpoint()
106
+
107
+ #endif /* RUBY_INTERNAL_H */
@@ -0,0 +1,305 @@
1
+ #ifndef RUBY_ISEQ_H
2
+ #define RUBY_ISEQ_H 1
3
+ /**********************************************************************
4
+
5
+ iseq.h -
6
+
7
+ $Author$
8
+ created at: 04/01/01 23:36:57 JST
9
+
10
+ Copyright (C) 2004-2008 Koichi Sasada
11
+
12
+ **********************************************************************/
13
+ #include "internal/gc.h"
14
+ #include "vm_core.h"
15
+
16
+ RUBY_EXTERN const int ruby_api_version[];
17
+ #define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0])
18
+ #define ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1])
19
+
20
+ #ifndef rb_iseq_t
21
+ typedef struct rb_iseq_struct rb_iseq_t;
22
+ #define rb_iseq_t rb_iseq_t
23
+ #endif
24
+
25
+ extern const ID rb_iseq_shared_exc_local_tbl[];
26
+
27
+ #define ISEQ_COVERAGE(iseq) iseq->body->variable.coverage
28
+ #define ISEQ_COVERAGE_SET(iseq, cov) RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov)
29
+ #define ISEQ_LINE_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES)
30
+ #define ISEQ_BRANCH_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_BRANCHES)
31
+
32
+ #define ISEQ_PC2BRANCHINDEX(iseq) iseq->body->variable.pc2branchindex
33
+ #define ISEQ_PC2BRANCHINDEX_SET(iseq, h) RB_OBJ_WRITE(iseq, &iseq->body->variable.pc2branchindex, h)
34
+
35
+ #define ISEQ_FLIP_CNT(iseq) (iseq)->body->variable.flip_count
36
+
37
+ static inline rb_snum_t
38
+ ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t *iseq)
39
+ {
40
+ rb_snum_t cnt = iseq->body->variable.flip_count;
41
+ iseq->body->variable.flip_count += 1;
42
+ return cnt;
43
+ }
44
+
45
+ static inline VALUE *
46
+ ISEQ_ORIGINAL_ISEQ(const rb_iseq_t *iseq)
47
+ {
48
+ return iseq->body->variable.original_iseq;
49
+ }
50
+
51
+ static inline void
52
+ ISEQ_ORIGINAL_ISEQ_CLEAR(const rb_iseq_t *iseq)
53
+ {
54
+ void *ptr = iseq->body->variable.original_iseq;
55
+ iseq->body->variable.original_iseq = NULL;
56
+ if (ptr) {
57
+ ruby_xfree(ptr);
58
+ }
59
+ }
60
+
61
+ static inline VALUE *
62
+ ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
63
+ {
64
+ return iseq->body->variable.original_iseq =
65
+ ALLOC_N(VALUE, size);
66
+ }
67
+
68
+ #define ISEQ_TRACE_EVENTS (RUBY_EVENT_LINE | \
69
+ RUBY_EVENT_CLASS | \
70
+ RUBY_EVENT_END | \
71
+ RUBY_EVENT_CALL | \
72
+ RUBY_EVENT_RETURN| \
73
+ RUBY_EVENT_B_CALL| \
74
+ RUBY_EVENT_B_RETURN| \
75
+ RUBY_EVENT_COVERAGE_LINE| \
76
+ RUBY_EVENT_COVERAGE_BRANCH)
77
+
78
+ #define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1
79
+ #define ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2
80
+ #define ISEQ_TRANSLATED IMEMO_FL_USER3
81
+ #define ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4
82
+
83
+ #define ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW(((VALUE)iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)
84
+
85
+ struct iseq_compile_data {
86
+ /* GC is needed */
87
+ const VALUE err_info;
88
+ const VALUE catch_table_ary; /* Array */
89
+
90
+ /* GC is not needed */
91
+ struct iseq_label_data *start_label;
92
+ struct iseq_label_data *end_label;
93
+ struct iseq_label_data *redo_label;
94
+ const rb_iseq_t *current_block;
95
+ struct iseq_compile_data_ensure_node_stack *ensure_node_stack;
96
+ struct {
97
+ struct iseq_compile_data_storage *storage_head;
98
+ struct iseq_compile_data_storage *storage_current;
99
+ } node;
100
+ struct {
101
+ struct iseq_compile_data_storage *storage_head;
102
+ struct iseq_compile_data_storage *storage_current;
103
+ } insn;
104
+ int loopval_popped; /* used by NODE_BREAK */
105
+ int last_line;
106
+ int label_no;
107
+ int node_level;
108
+ int isolated_depth;
109
+ unsigned int ci_index;
110
+ const rb_compile_option_t *option;
111
+ struct rb_id_table *ivar_cache_table;
112
+ const struct rb_builtin_function *builtin_function_table;
113
+ #if OPT_SUPPORT_JOKE
114
+ st_table *labels_table;
115
+ #endif
116
+ };
117
+
118
+ static inline struct iseq_compile_data *
119
+ ISEQ_COMPILE_DATA(const rb_iseq_t *iseq)
120
+ {
121
+ if (iseq->flags & ISEQ_USE_COMPILE_DATA) {
122
+ return iseq->aux.compile_data;
123
+ }
124
+ else {
125
+ return NULL;
126
+ }
127
+ }
128
+
129
+ static inline void
130
+ ISEQ_COMPILE_DATA_ALLOC(rb_iseq_t *iseq)
131
+ {
132
+ iseq->aux.compile_data = ZALLOC(struct iseq_compile_data);
133
+ iseq->flags |= ISEQ_USE_COMPILE_DATA;
134
+ }
135
+
136
+ static inline void
137
+ ISEQ_COMPILE_DATA_CLEAR(rb_iseq_t *iseq)
138
+ {
139
+ iseq->flags &= ~ISEQ_USE_COMPILE_DATA;
140
+ iseq->aux.compile_data = NULL;
141
+ }
142
+
143
+ static inline rb_iseq_t *
144
+ iseq_imemo_alloc(void)
145
+ {
146
+ return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
147
+ }
148
+
149
+ VALUE rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt);
150
+ void rb_ibf_load_iseq_complete(rb_iseq_t *iseq);
151
+ const rb_iseq_t *rb_iseq_ibf_load(VALUE str);
152
+ const rb_iseq_t *rb_iseq_ibf_load_bytes(const char *cstr, size_t);
153
+ VALUE rb_iseq_ibf_load_extra_data(VALUE str);
154
+ void rb_iseq_init_trace(rb_iseq_t *iseq);
155
+ int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line);
156
+ int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval);
157
+ const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
158
+
159
+ #if VM_INSN_INFO_TABLE_IMPL == 2
160
+ unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
161
+ #endif
162
+
163
+ RUBY_SYMBOL_EXPORT_BEGIN
164
+
165
+ /* compile.c */
166
+ VALUE rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node);
167
+ VALUE rb_iseq_compile_callback(rb_iseq_t *iseq, const struct rb_iseq_new_with_callback_callback_func * ifunc);
168
+ VALUE *rb_iseq_original_iseq(const rb_iseq_t *iseq);
169
+ void rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc,
170
+ VALUE locals, VALUE args,
171
+ VALUE exception, VALUE body);
172
+ void rb_iseq_mark_insn_storage(struct iseq_compile_data_storage *arena);
173
+
174
+ /* iseq.c */
175
+ VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
176
+ VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
177
+ unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos);
178
+ void rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events);
179
+ void rb_iseq_trace_set_all(rb_event_flag_t turnon_events);
180
+ void rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq);
181
+
182
+ struct rb_iseq_constant_body *rb_iseq_constant_body_alloc(void);
183
+ VALUE rb_iseqw_new(const rb_iseq_t *iseq);
184
+ const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
185
+
186
+ VALUE rb_iseq_absolute_path(const rb_iseq_t *iseq); /* obsolete */
187
+ VALUE rb_iseq_label(const rb_iseq_t *iseq);
188
+ VALUE rb_iseq_base_label(const rb_iseq_t *iseq);
189
+ VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq);
190
+ VALUE rb_iseq_method_name(const rb_iseq_t *iseq);
191
+ void rb_iseq_code_location(const rb_iseq_t *iseq, int *first_lineno, int *first_column, int *last_lineno, int *last_column);
192
+
193
+ void rb_iseq_remove_coverage_all(void);
194
+
195
+ /* proc.c */
196
+ const rb_iseq_t *rb_method_iseq(VALUE body);
197
+ const rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc);
198
+
199
+ struct rb_compile_option_struct {
200
+ unsigned int inline_const_cache: 1;
201
+ unsigned int peephole_optimization: 1;
202
+ unsigned int tailcall_optimization: 1;
203
+ unsigned int specialized_instruction: 1;
204
+ unsigned int operands_unification: 1;
205
+ unsigned int instructions_unification: 1;
206
+ unsigned int stack_caching: 1;
207
+ unsigned int frozen_string_literal: 1;
208
+ unsigned int debug_frozen_string_literal: 1;
209
+ unsigned int coverage_enabled: 1;
210
+ int debug_level;
211
+ };
212
+
213
+ struct iseq_insn_info_entry {
214
+ int line_no;
215
+ rb_event_flag_t events;
216
+ };
217
+
218
+ struct iseq_catch_table_entry {
219
+ enum catch_type {
220
+ CATCH_TYPE_RESCUE = INT2FIX(1),
221
+ CATCH_TYPE_ENSURE = INT2FIX(2),
222
+ CATCH_TYPE_RETRY = INT2FIX(3),
223
+ CATCH_TYPE_BREAK = INT2FIX(4),
224
+ CATCH_TYPE_REDO = INT2FIX(5),
225
+ CATCH_TYPE_NEXT = INT2FIX(6)
226
+ } type;
227
+
228
+ /*
229
+ * iseq type:
230
+ * CATCH_TYPE_RESCUE, CATCH_TYPE_ENSURE:
231
+ * use iseq as continuation.
232
+ *
233
+ * CATCH_TYPE_BREAK (iter):
234
+ * use iseq as key.
235
+ *
236
+ * CATCH_TYPE_BREAK (while), CATCH_TYPE_RETRY,
237
+ * CATCH_TYPE_REDO, CATCH_TYPE_NEXT:
238
+ * NULL.
239
+ */
240
+ rb_iseq_t *iseq;
241
+
242
+ unsigned int start;
243
+ unsigned int end;
244
+ unsigned int cont;
245
+ unsigned int sp;
246
+ };
247
+
248
+ PACKED_STRUCT_UNALIGNED(struct iseq_catch_table {
249
+ unsigned int size;
250
+ struct iseq_catch_table_entry entries[FLEX_ARY_LEN];
251
+ });
252
+
253
+ static inline int
254
+ iseq_catch_table_bytes(int n)
255
+ {
256
+ enum {
257
+ catch_table_entry_size = sizeof(struct iseq_catch_table_entry),
258
+ catch_table_entries_max = (INT_MAX - offsetof(struct iseq_catch_table, entries)) / catch_table_entry_size
259
+ };
260
+ if (n > catch_table_entries_max) rb_fatal("too large iseq_catch_table - %d", n);
261
+ return (int)(offsetof(struct iseq_catch_table, entries) +
262
+ n * catch_table_entry_size);
263
+ }
264
+
265
+ #define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)
266
+
267
+ struct iseq_compile_data_storage {
268
+ struct iseq_compile_data_storage *next;
269
+ unsigned int pos;
270
+ unsigned int size;
271
+ char buff[FLEX_ARY_LEN];
272
+ };
273
+
274
+ /* defined? */
275
+
276
+ enum defined_type {
277
+ DEFINED_NOT_DEFINED,
278
+ DEFINED_NIL = 1,
279
+ DEFINED_IVAR,
280
+ DEFINED_LVAR,
281
+ DEFINED_GVAR,
282
+ DEFINED_CVAR,
283
+ DEFINED_CONST,
284
+ DEFINED_METHOD,
285
+ DEFINED_YIELD,
286
+ DEFINED_ZSUPER,
287
+ DEFINED_SELF,
288
+ DEFINED_TRUE,
289
+ DEFINED_FALSE,
290
+ DEFINED_ASGN,
291
+ DEFINED_EXPR,
292
+ DEFINED_IVAR2,
293
+ DEFINED_REF,
294
+ DEFINED_FUNC,
295
+ DEFINED_CONST_FROM
296
+ };
297
+
298
+ VALUE rb_iseq_defined_string(enum defined_type type);
299
+
300
+ /* vm.c */
301
+ VALUE rb_iseq_local_variables(const rb_iseq_t *iseq);
302
+
303
+ RUBY_SYMBOL_EXPORT_END
304
+
305
+ #endif /* RUBY_ISEQ_H */