ace-debugger-ruby_core_source 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. data/CHANGELOG.md +26 -0
  2. data/LEGAL +534 -0
  3. data/LICENSE.txt +22 -0
  4. data/OLD_README +29 -0
  5. data/README.md +31 -0
  6. data/RUBY_LICENSE +56 -0
  7. data/Rakefile +33 -0
  8. data/ace-debugger-ruby_core_source.gemspec +18 -0
  9. data/lib/debugger/ruby_core_source.rb +62 -0
  10. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/debug.h +36 -0
  11. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/dln.h +41 -0
  12. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/encdb.h +163 -0
  13. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/eval_intern.h +232 -0
  14. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/gc.h +77 -0
  15. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/id.h +170 -0
  16. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/insns.inc +179 -0
  17. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/insns_info.inc +695 -0
  18. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/iseq.h +104 -0
  19. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/known_errors.inc +731 -0
  20. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/method.h +103 -0
  21. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/node.h +483 -0
  22. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/node_name.inc +208 -0
  23. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/opt_sc.inc +670 -0
  24. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/optinsn.inc +30 -0
  25. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/optunifs.inc +116 -0
  26. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/parse.h +187 -0
  27. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/regenc.h +211 -0
  28. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/regint.h +841 -0
  29. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/regparse.h +354 -0
  30. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/revision.h +1 -0
  31. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/thread_pthread.h +27 -0
  32. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/thread_win32.h +33 -0
  33. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/timev.h +21 -0
  34. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/transcode_data.h +109 -0
  35. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/transdb.h +179 -0
  36. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/version.h +55 -0
  37. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/vm.inc +3055 -0
  38. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/vm_core.h +707 -0
  39. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/vm_exec.h +184 -0
  40. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/vm_insnhelper.h +208 -0
  41. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/vm_opts.h +51 -0
  42. data/lib/debugger/ruby_core_source/ruby-1.9.2-p290/vmtc.inc +97 -0
  43. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/debug.h +36 -0
  44. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/dln.h +41 -0
  45. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/encdb.h +163 -0
  46. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/eval_intern.h +232 -0
  47. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/gc.h +77 -0
  48. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/id.h +170 -0
  49. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/insns.inc +179 -0
  50. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/insns_info.inc +695 -0
  51. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/iseq.h +104 -0
  52. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/known_errors.inc +731 -0
  53. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/method.h +103 -0
  54. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/node.h +483 -0
  55. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/node_name.inc +208 -0
  56. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/opt_sc.inc +670 -0
  57. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/optinsn.inc +30 -0
  58. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/optunifs.inc +116 -0
  59. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/parse.h +186 -0
  60. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/regenc.h +211 -0
  61. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/regint.h +841 -0
  62. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/regparse.h +354 -0
  63. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/revision.h +1 -0
  64. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/thread_pthread.h +27 -0
  65. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/thread_win32.h +33 -0
  66. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/timev.h +21 -0
  67. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/transcode_data.h +109 -0
  68. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/transdb.h +179 -0
  69. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/version.h +55 -0
  70. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/vm.inc +3055 -0
  71. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/vm_core.h +706 -0
  72. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/vm_exec.h +184 -0
  73. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/vm_insnhelper.h +208 -0
  74. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/vm_opts.h +51 -0
  75. data/lib/debugger/ruby_core_source/ruby-1.9.2-p318/vmtc.inc +97 -0
  76. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/debug.h +36 -0
  77. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/dln.h +41 -0
  78. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/encdb.h +163 -0
  79. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/eval_intern.h +232 -0
  80. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/gc.h +77 -0
  81. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/id.h +170 -0
  82. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/insns.inc +179 -0
  83. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/insns_info.inc +695 -0
  84. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/iseq.h +104 -0
  85. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/known_errors.inc +731 -0
  86. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/method.h +103 -0
  87. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/node.h +483 -0
  88. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/node_name.inc +208 -0
  89. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/opt_sc.inc +670 -0
  90. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/optinsn.inc +30 -0
  91. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/optunifs.inc +116 -0
  92. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/parse.h +186 -0
  93. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/regenc.h +211 -0
  94. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/regint.h +841 -0
  95. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/regparse.h +354 -0
  96. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/revision.h +1 -0
  97. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/thread_pthread.h +27 -0
  98. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/thread_win32.h +33 -0
  99. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/timev.h +21 -0
  100. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/transcode_data.h +109 -0
  101. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/transdb.h +179 -0
  102. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/version.h +55 -0
  103. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/vm.inc +3055 -0
  104. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/vm_core.h +706 -0
  105. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/vm_exec.h +184 -0
  106. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/vm_insnhelper.h +208 -0
  107. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/vm_opts.h +51 -0
  108. data/lib/debugger/ruby_core_source/ruby-1.9.2-p320/vmtc.inc +97 -0
  109. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/addr2line.h +21 -0
  110. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/atomic.h +56 -0
  111. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/constant.h +34 -0
  112. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/debug.h +41 -0
  113. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/dln.h +50 -0
  114. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/encdb.h +167 -0
  115. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/eval_intern.h +234 -0
  116. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/gc.h +98 -0
  117. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/id.h +175 -0
  118. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/insns.inc +179 -0
  119. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/insns_info.inc +695 -0
  120. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/internal.h +227 -0
  121. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/iseq.h +125 -0
  122. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/known_errors.inc +731 -0
  123. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/method.h +105 -0
  124. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/node.h +503 -0
  125. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/node_name.inc +208 -0
  126. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/opt_sc.inc +670 -0
  127. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/optinsn.inc +30 -0
  128. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/optunifs.inc +116 -0
  129. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/parse.h +186 -0
  130. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/regenc.h +219 -0
  131. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/regint.h +851 -0
  132. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/regparse.h +362 -0
  133. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/revision.h +1 -0
  134. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/thread_pthread.h +51 -0
  135. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/thread_win32.h +40 -0
  136. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/timev.h +21 -0
  137. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/transcode_data.h +117 -0
  138. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/transdb.h +189 -0
  139. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/version.h +52 -0
  140. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/vm.inc +3067 -0
  141. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/vm_core.h +756 -0
  142. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/vm_exec.h +184 -0
  143. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/vm_insnhelper.h +220 -0
  144. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/vm_opts.h +51 -0
  145. data/lib/debugger/ruby_core_source/ruby-1.9.3-p0/vmtc.inc +97 -0
  146. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/addr2line.h +21 -0
  147. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/atomic.h +56 -0
  148. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/constant.h +34 -0
  149. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/debug.h +41 -0
  150. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/dln.h +50 -0
  151. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/encdb.h +167 -0
  152. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/eval_intern.h +234 -0
  153. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/gc.h +98 -0
  154. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/id.h +175 -0
  155. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/insns.inc +179 -0
  156. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/insns_info.inc +695 -0
  157. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/internal.h +231 -0
  158. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/iseq.h +125 -0
  159. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/known_errors.inc +731 -0
  160. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/method.h +105 -0
  161. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/node.h +503 -0
  162. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/node_name.inc +208 -0
  163. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/opt_sc.inc +670 -0
  164. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/optinsn.inc +30 -0
  165. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/optunifs.inc +116 -0
  166. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/parse.h +186 -0
  167. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/regenc.h +219 -0
  168. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/regint.h +850 -0
  169. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/regparse.h +362 -0
  170. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/revision.h +1 -0
  171. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/thread_pthread.h +51 -0
  172. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/thread_win32.h +40 -0
  173. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/timev.h +21 -0
  174. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/transcode_data.h +117 -0
  175. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/transdb.h +189 -0
  176. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/version.h +52 -0
  177. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/vm.inc +3067 -0
  178. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/vm_core.h +756 -0
  179. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/vm_exec.h +184 -0
  180. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/vm_insnhelper.h +220 -0
  181. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/vm_opts.h +51 -0
  182. data/lib/debugger/ruby_core_source/ruby-1.9.3-p125/vmtc.inc +97 -0
  183. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/addr2line.h +21 -0
  184. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/atomic.h +56 -0
  185. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/constant.h +34 -0
  186. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/debug.h +41 -0
  187. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/dln.h +50 -0
  188. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/encdb.h +167 -0
  189. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/eval_intern.h +234 -0
  190. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/gc.h +98 -0
  191. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/id.h +175 -0
  192. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/insns.inc +179 -0
  193. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/insns_info.inc +695 -0
  194. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/internal.h +232 -0
  195. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/iseq.h +125 -0
  196. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/known_errors.inc +731 -0
  197. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/method.h +105 -0
  198. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/node.h +503 -0
  199. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/node_name.inc +208 -0
  200. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/opt_sc.inc +670 -0
  201. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/optinsn.inc +30 -0
  202. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/optunifs.inc +116 -0
  203. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/parse.h +186 -0
  204. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/regenc.h +219 -0
  205. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/regint.h +850 -0
  206. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/regparse.h +362 -0
  207. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/revision.h +1 -0
  208. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/thread_pthread.h +51 -0
  209. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/thread_win32.h +40 -0
  210. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/timev.h +21 -0
  211. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/transcode_data.h +117 -0
  212. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/transdb.h +189 -0
  213. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/version.h +52 -0
  214. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/vm.inc +3051 -0
  215. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/vm_core.h +756 -0
  216. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/vm_exec.h +184 -0
  217. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/vm_insnhelper.h +220 -0
  218. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/vm_opts.h +51 -0
  219. data/lib/debugger/ruby_core_source/ruby-1.9.3-p194/vmtc.inc +97 -0
  220. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/addr2line.h +21 -0
  221. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/atomic.h +56 -0
  222. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/constant.h +34 -0
  223. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/debug.h +41 -0
  224. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/dln.h +50 -0
  225. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/encdb.h +167 -0
  226. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/eval_intern.h +234 -0
  227. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/gc.h +99 -0
  228. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/id.h +175 -0
  229. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/insns.inc +179 -0
  230. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/insns_info.inc +695 -0
  231. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/internal.h +232 -0
  232. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/iseq.h +125 -0
  233. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/known_errors.inc +731 -0
  234. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/method.h +105 -0
  235. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/node.h +503 -0
  236. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/node_name.inc +208 -0
  237. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/opt_sc.inc +670 -0
  238. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/optinsn.inc +30 -0
  239. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/optunifs.inc +116 -0
  240. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/parse.h +302 -0
  241. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/regenc.h +219 -0
  242. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/regint.h +850 -0
  243. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/regparse.h +362 -0
  244. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/revision.h +1 -0
  245. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/thread_pthread.h +51 -0
  246. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/thread_win32.h +40 -0
  247. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/timev.h +21 -0
  248. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/transcode_data.h +117 -0
  249. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/transdb.h +189 -0
  250. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/version.h +52 -0
  251. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/vm.inc +3054 -0
  252. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/vm_core.h +756 -0
  253. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/vm_exec.h +184 -0
  254. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/vm_insnhelper.h +220 -0
  255. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/vm_opts.h +51 -0
  256. data/lib/debugger/ruby_core_source/ruby-1.9.3-p286/vmtc.inc +97 -0
  257. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/addr2line.h +21 -0
  258. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/atomic.h +56 -0
  259. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/constant.h +34 -0
  260. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/debug.h +41 -0
  261. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/dln.h +50 -0
  262. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/encdb.h +167 -0
  263. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/eval_intern.h +234 -0
  264. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/gc.h +99 -0
  265. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/id.h +175 -0
  266. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/insns.inc +179 -0
  267. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/insns_info.inc +695 -0
  268. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/internal.h +239 -0
  269. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/iseq.h +125 -0
  270. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/known_errors.inc +731 -0
  271. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/method.h +105 -0
  272. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/node.h +503 -0
  273. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/node_name.inc +208 -0
  274. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/opt_sc.inc +670 -0
  275. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/optinsn.inc +30 -0
  276. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/optunifs.inc +116 -0
  277. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/parse.h +302 -0
  278. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/regenc.h +219 -0
  279. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/regint.h +850 -0
  280. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/regparse.h +362 -0
  281. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/revision.h +1 -0
  282. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/siphash.h +48 -0
  283. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/thread_pthread.h +51 -0
  284. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/thread_win32.h +40 -0
  285. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/timev.h +21 -0
  286. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/transcode_data.h +117 -0
  287. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/transdb.h +189 -0
  288. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/version.h +52 -0
  289. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/vm.inc +3054 -0
  290. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/vm_core.h +756 -0
  291. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/vm_exec.h +184 -0
  292. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/vm_insnhelper.h +220 -0
  293. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/vm_opts.h +51 -0
  294. data/lib/debugger/ruby_core_source/ruby-1.9.3-p327/vmtc.inc +97 -0
  295. data/lib/debugger/ruby_core_source/version.rb +5 -0
  296. metadata +373 -0
@@ -0,0 +1,706 @@
1
+ /**********************************************************************
2
+
3
+ vm_core.h -
4
+
5
+ $Author: yugui $
6
+ created at: 04/01/01 19:41:38 JST
7
+
8
+ Copyright (C) 2004-2007 Koichi Sasada
9
+
10
+ **********************************************************************/
11
+
12
+ #ifndef RUBY_VM_CORE_H
13
+ #define RUBY_VM_CORE_H
14
+
15
+ #define RUBY_VM_THREAD_MODEL 2
16
+
17
+ #include "ruby/ruby.h"
18
+ #include "ruby/st.h"
19
+
20
+ #include "node.h"
21
+ #include "debug.h"
22
+ #include "vm_opts.h"
23
+ #include "id.h"
24
+ #include "method.h"
25
+
26
+ #if defined(_WIN32)
27
+ #include "thread_win32.h"
28
+ #elif defined(HAVE_PTHREAD_H)
29
+ #include "thread_pthread.h"
30
+ #else
31
+ #error "unsupported thread type"
32
+ #endif
33
+
34
+ #ifndef ENABLE_VM_OBJSPACE
35
+ #ifdef _WIN32
36
+ /*
37
+ * TODO: object space indenpendent st_table.
38
+ * socklist needs st_table in rb_w32_sysinit(), before object space
39
+ * initialization.
40
+ * It is too early now to change st_hash_type, since it breaks binary
41
+ * compatibility.
42
+ */
43
+ #define ENABLE_VM_OBJSPACE 0
44
+ #else
45
+ #define ENABLE_VM_OBJSPACE 1
46
+ #endif
47
+ #endif
48
+
49
+ #include <setjmp.h>
50
+ #include <signal.h>
51
+
52
+ #ifndef NSIG
53
+ # define NSIG (_SIGMAX + 1) /* For QNX */
54
+ #endif
55
+
56
+ #define RUBY_NSIG NSIG
57
+
58
+ #ifdef HAVE_STDARG_PROTOTYPES
59
+ #include <stdarg.h>
60
+ #define va_init_list(a,b) va_start(a,b)
61
+ #else
62
+ #include <varargs.h>
63
+ #define va_init_list(a,b) va_start(a)
64
+ #endif
65
+
66
+ #if defined(SIGSEGV) && defined(HAVE_SIGALTSTACK) && defined(SA_SIGINFO) && !defined(__NetBSD__)
67
+ #define USE_SIGALTSTACK
68
+ #endif
69
+
70
+ /*****************/
71
+ /* configuration */
72
+ /*****************/
73
+
74
+ /* gcc ver. check */
75
+ #if defined(__GNUC__) && __GNUC__ >= 2
76
+
77
+ #if OPT_TOKEN_THREADED_CODE
78
+ #if OPT_DIRECT_THREADED_CODE
79
+ #undef OPT_DIRECT_THREADED_CODE
80
+ #endif
81
+ #endif
82
+
83
+ #else /* defined(__GNUC__) && __GNUC__ >= 2 */
84
+
85
+ /* disable threaded code options */
86
+ #if OPT_DIRECT_THREADED_CODE
87
+ #undef OPT_DIRECT_THREADED_CODE
88
+ #endif
89
+ #if OPT_TOKEN_THREADED_CODE
90
+ #undef OPT_TOKEN_THREADED_CODE
91
+ #endif
92
+ #endif
93
+
94
+ /* call threaded code */
95
+ #if OPT_CALL_THREADED_CODE
96
+ #if OPT_DIRECT_THREADED_CODE
97
+ #undef OPT_DIRECT_THREADED_CODE
98
+ #endif /* OPT_DIRECT_THREADED_CODE */
99
+ #if OPT_STACK_CACHING
100
+ #undef OPT_STACK_CACHING
101
+ #endif /* OPT_STACK_CACHING */
102
+ #endif /* OPT_CALL_THREADED_CODE */
103
+
104
+ /* likely */
105
+ #if __GNUC__ >= 3
106
+ #define LIKELY(x) (__builtin_expect((x), 1))
107
+ #define UNLIKELY(x) (__builtin_expect((x), 0))
108
+ #else /* __GNUC__ >= 3 */
109
+ #define LIKELY(x) (x)
110
+ #define UNLIKELY(x) (x)
111
+ #endif /* __GNUC__ >= 3 */
112
+
113
+ #if __GNUC__ >= 3
114
+ #define UNINITIALIZED_VAR(x) x = x
115
+ #else
116
+ #define UNINITIALIZED_VAR(x) x
117
+ #endif
118
+
119
+ typedef unsigned long rb_num_t;
120
+
121
+ /* iseq data type */
122
+
123
+ struct iseq_compile_data_ensure_node_stack;
124
+
125
+ typedef struct rb_compile_option_struct {
126
+ int inline_const_cache;
127
+ int peephole_optimization;
128
+ int tailcall_optimization;
129
+ int specialized_instruction;
130
+ int operands_unification;
131
+ int instructions_unification;
132
+ int stack_caching;
133
+ int trace_instruction;
134
+ int debug_level;
135
+ } rb_compile_option_t;
136
+
137
+ struct iseq_inline_cache_entry {
138
+ VALUE ic_vmstat;
139
+ VALUE ic_class;
140
+ union {
141
+ VALUE value;
142
+ rb_method_entry_t *method;
143
+ long index;
144
+ } ic_value;
145
+ };
146
+
147
+ #if 1
148
+ #define GetCoreDataFromValue(obj, type, ptr) do { \
149
+ ptr = (type*)DATA_PTR(obj); \
150
+ } while (0)
151
+ #else
152
+ #define GetCoreDataFromValue(obj, type, ptr) Data_Get_Struct(obj, type, ptr)
153
+ #endif
154
+
155
+ #define GetISeqPtr(obj, ptr) \
156
+ GetCoreDataFromValue(obj, rb_iseq_t, ptr)
157
+
158
+ struct rb_iseq_struct;
159
+
160
+ struct rb_iseq_struct {
161
+ /***************/
162
+ /* static data */
163
+ /***************/
164
+
165
+ VALUE type; /* instruction sequence type */
166
+ VALUE name; /* String: iseq name */
167
+ VALUE filename; /* file information where this sequence from */
168
+ VALUE filepath; /* real file path or nil */
169
+ VALUE *iseq; /* iseq (insn number and openrads) */
170
+ VALUE *iseq_encoded; /* encoded iseq */
171
+ unsigned long iseq_size;
172
+ VALUE mark_ary; /* Array: includes operands which should be GC marked */
173
+ VALUE coverage; /* coverage array */
174
+ unsigned short line_no;
175
+
176
+ /* insn info, must be freed */
177
+ struct iseq_insn_info_entry *insn_info_table;
178
+ size_t insn_info_size;
179
+
180
+ ID *local_table; /* must free */
181
+ int local_table_size;
182
+
183
+ /* method, class frame: sizeof(vars) + 1, block frame: sizeof(vars) */
184
+ int local_size;
185
+
186
+ struct iseq_inline_cache_entry *ic_entries;
187
+ int ic_size;
188
+
189
+ /**
190
+ * argument information
191
+ *
192
+ * def m(a1, a2, ..., aM, # mandatory
193
+ * b1=(...), b2=(...), ..., bN=(...), # optinal
194
+ * *c, # rest
195
+ * d1, d2, ..., dO, # post
196
+ * &e) # block
197
+ * =>
198
+ *
199
+ * argc = M
200
+ * arg_rest = M+N+1 // or -1 if no rest arg
201
+ * arg_opts = N
202
+ * arg_opts_tbl = [ (N entries) ]
203
+ * arg_post_len = O // 0 if no post arguments
204
+ * arg_post_start = M+N+2
205
+ * arg_block = M+N + 1 + O + 1 // -1 if no block arg
206
+ * arg_simple = 0 if not simple arguments.
207
+ * = 1 if no opt, rest, post, block.
208
+ * = 2 if ambiguos block parameter ({|a|}).
209
+ * arg_size = argument size.
210
+ */
211
+
212
+ int argc;
213
+ int arg_simple;
214
+ int arg_rest;
215
+ int arg_block;
216
+ int arg_opts;
217
+ int arg_post_len;
218
+ int arg_post_start;
219
+ int arg_size;
220
+ VALUE *arg_opt_table;
221
+
222
+ size_t stack_max; /* for stack overflow check */
223
+
224
+ /* catch table */
225
+ struct iseq_catch_table_entry *catch_table;
226
+ int catch_table_size;
227
+
228
+ /* for child iseq */
229
+ struct rb_iseq_struct *parent_iseq;
230
+ struct rb_iseq_struct *local_iseq;
231
+
232
+ /****************/
233
+ /* dynamic data */
234
+ /****************/
235
+
236
+ VALUE self;
237
+ VALUE orig; /* non-NULL if its data have origin */
238
+
239
+ /* block inlining */
240
+ /*
241
+ * NODE *node;
242
+ * void *special_block_builder;
243
+ * void *cached_special_block_builder;
244
+ * VALUE cached_special_block;
245
+ */
246
+
247
+ /* klass/module nest information stack (cref) */
248
+ NODE *cref_stack;
249
+ VALUE klass;
250
+
251
+ /* misc */
252
+ ID defined_method_id; /* for define_method */
253
+
254
+ /* used at compile time */
255
+ struct iseq_compile_data *compile_data;
256
+ };
257
+
258
+ enum ruby_special_exceptions {
259
+ ruby_error_reenter,
260
+ ruby_error_nomemory,
261
+ ruby_error_sysstack,
262
+ ruby_special_error_count
263
+ };
264
+
265
+ #define GetVMPtr(obj, ptr) \
266
+ GetCoreDataFromValue(obj, rb_vm_t, ptr)
267
+
268
+ #if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
269
+ struct rb_objspace;
270
+ void rb_objspace_free(struct rb_objspace *);
271
+ #endif
272
+
273
+ typedef struct rb_vm_struct {
274
+ VALUE self;
275
+
276
+ rb_thread_lock_t global_vm_lock;
277
+
278
+ struct rb_thread_struct *main_thread;
279
+ struct rb_thread_struct *running_thread;
280
+
281
+ st_table *living_threads;
282
+ VALUE thgroup_default;
283
+
284
+ int running;
285
+ int thread_abort_on_exception;
286
+ unsigned long trace_flag;
287
+ volatile int sleeper;
288
+
289
+ /* object management */
290
+ VALUE mark_object_ary;
291
+
292
+ VALUE special_exceptions[ruby_special_error_count];
293
+
294
+ /* load */
295
+ VALUE top_self;
296
+ VALUE load_path;
297
+ VALUE loaded_features;
298
+ struct st_table *loading_table;
299
+
300
+ /* signal */
301
+ struct {
302
+ VALUE cmd;
303
+ int safe;
304
+ } trap_list[RUBY_NSIG];
305
+
306
+ /* hook */
307
+ rb_event_hook_t *event_hooks;
308
+
309
+ int src_encoding_index;
310
+
311
+ VALUE verbose, debug, progname;
312
+ VALUE coverages;
313
+
314
+ struct unlinked_method_entry_list_entry *unlinked_method_entry_list;
315
+
316
+ #if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
317
+ struct rb_objspace *objspace;
318
+ #endif
319
+ } rb_vm_t;
320
+
321
+ typedef struct {
322
+ VALUE *pc; /* cfp[0] */
323
+ VALUE *sp; /* cfp[1] */
324
+ VALUE *bp; /* cfp[2] */
325
+ rb_iseq_t *iseq; /* cfp[3] */
326
+ VALUE flag; /* cfp[4] */
327
+ VALUE self; /* cfp[5] / block[0] */
328
+ VALUE *lfp; /* cfp[6] / block[1] */
329
+ VALUE *dfp; /* cfp[7] / block[2] */
330
+ rb_iseq_t *block_iseq; /* cfp[8] / block[3] */
331
+ VALUE proc; /* cfp[9] / block[4] */
332
+ const rb_method_entry_t *me;/* cfp[10] */
333
+ } rb_control_frame_t;
334
+
335
+ typedef struct rb_block_struct {
336
+ VALUE self; /* share with method frame if it's only block */
337
+ VALUE *lfp; /* share with method frame if it's only block */
338
+ VALUE *dfp; /* share with method frame if it's only block */
339
+ rb_iseq_t *iseq;
340
+ VALUE proc;
341
+ } rb_block_t;
342
+
343
+ #define GetThreadPtr(obj, ptr) \
344
+ GetCoreDataFromValue(obj, rb_thread_t, ptr)
345
+
346
+ enum rb_thread_status {
347
+ THREAD_TO_KILL,
348
+ THREAD_RUNNABLE,
349
+ THREAD_STOPPED,
350
+ THREAD_STOPPED_FOREVER,
351
+ THREAD_KILLED
352
+ };
353
+
354
+ typedef RUBY_JMP_BUF rb_jmpbuf_t;
355
+
356
+ struct rb_vm_tag {
357
+ rb_jmpbuf_t buf;
358
+ VALUE tag;
359
+ VALUE retval;
360
+ struct rb_vm_tag *prev;
361
+ };
362
+
363
+ struct rb_vm_protect_tag {
364
+ struct rb_vm_protect_tag *prev;
365
+ };
366
+
367
+ #define RUBY_VM_VALUE_CACHE_SIZE 0x1000
368
+ #define USE_VALUE_CACHE 0
369
+
370
+ struct rb_unblock_callback {
371
+ rb_unblock_function_t *func;
372
+ void *arg;
373
+ };
374
+
375
+ struct rb_mutex_struct;
376
+
377
+ typedef struct rb_thread_struct
378
+ {
379
+ VALUE self;
380
+ rb_vm_t *vm;
381
+
382
+ /* execution information */
383
+ VALUE *stack; /* must free, must mark */
384
+ unsigned long stack_size;
385
+ rb_control_frame_t *cfp;
386
+ int safe_level;
387
+ int raised_flag;
388
+ VALUE last_status; /* $? */
389
+
390
+ /* passing state */
391
+ int state;
392
+
393
+ /* for rb_iterate */
394
+ const rb_block_t *passed_block;
395
+
396
+ /* for bmethod */
397
+ const rb_method_entry_t *passed_me;
398
+
399
+ /* for load(true) */
400
+ VALUE top_self;
401
+ VALUE top_wrapper;
402
+
403
+ /* eval env */
404
+ rb_block_t *base_block;
405
+
406
+ VALUE *local_lfp;
407
+ VALUE local_svar;
408
+
409
+ /* thread control */
410
+ rb_thread_id_t thread_id;
411
+ enum rb_thread_status status;
412
+ int priority;
413
+ int slice;
414
+
415
+ native_thread_data_t native_thread_data;
416
+ void *blocking_region_buffer;
417
+
418
+ VALUE thgroup;
419
+ VALUE value;
420
+
421
+ VALUE errinfo;
422
+ VALUE thrown_errinfo;
423
+
424
+ int interrupt_flag;
425
+ rb_thread_lock_t interrupt_lock;
426
+ struct rb_unblock_callback unblock;
427
+ VALUE locking_mutex;
428
+ struct rb_mutex_struct *keeping_mutexes;
429
+ volatile int transition_for_lock;
430
+
431
+ struct rb_vm_tag *tag;
432
+ struct rb_vm_protect_tag *protect_tag;
433
+
434
+ int parse_in_eval;
435
+ int mild_compile_error;
436
+
437
+ /* storage */
438
+ st_table *local_storage;
439
+ #if USE_VALUE_CACHE
440
+ VALUE value_cache[RUBY_VM_VALUE_CACHE_SIZE + 1];
441
+ VALUE *value_cache_ptr;
442
+ #endif
443
+
444
+ struct rb_thread_struct *join_list_next;
445
+ struct rb_thread_struct *join_list_head;
446
+
447
+ VALUE first_proc;
448
+ VALUE first_args;
449
+ VALUE (*first_func)(ANYARGS);
450
+
451
+ /* for GC */
452
+ VALUE *machine_stack_start;
453
+ VALUE *machine_stack_end;
454
+ size_t machine_stack_maxsize;
455
+ #ifdef __ia64
456
+ VALUE *machine_register_stack_start;
457
+ VALUE *machine_register_stack_end;
458
+ size_t machine_register_stack_maxsize;
459
+ #endif
460
+ jmp_buf machine_regs;
461
+ int mark_stack_len;
462
+
463
+ /* statistics data for profiler */
464
+ VALUE stat_insn_usage;
465
+
466
+ /* tracer */
467
+ rb_event_hook_t *event_hooks;
468
+ rb_event_flag_t event_flags;
469
+ int tracing;
470
+
471
+ /* fiber */
472
+ VALUE fiber;
473
+ VALUE root_fiber;
474
+ rb_jmpbuf_t root_jmpbuf;
475
+
476
+ /* misc */
477
+ int method_missing_reason;
478
+ int abort_on_exception;
479
+ #ifdef USE_SIGALTSTACK
480
+ void *altstack;
481
+ #endif
482
+ } rb_thread_t;
483
+
484
+ /* iseq.c */
485
+ VALUE rb_iseq_new(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE);
486
+ VALUE rb_iseq_new_top(NODE *node, VALUE name, VALUE filename, VALUE filepath, VALUE parent);
487
+ VALUE rb_iseq_new_main(NODE *node, VALUE filename, VALUE filepath);
488
+ VALUE rb_iseq_new_with_bopt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
489
+ VALUE rb_iseq_new_with_opt(NODE*, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, const rb_compile_option_t*);
490
+ VALUE rb_iseq_compile(VALUE src, VALUE file, VALUE line);
491
+ VALUE rb_iseq_disasm(VALUE self);
492
+ int rb_iseq_disasm_insn(VALUE str, VALUE *iseqval, size_t pos, rb_iseq_t *iseq, VALUE child);
493
+ const char *ruby_node_name(int node);
494
+ int rb_iseq_first_lineno(rb_iseq_t *iseq);
495
+
496
+ RUBY_EXTERN VALUE rb_cISeq;
497
+ RUBY_EXTERN VALUE rb_cRubyVM;
498
+ RUBY_EXTERN VALUE rb_cEnv;
499
+ RUBY_EXTERN VALUE rb_mRubyVMFrozenCore;
500
+
501
+ /* each thread has this size stack : 128KB */
502
+ #define RUBY_VM_THREAD_STACK_SIZE (128 * 1024)
503
+
504
+ #define GetProcPtr(obj, ptr) \
505
+ GetCoreDataFromValue(obj, rb_proc_t, ptr)
506
+
507
+ typedef struct {
508
+ rb_block_t block;
509
+
510
+ VALUE envval; /* for GC mark */
511
+ VALUE blockprocval;
512
+ int safe_level;
513
+ int is_from_method;
514
+ int is_lambda;
515
+ } rb_proc_t;
516
+
517
+ #define GetEnvPtr(obj, ptr) \
518
+ GetCoreDataFromValue(obj, rb_env_t, ptr)
519
+
520
+ typedef struct {
521
+ VALUE *env;
522
+ int env_size;
523
+ int local_size;
524
+ VALUE prev_envval; /* for GC mark */
525
+ rb_block_t block;
526
+ } rb_env_t;
527
+
528
+ #define GetBindingPtr(obj, ptr) \
529
+ GetCoreDataFromValue(obj, rb_binding_t, ptr)
530
+
531
+ typedef struct {
532
+ VALUE env;
533
+ VALUE filename;
534
+ unsigned short line_no;
535
+ } rb_binding_t;
536
+
537
+ /* used by compile time and send insn */
538
+ #define VM_CALL_ARGS_SPLAT_BIT (0x01 << 1)
539
+ #define VM_CALL_ARGS_BLOCKARG_BIT (0x01 << 2)
540
+ #define VM_CALL_FCALL_BIT (0x01 << 3)
541
+ #define VM_CALL_VCALL_BIT (0x01 << 4)
542
+ #define VM_CALL_TAILCALL_BIT (0x01 << 5)
543
+ #define VM_CALL_TAILRECURSION_BIT (0x01 << 6)
544
+ #define VM_CALL_SUPER_BIT (0x01 << 7)
545
+ #define VM_CALL_OPT_SEND_BIT (0x01 << 8)
546
+
547
+ #define VM_SPECIAL_OBJECT_VMCORE 0x01
548
+ #define VM_SPECIAL_OBJECT_CBASE 0x02
549
+ #define VM_SPECIAL_OBJECT_CONST_BASE 0x03
550
+
551
+ #define VM_FRAME_MAGIC_METHOD 0x11
552
+ #define VM_FRAME_MAGIC_BLOCK 0x21
553
+ #define VM_FRAME_MAGIC_CLASS 0x31
554
+ #define VM_FRAME_MAGIC_TOP 0x41
555
+ #define VM_FRAME_MAGIC_FINISH 0x51
556
+ #define VM_FRAME_MAGIC_CFUNC 0x61
557
+ #define VM_FRAME_MAGIC_PROC 0x71
558
+ #define VM_FRAME_MAGIC_IFUNC 0x81
559
+ #define VM_FRAME_MAGIC_EVAL 0x91
560
+ #define VM_FRAME_MAGIC_LAMBDA 0xa1
561
+ #define VM_FRAME_MAGIC_MASK_BITS 8
562
+ #define VM_FRAME_MAGIC_MASK (~(~0<<VM_FRAME_MAGIC_MASK_BITS))
563
+
564
+ #define VM_FRAME_TYPE(cfp) ((cfp)->flag & VM_FRAME_MAGIC_MASK)
565
+
566
+ /* other frame flag */
567
+ #define VM_FRAME_FLAG_PASSED 0x0100
568
+
569
+ #define RUBYVM_CFUNC_FRAME_P(cfp) \
570
+ (VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC)
571
+
572
+ /* inline cache */
573
+ typedef struct iseq_inline_cache_entry *IC;
574
+
575
+ extern VALUE ruby_vm_global_state_version;
576
+
577
+ #define GET_VM_STATE_VERSION() (ruby_vm_global_state_version)
578
+ #define INC_VM_STATE_VERSION() \
579
+ (ruby_vm_global_state_version = (ruby_vm_global_state_version+1) & 0x8fffffff)
580
+ void rb_vm_change_state(void);
581
+
582
+ typedef VALUE CDHASH;
583
+
584
+ #ifndef FUNC_FASTCALL
585
+ #define FUNC_FASTCALL(x) x
586
+ #endif
587
+
588
+ typedef rb_control_frame_t *
589
+ (FUNC_FASTCALL(*rb_insn_func_t))(rb_thread_t *, rb_control_frame_t *);
590
+
591
+ #define GC_GUARDED_PTR(p) ((VALUE)((VALUE)(p) | 0x01))
592
+ #define GC_GUARDED_PTR_REF(p) ((void *)(((VALUE)p) & ~0x03))
593
+ #define GC_GUARDED_PTR_P(p) (((VALUE)p) & 0x01)
594
+
595
+ #define RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp) (cfp+1)
596
+ #define RUBY_VM_NEXT_CONTROL_FRAME(cfp) (cfp-1)
597
+ #define RUBY_VM_END_CONTROL_FRAME(th) \
598
+ ((rb_control_frame_t *)((th)->stack + (th)->stack_size))
599
+ #define RUBY_VM_VALID_CONTROL_FRAME_P(cfp, ecfp) \
600
+ ((void *)(ecfp) > (void *)(cfp))
601
+ #define RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(th, cfp) \
602
+ (!RUBY_VM_VALID_CONTROL_FRAME_P((cfp), RUBY_VM_END_CONTROL_FRAME(th)))
603
+
604
+ #define RUBY_VM_IFUNC_P(ptr) (BUILTIN_TYPE(ptr) == T_NODE)
605
+ #define RUBY_VM_NORMAL_ISEQ_P(ptr) \
606
+ (ptr && !RUBY_VM_IFUNC_P(ptr))
607
+
608
+ #define RUBY_VM_GET_BLOCK_PTR_IN_CFP(cfp) ((rb_block_t *)(&(cfp)->self))
609
+ #define RUBY_VM_GET_CFP_FROM_BLOCK_PTR(b) \
610
+ ((rb_control_frame_t *)((VALUE *)(b) - 5))
611
+
612
+ /* VM related object allocate functions */
613
+ VALUE rb_thread_alloc(VALUE klass);
614
+ VALUE rb_proc_alloc(VALUE klass);
615
+
616
+ /* for debug */
617
+ extern void rb_vmdebug_stack_dump_raw(rb_thread_t *, rb_control_frame_t *);
618
+ #define SDR() rb_vmdebug_stack_dump_raw(GET_THREAD(), GET_THREAD()->cfp)
619
+ #define SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_THREAD(), (cfp))
620
+ void rb_vm_bugreport(void);
621
+
622
+ /* functions about thread/vm execution */
623
+ VALUE rb_iseq_eval(VALUE iseqval);
624
+ VALUE rb_iseq_eval_main(VALUE iseqval);
625
+ void rb_enable_interrupt(void);
626
+ void rb_disable_interrupt(void);
627
+ int rb_thread_method_id_and_class(rb_thread_t *th, ID *idp, VALUE *klassp);
628
+
629
+ VALUE rb_vm_invoke_proc(rb_thread_t *th, rb_proc_t *proc, VALUE self,
630
+ int argc, const VALUE *argv, const rb_block_t *blockptr);
631
+ VALUE rb_vm_make_proc(rb_thread_t *th, const rb_block_t *block, VALUE klass);
632
+ VALUE rb_vm_make_env_object(rb_thread_t *th, rb_control_frame_t *cfp);
633
+
634
+ void rb_thread_start_timer_thread(void);
635
+ void rb_thread_stop_timer_thread(void);
636
+ void rb_thread_reset_timer_thread(void);
637
+ void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
638
+ int ruby_thread_has_gvl_p(void);
639
+ VALUE rb_make_backtrace(void);
640
+ typedef int rb_backtrace_iter_func(void *, VALUE, int, VALUE);
641
+ int rb_backtrace_each(rb_backtrace_iter_func *iter, void *arg);
642
+ rb_control_frame_t *rb_vm_get_ruby_level_next_cfp(rb_thread_t *th, rb_control_frame_t *cfp);
643
+ int rb_vm_get_sourceline(const rb_control_frame_t *);
644
+ VALUE rb_name_err_mesg_new(VALUE obj, VALUE mesg, VALUE recv, VALUE method);
645
+
646
+ NOINLINE(void rb_gc_save_machine_context(rb_thread_t *));
647
+
648
+ #define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
649
+
650
+ VALUE rb_str_resurrect(VALUE str);
651
+ VALUE rb_ary_resurrect(VALUE ary);
652
+
653
+ /* for thread */
654
+
655
+ #if RUBY_VM_THREAD_MODEL == 2
656
+ RUBY_EXTERN rb_thread_t *ruby_current_thread;
657
+ extern rb_vm_t *ruby_current_vm;
658
+
659
+ #define GET_VM() ruby_current_vm
660
+ #define GET_THREAD() ruby_current_thread
661
+ #define rb_thread_set_current_raw(th) (void)(ruby_current_thread = (th))
662
+ #define rb_thread_set_current(th) do { \
663
+ rb_thread_set_current_raw(th); \
664
+ th->vm->running_thread = th; \
665
+ } while (0)
666
+
667
+ #else
668
+ #error "unsupported thread model"
669
+ #endif
670
+
671
+ #define RUBY_VM_SET_INTERRUPT(th) ((th)->interrupt_flag |= 0x02)
672
+ #define RUBY_VM_SET_TIMER_INTERRUPT(th) ((th)->interrupt_flag |= 0x01)
673
+ #define RUBY_VM_SET_FINALIZER_INTERRUPT(th) ((th)->interrupt_flag |= 0x04)
674
+ #define RUBY_VM_INTERRUPTED(th) ((th)->interrupt_flag & 0x02)
675
+
676
+ void rb_threadptr_check_signal(rb_thread_t *mth);
677
+ void rb_threadptr_signal_raise(rb_thread_t *th, int sig);
678
+ void rb_threadptr_signal_exit(rb_thread_t *th);
679
+ void rb_threadptr_execute_interrupts(rb_thread_t *);
680
+
681
+ void rb_thread_lock_unlock(rb_thread_lock_t *);
682
+ void rb_thread_lock_destroy(rb_thread_lock_t *);
683
+
684
+ #define RUBY_VM_CHECK_INTS_TH(th) do { \
685
+ if (UNLIKELY(th->interrupt_flag)) { \
686
+ rb_threadptr_execute_interrupts(th); \
687
+ } \
688
+ } while (0)
689
+
690
+ #define RUBY_VM_CHECK_INTS() \
691
+ RUBY_VM_CHECK_INTS_TH(GET_THREAD())
692
+
693
+ /* tracer */
694
+ void
695
+ rb_threadptr_exec_event_hooks(rb_thread_t *th, rb_event_flag_t flag, VALUE self, ID id, VALUE klass);
696
+
697
+ #define EXEC_EVENT_HOOK(th, flag, self, id, klass) do { \
698
+ rb_event_flag_t wait_event__ = th->event_flags; \
699
+ if (UNLIKELY(wait_event__)) { \
700
+ if (wait_event__ & (flag | RUBY_EVENT_VM)) { \
701
+ rb_threadptr_exec_event_hooks(th, flag, self, id, klass); \
702
+ } \
703
+ } \
704
+ } while (0)
705
+
706
+ #endif /* RUBY_VM_CORE_H */