ruby-internal 0.7.3 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. data/bin/ruby-internal-node-dump +1 -1
  2. data/bin/ruby-internal-obfuscate +1 -1
  3. data/ext/cached/ruby-1.8.4/internal/method/{method.h → internal_method.h} +12 -0
  4. data/ext/cached/ruby-1.8.4/internal/module/getcfp.h +13 -0
  5. data/ext/cached/ruby-1.8.4/internal/node/global_entry.h +94 -0
  6. data/ext/cached/ruby-1.8.4/internal/node/node_type_descrip.c +41 -41
  7. data/ext/cached/ruby-1.8.4/internal/node/nodeinfo.c +288 -273
  8. data/ext/cached/ruby-1.8.4/internal/vm/instruction/insns_info.c +3 -0
  9. data/ext/cached/ruby-1.8.4/internal/vm/iseq/iseq_load.inc +21 -2
  10. data/ext/cached/{ruby-1.8.3/internal/method/method.h → ruby-1.8.5/internal/method/internal_method.h} +12 -0
  11. data/ext/cached/ruby-1.8.5/internal/module/getcfp.h +13 -0
  12. data/ext/cached/ruby-1.8.5/internal/node/global_entry.h +94 -0
  13. data/ext/cached/ruby-1.8.5/internal/node/node_type_descrip.c +45 -45
  14. data/ext/cached/ruby-1.8.5/internal/node/nodeinfo.c +310 -295
  15. data/ext/cached/ruby-1.8.5/internal/vm/instruction/insns_info.c +3 -0
  16. data/ext/cached/ruby-1.8.5/internal/vm/iseq/iseq_load.inc +21 -2
  17. data/ext/cached/{ruby-1.8.5/internal/method/method.h → ruby-1.8.6/internal/method/internal_method.h} +12 -0
  18. data/ext/cached/ruby-1.8.6/internal/module/getcfp.h +13 -0
  19. data/ext/cached/ruby-1.8.6/internal/node/global_entry.h +94 -0
  20. data/ext/cached/ruby-1.8.6/internal/node/node_type_descrip.c +48 -48
  21. data/ext/cached/ruby-1.8.6/internal/node/nodeinfo.c +323 -308
  22. data/ext/cached/ruby-1.8.6/internal/vm/instruction/insns_info.c +3 -0
  23. data/ext/cached/ruby-1.8.6/internal/vm/iseq/iseq_load.inc +21 -2
  24. data/ext/cached/{ruby-1.8.6/internal/method/method.h → ruby-1.8.7/internal/method/internal_method.h} +12 -0
  25. data/ext/cached/ruby-1.8.7/internal/module/getcfp.h +13 -0
  26. data/ext/cached/ruby-1.8.7/internal/node/global_entry.h +98 -0
  27. data/ext/cached/ruby-1.8.7/internal/node/node_type_descrip.c +42 -42
  28. data/ext/cached/ruby-1.8.7/internal/node/nodeinfo.c +276 -261
  29. data/ext/cached/ruby-1.8.7/internal/vm/instruction/insns_info.c +3 -0
  30. data/ext/cached/ruby-1.8.7/internal/vm/iseq/iseq_load.inc +21 -2
  31. data/ext/cached/{ruby-1.9.0/internal/method/method.h → ruby-1.9.1/internal/method/internal_method.h} +12 -0
  32. data/ext/cached/ruby-1.9.1/internal/module/classpath.c +12 -14
  33. data/ext/cached/ruby-1.9.1/internal/module/getcfp.h +25 -0
  34. data/ext/cached/ruby-1.9.1/internal/node/global_entry.h +86 -0
  35. data/ext/cached/ruby-1.9.1/internal/node/node_type_descrip.c +46 -48
  36. data/ext/cached/ruby-1.9.1/internal/node/nodeinfo.c +311 -412
  37. data/ext/cached/ruby-1.9.1/internal/vm/instruction/insns_info.c +3 -0
  38. data/ext/cached/ruby-1.9.1/internal/vm/iseq/iseq_load.inc +28 -6
  39. data/ext/cached/ruby-1.9.1/internal/yarv-headers/iseq.h +1 -0
  40. data/ext/cached/ruby-1.9.1/internal/yarv-headers/parse.h +6 -6
  41. data/ext/cached/ruby-1.9.1/internal/yarv-headers/revision.h +1 -1
  42. data/ext/cached/ruby-1.9.1/internal/yarv-headers/version.h +6 -5
  43. data/ext/cached/ruby-1.9.1/internal/yarv-headers/vm_core.h +3 -2
  44. data/ext/cached/ruby-1.9.1/internal/yarv-headers/vm_insnhelper.h +1 -0
  45. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/binding/block.h +0 -0
  46. data/ext/cached/{ruby-1.9.1/internal/method/method.h → ruby-1.9.2/internal/method/internal_method.h} +16 -5
  47. data/ext/cached/ruby-1.9.2/internal/module/classpath.c +40 -0
  48. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/module/classpath.h +0 -0
  49. data/ext/cached/ruby-1.9.2/internal/module/getcfp.h +25 -0
  50. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/node/block.h +0 -0
  51. data/ext/cached/ruby-1.9.2/internal/node/global_entry.h +93 -0
  52. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/node/node_type_descrip.c +44 -48
  53. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/node/nodeinfo.c +291 -439
  54. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/node/nodeinfo.h +0 -0
  55. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/proc/block.h +0 -0
  56. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/tag/tag.h +0 -0
  57. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/vm/instruction/insns_info.c +141 -64
  58. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/vm/instruction/insns_info.h +88 -80
  59. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/vm/iseq/insns_info.inc +77 -70
  60. data/ext/cached/ruby-1.9.2/internal/vm/iseq/iseq_load.inc +426 -0
  61. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/debug.h +1 -1
  62. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/dln.h +3 -3
  63. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/encdb.h +18 -2
  64. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/eval_intern.h +39 -28
  65. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/gc.h +7 -5
  66. data/ext/cached/ruby-1.9.2/internal/yarv-headers/id.h +170 -0
  67. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/iseq.h +20 -10
  68. data/ext/cached/ruby-1.9.2/internal/yarv-headers/method.h +103 -0
  69. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/node.h +14 -47
  70. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/parse.h +31 -148
  71. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/regenc.h +7 -3
  72. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/regint.h +16 -17
  73. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/regparse.h +4 -1
  74. data/ext/cached/ruby-1.9.2/internal/yarv-headers/revision.h +1 -0
  75. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/thread_pthread.h +4 -1
  76. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/thread_win32.h +1 -1
  77. data/ext/cached/ruby-1.9.2/internal/yarv-headers/timev.h +21 -0
  78. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/transcode_data.h +20 -10
  79. data/ext/cached/ruby-1.9.2/internal/yarv-headers/transdb.h +179 -0
  80. data/ext/cached/ruby-1.9.2/internal/yarv-headers/version.h +55 -0
  81. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/vm_core.h +127 -84
  82. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/vm_exec.h +4 -7
  83. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/vm_insnhelper.h +53 -36
  84. data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/vm_opts.h +1 -1
  85. data/ext/cached/ruby-1.9.3/internal/binding/block.h +12 -0
  86. data/ext/cached/ruby-1.9.3/internal/method/internal_method.h +32 -0
  87. data/ext/cached/ruby-1.9.3/internal/module/classpath.c +40 -0
  88. data/ext/cached/{ruby-1.8.0 → ruby-1.9.3}/internal/module/classpath.h +5 -2
  89. data/ext/cached/ruby-1.9.3/internal/module/getcfp.h +25 -0
  90. data/ext/cached/ruby-1.9.3/internal/node/block.h +12 -0
  91. data/ext/cached/ruby-1.9.3/internal/node/global_entry.h +93 -0
  92. data/ext/cached/{ruby-1.8.3 → ruby-1.9.3}/internal/node/node_type_descrip.c +48 -57
  93. data/ext/cached/{ruby-1.6.8 → ruby-1.9.3}/internal/node/nodeinfo.c +589 -740
  94. data/ext/cached/{ruby-1.8.0 → ruby-1.9.3}/internal/node/nodeinfo.h +4 -3
  95. data/ext/cached/ruby-1.9.3/internal/proc/block.h +12 -0
  96. data/ext/cached/ruby-1.9.3/internal/tag/tag.h +6 -0
  97. data/ext/cached/ruby-1.9.3/internal/vm/instruction/insns_info.c +6013 -0
  98. data/ext/cached/ruby-1.9.3/internal/vm/instruction/insns_info.h +899 -0
  99. data/ext/cached/ruby-1.9.3/internal/vm/iseq/insns_info.inc +707 -0
  100. data/ext/cached/ruby-1.9.3/internal/vm/iseq/iseq_load.inc +423 -0
  101. data/ext/cached/ruby-1.9.3/internal/yarv-headers/addr2line.h +21 -0
  102. data/ext/cached/ruby-1.9.3/internal/yarv-headers/atomic.h +56 -0
  103. data/ext/cached/ruby-1.9.3/internal/yarv-headers/constant.h +34 -0
  104. data/ext/cached/ruby-1.9.3/internal/yarv-headers/debug.h +41 -0
  105. data/ext/cached/ruby-1.9.3/internal/yarv-headers/dln.h +50 -0
  106. data/ext/cached/ruby-1.9.3/internal/yarv-headers/encdb.h +167 -0
  107. data/ext/cached/ruby-1.9.3/internal/yarv-headers/eval_intern.h +234 -0
  108. data/ext/cached/ruby-1.9.3/internal/yarv-headers/gc.h +98 -0
  109. data/ext/cached/ruby-1.9.3/internal/yarv-headers/id.h +175 -0
  110. data/ext/cached/ruby-1.9.3/internal/yarv-headers/internal.h +232 -0
  111. data/ext/cached/ruby-1.9.3/internal/yarv-headers/iseq.h +125 -0
  112. data/ext/cached/ruby-1.9.3/internal/yarv-headers/method.h +105 -0
  113. data/ext/cached/ruby-1.9.3/internal/yarv-headers/node.h +503 -0
  114. data/ext/cached/ruby-1.9.3/internal/yarv-headers/parse.h +186 -0
  115. data/ext/cached/ruby-1.9.3/internal/yarv-headers/regenc.h +219 -0
  116. data/ext/cached/ruby-1.9.3/internal/yarv-headers/regint.h +850 -0
  117. data/ext/cached/ruby-1.9.3/internal/yarv-headers/regparse.h +362 -0
  118. data/ext/cached/ruby-1.9.3/internal/yarv-headers/revision.h +1 -0
  119. data/ext/cached/ruby-1.9.3/internal/yarv-headers/thread_pthread.h +51 -0
  120. data/ext/cached/ruby-1.9.3/internal/yarv-headers/thread_win32.h +40 -0
  121. data/ext/cached/ruby-1.9.3/internal/yarv-headers/timev.h +21 -0
  122. data/ext/cached/ruby-1.9.3/internal/yarv-headers/transcode_data.h +117 -0
  123. data/ext/cached/ruby-1.9.3/internal/yarv-headers/transdb.h +189 -0
  124. data/ext/cached/ruby-1.9.3/internal/yarv-headers/version.h +52 -0
  125. data/ext/cached/ruby-1.9.3/internal/yarv-headers/vm_core.h +756 -0
  126. data/ext/cached/ruby-1.9.3/internal/yarv-headers/vm_exec.h +184 -0
  127. data/ext/cached/ruby-1.9.3/internal/yarv-headers/vm_insnhelper.h +220 -0
  128. data/ext/cached/ruby-1.9.3/internal/yarv-headers/vm_opts.h +51 -0
  129. data/ext/internal/binding/block.h +20 -0
  130. data/ext/internal/method/internal_method.h +5 -38
  131. data/ext/internal/method/internal_method.h.rpp +0 -7
  132. data/ext/internal/method/method.c +52 -32
  133. data/ext/internal/module/classpath.c +18 -13
  134. data/ext/internal/module/classpath.h +3 -3
  135. data/ext/internal/module/extconf.rb +3 -2
  136. data/ext/internal/module/getcfp.h +13 -0
  137. data/ext/internal/module/getcfp.h.rpp +44 -0
  138. data/ext/internal/module/module.c +58 -21
  139. data/ext/internal/node/block.h +20 -0
  140. data/ext/internal/node/extconf.rb +2 -0
  141. data/ext/internal/node/global_entry.h +69 -13
  142. data/ext/internal/node/global_entry.h.rpp +11 -2
  143. data/ext/internal/node/node.c +30 -3
  144. data/ext/internal/node/node_type_descrip.c +47 -38
  145. data/ext/internal/node/nodeinfo.c +622 -306
  146. data/ext/internal/node/nodeinfo.h +1 -4
  147. data/ext/internal/proc/block.h +20 -0
  148. data/ext/internal/tag/tag.h +10 -0
  149. data/ext/internal/thread/thread.c +9 -3
  150. data/ext/internal/vm/extconf.rb +1 -0
  151. data/ext/internal/vm/instruction/insns_info.c +3 -5974
  152. data/ext/internal/vm/instruction/insns_info.h +0 -878
  153. data/ext/internal/vm/iseq/extconf.rb +1 -0
  154. data/ext/internal/vm/iseq/iseq.c +38 -4
  155. data/ext/internal/vm/iseq/iseq_load.inc.rpp +23 -5
  156. data/ext/internal/vm/vm.c +28 -0
  157. data/lib/internal/classtree.rb +28 -0
  158. data/lib/internal/debug.rb +10 -2
  159. data/lib/internal/method/as_code.rb +25 -0
  160. data/lib/internal/method/as_expression.rb +2 -3
  161. data/lib/internal/method/origin.rb +29 -0
  162. data/lib/internal/method/signature.rb +5 -300
  163. data/lib/internal/method/signature/argument.rb +102 -0
  164. data/lib/internal/method/signature/iseq.rb +52 -0
  165. data/lib/internal/method/signature/node.rb +160 -0
  166. data/lib/internal/method/signature/signature.rb +23 -0
  167. data/lib/internal/proc/as_code.rb +2 -0
  168. data/lib/internal/proc/as_expression.rb +2 -0
  169. data/lib/internal/vm/bytedecoder.rb +5 -5
  170. data/lib/internal/vm/iseq/as_code.rb +2 -2
  171. data/lib/internal/vm/iseq/as_expression.rb +2 -2
  172. data/test/test_dump_method.rb +1 -1
  173. data/test/test_method.rb +21 -3
  174. data/test/test_node.rb +20 -4
  175. metadata +152 -155
  176. data/ext/cached/ruby-1.6.8/internal/binding/block.h +0 -35
  177. data/ext/cached/ruby-1.6.8/internal/method/method.h +0 -19
  178. data/ext/cached/ruby-1.6.8/internal/module/classpath.c +0 -3
  179. data/ext/cached/ruby-1.6.8/internal/module/classpath.h +0 -8
  180. data/ext/cached/ruby-1.6.8/internal/node/block.h +0 -35
  181. data/ext/cached/ruby-1.6.8/internal/node/global_entry.h +0 -15
  182. data/ext/cached/ruby-1.6.8/internal/node/node_type_descrip.c +0 -149
  183. data/ext/cached/ruby-1.6.8/internal/node/nodeinfo.h +0 -69
  184. data/ext/cached/ruby-1.6.8/internal/proc/block.h +0 -35
  185. data/ext/cached/ruby-1.6.8/internal/tag/tag.h +0 -15
  186. data/ext/cached/ruby-1.6.8/internal/vm/instruction/insns_info.c +0 -39
  187. data/ext/cached/ruby-1.6.8/internal/vm/instruction/insns_info.h +0 -21
  188. data/ext/cached/ruby-1.6.8/internal/vm/iseq/insns_info.inc +0 -12
  189. data/ext/cached/ruby-1.6.8/internal/vm/iseq/iseq_load.inc +0 -9
  190. data/ext/cached/ruby-1.8.0/internal/binding/block.h +0 -37
  191. data/ext/cached/ruby-1.8.0/internal/method/method.h +0 -19
  192. data/ext/cached/ruby-1.8.0/internal/module/classpath.c +0 -27
  193. data/ext/cached/ruby-1.8.0/internal/node/block.h +0 -37
  194. data/ext/cached/ruby-1.8.0/internal/node/global_entry.h +0 -10
  195. data/ext/cached/ruby-1.8.0/internal/node/node_type_descrip.c +0 -155
  196. data/ext/cached/ruby-1.8.0/internal/node/nodeinfo.c +0 -5744
  197. data/ext/cached/ruby-1.8.0/internal/proc/block.h +0 -37
  198. data/ext/cached/ruby-1.8.0/internal/tag/tag.h +0 -15
  199. data/ext/cached/ruby-1.8.0/internal/vm/instruction/insns_info.c +0 -39
  200. data/ext/cached/ruby-1.8.0/internal/vm/instruction/insns_info.h +0 -21
  201. data/ext/cached/ruby-1.8.0/internal/vm/iseq/insns_info.inc +0 -12
  202. data/ext/cached/ruby-1.8.0/internal/vm/iseq/iseq_load.inc +0 -9
  203. data/ext/cached/ruby-1.8.1/internal/binding/block.h +0 -31
  204. data/ext/cached/ruby-1.8.1/internal/method/method.h +0 -19
  205. data/ext/cached/ruby-1.8.1/internal/module/classpath.c +0 -27
  206. data/ext/cached/ruby-1.8.1/internal/module/classpath.h +0 -14
  207. data/ext/cached/ruby-1.8.1/internal/node/block.h +0 -31
  208. data/ext/cached/ruby-1.8.1/internal/node/global_entry.h +0 -10
  209. data/ext/cached/ruby-1.8.1/internal/node/node_type_descrip.c +0 -154
  210. data/ext/cached/ruby-1.8.1/internal/node/nodeinfo.c +0 -5736
  211. data/ext/cached/ruby-1.8.1/internal/node/nodeinfo.h +0 -69
  212. data/ext/cached/ruby-1.8.1/internal/proc/block.h +0 -31
  213. data/ext/cached/ruby-1.8.1/internal/tag/tag.h +0 -16
  214. data/ext/cached/ruby-1.8.1/internal/vm/instruction/insns_info.c +0 -39
  215. data/ext/cached/ruby-1.8.1/internal/vm/instruction/insns_info.h +0 -21
  216. data/ext/cached/ruby-1.8.1/internal/vm/iseq/insns_info.inc +0 -12
  217. data/ext/cached/ruby-1.8.1/internal/vm/iseq/iseq_load.inc +0 -9
  218. data/ext/cached/ruby-1.8.2/internal/binding/block.h +0 -32
  219. data/ext/cached/ruby-1.8.2/internal/method/method.h +0 -19
  220. data/ext/cached/ruby-1.8.2/internal/module/classpath.c +0 -45
  221. data/ext/cached/ruby-1.8.2/internal/module/classpath.h +0 -17
  222. data/ext/cached/ruby-1.8.2/internal/node/block.h +0 -32
  223. data/ext/cached/ruby-1.8.2/internal/node/global_entry.h +0 -10
  224. data/ext/cached/ruby-1.8.2/internal/node/node_type_descrip.c +0 -154
  225. data/ext/cached/ruby-1.8.2/internal/node/nodeinfo.c +0 -5736
  226. data/ext/cached/ruby-1.8.2/internal/node/nodeinfo.h +0 -69
  227. data/ext/cached/ruby-1.8.2/internal/proc/block.h +0 -32
  228. data/ext/cached/ruby-1.8.2/internal/tag/tag.h +0 -16
  229. data/ext/cached/ruby-1.8.2/internal/vm/instruction/insns_info.c +0 -39
  230. data/ext/cached/ruby-1.8.2/internal/vm/instruction/insns_info.h +0 -21
  231. data/ext/cached/ruby-1.8.2/internal/vm/iseq/insns_info.inc +0 -12
  232. data/ext/cached/ruby-1.8.2/internal/vm/iseq/iseq_load.inc +0 -9
  233. data/ext/cached/ruby-1.8.3/internal/binding/block.h +0 -32
  234. data/ext/cached/ruby-1.8.3/internal/module/classpath.c +0 -45
  235. data/ext/cached/ruby-1.8.3/internal/module/classpath.h +0 -17
  236. data/ext/cached/ruby-1.8.3/internal/node/block.h +0 -32
  237. data/ext/cached/ruby-1.8.3/internal/node/global_entry.h +0 -10
  238. data/ext/cached/ruby-1.8.3/internal/node/nodeinfo.c +0 -5736
  239. data/ext/cached/ruby-1.8.3/internal/node/nodeinfo.h +0 -69
  240. data/ext/cached/ruby-1.8.3/internal/proc/block.h +0 -32
  241. data/ext/cached/ruby-1.8.3/internal/tag/tag.h +0 -16
  242. data/ext/cached/ruby-1.8.3/internal/vm/instruction/insns_info.c +0 -39
  243. data/ext/cached/ruby-1.8.3/internal/vm/instruction/insns_info.h +0 -21
  244. data/ext/cached/ruby-1.8.3/internal/vm/iseq/insns_info.inc +0 -12
  245. data/ext/cached/ruby-1.8.3/internal/vm/iseq/iseq_load.inc +0 -9
  246. data/ext/cached/ruby-1.8.7/internal/method/method.h +0 -20
  247. data/ext/cached/ruby-1.9.0/internal/module/classpath.c +0 -42
  248. data/ext/cached/ruby-1.9.0/internal/node/global_entry.h +0 -10
  249. data/ext/cached/ruby-1.9.0/internal/vm/iseq/iseq_load.inc +0 -13
  250. data/ext/cached/ruby-1.9.0/internal/yarv-headers/id.h +0 -83
  251. data/ext/cached/ruby-1.9.0/internal/yarv-headers/revision.h +0 -1
  252. data/ext/cached/ruby-1.9.0/internal/yarv-headers/transdb.h +0 -67
  253. data/ext/cached/ruby-1.9.0/internal/yarv-headers/version.h +0 -57
  254. data/ext/internal/module/cfp.h +0 -13
@@ -2,6 +2,9 @@
2
2
 
3
3
  #ifdef RUBY_VM
4
4
 
5
+ #include "iseq.h"
6
+ #include "vm_core.h"
7
+
5
8
 
6
9
  VALUE instruction_class[VM_INSTRUCTION_SIZE];
7
10
 
@@ -1,9 +1,28 @@
1
1
  #ifndef ruby_internal_iseq_load__inc_
2
2
  #define ruby_internal_iseq_load__inc_
3
3
 
4
- #include "internal/yarv-headers/gc.h"
5
- #include "internal/yarv-headers/iseq.h"
4
+ #ifdef HAVE_TYPE_STRUCT_RTYPEDDATA
6
5
 
6
+ static rb_data_type_t const * p_iseq_data_type;
7
+
8
+ static void init_iseq_data_type()
9
+ {
10
+ rb_proc_t * p;
11
+ VALUE body;
12
+
13
+ VALUE binding = rb_binding_new();
14
+ VALUE new_proc = rb_funcall(
15
+ rb_cObject, rb_intern("eval"), 2, rb_str_new2("proc { }"), binding);
16
+ GetProcPtr(new_proc, p);
17
+ body = p->block.iseq->self;
18
+
19
+ p_iseq_data_type = RTYPEDDATA_TYPE(body);
20
+ }
21
+
22
+ #else
23
+
24
+ #endif
25
+ #
7
26
 
8
27
  #endif
9
28
 
@@ -3,8 +3,20 @@
3
3
 
4
4
  #include <ruby.h>
5
5
 
6
+ #ifdef RUBY_VM
7
+ #include "method.h"
8
+ #endif
9
+
6
10
  #include "internal/node/ruby_internal_node.h"
7
11
 
12
+ #ifndef FALSE
13
+ #define FALSE 0
14
+ #endif
15
+
16
+ #ifndef TRUE
17
+ #define TRUE (!FALSE)
18
+ #endif
19
+
8
20
  struct METHOD {
9
21
  VALUE klass, rklass;
10
22
  VALUE recv;
@@ -0,0 +1,13 @@
1
+ #ifndef getcfp__h
2
+ #define getcfp__h
3
+
4
+ #include "ruby.h"
5
+
6
+ #ifdef RUBY_VM
7
+
8
+ #include "vm_core.h"
9
+
10
+
11
+ #endif
12
+
13
+ #endif
@@ -1,10 +1,104 @@
1
1
  #ifndef global_entry__h_
2
2
  #define global_entry__h_
3
3
 
4
+ st_table * rb_global_tbl;
5
+
6
+ struct trace_var {
7
+ int removed;
8
+ void (*func)();
9
+ VALUE data;
10
+ struct trace_var *next;
11
+ };
12
+ struct global_variable {
13
+ int counter;
14
+ void *data;
15
+ VALUE (*getter)();
16
+ void (*setter)();
17
+ void (*marker)();
18
+ int block_trace;
19
+ struct trace_var *trace;
20
+ };
4
21
  struct global_entry {
5
22
  struct global_variable *var;
6
23
  ID id;
7
24
  };
25
+ static VALUE undef_getter();
26
+ static void undef_setter();
27
+ static void undef_marker();
28
+ static VALUE val_getter();
29
+ static void val_setter();
30
+ static void val_marker();
31
+ struct global_entry*
32
+ rb_global_entry(id)
33
+ ID id;
34
+ {
35
+ struct global_entry *entry;
36
+
37
+ if (!st_lookup(rb_global_tbl, id, (st_data_t *)&entry)) {
38
+ struct global_variable *var;
39
+ entry = ALLOC(struct global_entry);
40
+ var = ALLOC(struct global_variable);
41
+ entry->id = id;
42
+ entry->var = var;
43
+ var->counter = 1;
44
+ var->data = 0;
45
+ var->getter = undef_getter;
46
+ var->setter = undef_setter;
47
+ var->marker = undef_marker;
48
+
49
+ var->block_trace = 0;
50
+ var->trace = 0;
51
+ st_add_direct(rb_global_tbl, id, (st_data_t)entry);
52
+ }
53
+ return entry;
54
+ }
55
+ static VALUE
56
+ undef_getter(id)
57
+ ID id;
58
+ {
59
+ rb_warning("global variable `%s' not initialized", rb_id2name(id));
60
+
61
+ return Qnil;
62
+ }
63
+ static void
64
+ undef_setter(val, id, data, var)
65
+ VALUE val;
66
+ ID id;
67
+ void *data;
68
+ struct global_variable *var;
69
+ {
70
+ var->getter = val_getter;
71
+ var->setter = val_setter;
72
+ var->marker = val_marker;
73
+
74
+ var->data = (void*)val;
75
+ }
76
+ static void
77
+ undef_marker()
78
+ {
79
+ }
80
+ static VALUE
81
+ val_getter(id, val)
82
+ ID id;
83
+ VALUE val;
84
+ {
85
+ return val;
86
+ }
87
+ static void
88
+ val_setter(val, id, data, var)
89
+ VALUE val;
90
+ ID id;
91
+ void *data;
92
+ struct global_variable *var;
93
+ {
94
+ var->data = (void*)val;
95
+ }
96
+ static void
97
+ val_marker(data)
98
+ VALUE data;
99
+ {
100
+ if (data) rb_gc_mark_maybe(data);
101
+ }
8
102
 
9
103
  #endif
10
104
 
@@ -4,42 +4,42 @@
4
4
  Node_Type_Descrip node_type_descrips_unsorted[] = {
5
5
  { NODE_ALIAS, NEN_1ST, NEN_2ND, NEN_NONE, "ALIAS" },
6
6
  #ifdef HAVE_NODE_ALLOCA
7
- { NODE_ALLOCA, NEN_CFNC, NEN_VALUE, NEN_CNT, "ALLOCA" },
7
+ { NODE_ALLOCA, NEN_VALUE, NEN_CFNC, NEN_CNT, "ALLOCA" },
8
8
  #endif
9
9
  { NODE_AND, NEN_1ST, NEN_2ND, NEN_NONE, "AND" },
10
10
  { NODE_ARGS, NEN_REST, NEN_OPT, NEN_CNT, "ARGS" },
11
11
  { NODE_ARGSCAT, NEN_HEAD, NEN_BODY, NEN_NONE, "ARGSCAT" },
12
12
  { NODE_ARGSPUSH, NEN_HEAD, NEN_BODY, NEN_NONE, "ARGSPUSH" },
13
- { NODE_ARRAY, NEN_HEAD, NEN_ALEN, NEN_NEXT, "ARRAY" },
14
- { NODE_ATTRASGN, NEN_ARGS, NEN_MID, NEN_RECV, "ATTRASGN" },
13
+ { NODE_ARRAY, NEN_ALEN, NEN_NEXT, NEN_HEAD, "ARRAY" },
14
+ { NODE_ATTRASGN, NEN_RECV, NEN_MID, NEN_ARGS, "ATTRASGN" },
15
15
  { NODE_ATTRSET, NEN_VID, NEN_NONE, NEN_NONE, "ATTRSET" },
16
16
  { NODE_BACK_REF, NEN_NTH, NEN_CNT, NEN_NONE, "BACK_REF" },
17
17
  { NODE_BEGIN, NEN_BODY, NEN_NONE, NEN_NONE, "BEGIN" },
18
- { NODE_BLOCK, NEN_HEAD, NEN_NEXT, NEN_NONE, "BLOCK" },
18
+ { NODE_BLOCK, NEN_NEXT, NEN_HEAD, NEN_NONE, "BLOCK" },
19
19
  { NODE_BLOCK_ARG, NEN_CNT, NEN_NONE, NEN_NONE, "BLOCK_ARG" },
20
- { NODE_BLOCK_PASS, NEN_BODY, NEN_ITER, NEN_NONE, "BLOCK_PASS" },
20
+ { NODE_BLOCK_PASS, NEN_ITER, NEN_BODY, NEN_NONE, "BLOCK_PASS" },
21
21
  { NODE_BMETHOD, NEN_CVAL, NEN_NONE, NEN_NONE, "BMETHOD" },
22
22
  { NODE_BREAK, NEN_STTS, NEN_NONE, NEN_NONE, "BREAK" },
23
- { NODE_CALL, NEN_ARGS, NEN_MID, NEN_RECV, "CALL" },
24
- { NODE_CASE, NEN_HEAD, NEN_BODY, NEN_NEXT, "CASE" },
25
- { NODE_CDECL, NEN_VALUE, NEN_VID, NEN_NONE, "CDECL" },
26
- { NODE_CFUNC, NEN_CFNC, NEN_ARGC, NEN_NONE, "CFUNC" },
27
- { NODE_CLASS, NEN_CPATH, NEN_BODY, NEN_SUPER, "CLASS" },
28
- { NODE_COLON2, NEN_HEAD, NEN_MID, NEN_NONE, "COLON2" },
23
+ { NODE_CALL, NEN_MID, NEN_RECV, NEN_ARGS, "CALL" },
24
+ { NODE_CASE, NEN_NEXT, NEN_HEAD, NEN_BODY, "CASE" },
25
+ { NODE_CDECL, NEN_VID, NEN_VALUE, NEN_NONE, "CDECL" },
26
+ { NODE_CFUNC, NEN_ARGC, NEN_CFNC, NEN_NONE, "CFUNC" },
27
+ { NODE_CLASS, NEN_CPATH, NEN_SUPER, NEN_BODY, "CLASS" },
28
+ { NODE_COLON2, NEN_MID, NEN_HEAD, NEN_NONE, "COLON2" },
29
29
  { NODE_COLON3, NEN_MID, NEN_NONE, NEN_NONE, "COLON3" },
30
30
  { NODE_CONST, NEN_VID, NEN_NONE, NEN_NONE, "CONST" },
31
- { NODE_CREF, NEN_BODY, NEN_NEXT, NEN_CLSS, "CREF" },
31
+ { NODE_CREF, NEN_CLSS, NEN_NEXT, NEN_BODY, "CREF" },
32
32
  { NODE_CVAR, NEN_VID, NEN_NONE, NEN_NONE, "CVAR" },
33
- { NODE_CVASGN, NEN_VALUE, NEN_VID, NEN_NONE, "CVASGN" },
34
- { NODE_CVDECL, NEN_VALUE, NEN_VID, NEN_NONE, "CVDECL" },
35
- { NODE_DASGN, NEN_VALUE, NEN_VID, NEN_NONE, "DASGN" },
36
- { NODE_DASGN_CURR, NEN_VALUE, NEN_VID, NEN_NONE, "DASGN_CURR" },
33
+ { NODE_CVASGN, NEN_VID, NEN_VALUE, NEN_NONE, "CVASGN" },
34
+ { NODE_CVDECL, NEN_VID, NEN_VALUE, NEN_NONE, "CVDECL" },
35
+ { NODE_DASGN, NEN_VID, NEN_VALUE, NEN_NONE, "DASGN" },
36
+ { NODE_DASGN_CURR, NEN_VID, NEN_VALUE, NEN_NONE, "DASGN_CURR" },
37
37
  { NODE_DEFINED, NEN_HEAD, NEN_NONE, NEN_NONE, "DEFINED" },
38
38
  { NODE_DEFN, NEN_DEFN, NEN_MID, NEN_NOEX, "DEFN" },
39
- { NODE_DEFS, NEN_DEFN, NEN_MID, NEN_RECV, "DEFS" },
39
+ { NODE_DEFS, NEN_DEFN, NEN_RECV, NEN_MID, "DEFS" },
40
40
  { NODE_DMETHOD, NEN_CVAL, NEN_NONE, NEN_NONE, "DMETHOD" },
41
- { NODE_DOT2, NEN_BEG, NEN_END, NEN_STATE, "DOT2" },
42
- { NODE_DOT3, NEN_BEG, NEN_END, NEN_STATE, "DOT3" },
41
+ { NODE_DOT2, NEN_END, NEN_BEG, NEN_STATE, "DOT2" },
42
+ { NODE_DOT3, NEN_END, NEN_BEG, NEN_STATE, "DOT3" },
43
43
  { NODE_DREGX, NEN_LIT, NEN_CFLAG, NEN_NEXT, "DREGX" },
44
44
  { NODE_DREGX_ONCE, NEN_LIT, NEN_CFLAG, NEN_NEXT, "DREGX_ONCE" },
45
45
  { NODE_DSTR, NEN_LIT, NEN_NEXT, NEN_NONE, "DSTR" },
@@ -49,28 +49,28 @@ Node_Type_Descrip node_type_descrips_unsorted[] = {
49
49
  { NODE_ENSURE, NEN_HEAD, NEN_ENSR, NEN_NONE, "ENSURE" },
50
50
  { NODE_EVSTR, NEN_BODY, NEN_NONE, NEN_NONE, "EVSTR" },
51
51
  { NODE_FALSE, NEN_NONE, NEN_NONE, NEN_NONE, "FALSE" },
52
- { NODE_FBODY, NEN_HEAD, NEN_ORIG, NEN_MID, "FBODY" },
53
- { NODE_FCALL, NEN_ARGS, NEN_MID, NEN_NONE, "FCALL" },
54
- { NODE_FLIP2, NEN_BEG, NEN_END, NEN_CNT, "FLIP2" },
55
- { NODE_FLIP3, NEN_BEG, NEN_END, NEN_CNT, "FLIP3" },
56
- { NODE_FOR, NEN_BODY, NEN_ITER, NEN_VAR, "FOR" },
57
- { NODE_GASGN, NEN_VALUE, NEN_VID, NEN_ENTRY, "GASGN" },
52
+ { NODE_FBODY, NEN_MID, NEN_ORIG, NEN_HEAD, "FBODY" },
53
+ { NODE_FCALL, NEN_MID, NEN_ARGS, NEN_NONE, "FCALL" },
54
+ { NODE_FLIP2, NEN_END, NEN_BEG, NEN_CNT, "FLIP2" },
55
+ { NODE_FLIP3, NEN_END, NEN_BEG, NEN_CNT, "FLIP3" },
56
+ { NODE_FOR, NEN_ITER, NEN_VAR, NEN_BODY, "FOR" },
57
+ { NODE_GASGN, NEN_VID, NEN_ENTRY, NEN_VALUE, "GASGN" },
58
58
  { NODE_GVAR, NEN_VID, NEN_ENTRY, NEN_NONE, "GVAR" },
59
59
  { NODE_HASH, NEN_HEAD, NEN_NONE, NEN_NONE, "HASH" },
60
- { NODE_IASGN, NEN_VALUE, NEN_VID, NEN_NONE, "IASGN" },
60
+ { NODE_IASGN, NEN_VID, NEN_VALUE, NEN_NONE, "IASGN" },
61
61
  { NODE_IF, NEN_COND, NEN_BODY, NEN_ELSE, "IF" },
62
- { NODE_IFUNC, NEN_CFNC, NEN_TVAL, NEN_STATE, "IFUNC" },
63
- { NODE_ITER, NEN_BODY, NEN_ITER, NEN_VAR, "ITER" },
62
+ { NODE_IFUNC, NEN_STATE, NEN_TVAL, NEN_CFNC, "IFUNC" },
63
+ { NODE_ITER, NEN_ITER, NEN_VAR, NEN_BODY, "ITER" },
64
64
  { NODE_IVAR, NEN_VID, NEN_NONE, NEN_NONE, "IVAR" },
65
- { NODE_LASGN, NEN_VALUE, NEN_VID, NEN_CNT, "LASGN" },
65
+ { NODE_LASGN, NEN_VID, NEN_VALUE, NEN_CNT, "LASGN" },
66
66
  { NODE_LIT, NEN_LIT, NEN_NONE, NEN_NONE, "LIT" },
67
67
  { NODE_LVAR, NEN_VID, NEN_CNT, NEN_NONE, "LVAR" },
68
- { NODE_MASGN, NEN_ARGS, NEN_HEAD, NEN_VALUE, "MASGN" },
68
+ { NODE_MASGN, NEN_ARGS, NEN_VALUE, NEN_HEAD, "MASGN" },
69
69
  { NODE_MATCH, NEN_LIT, NEN_VALUE, NEN_NONE, "MATCH" },
70
- { NODE_MATCH2, NEN_VALUE, NEN_RECV, NEN_NONE, "MATCH2" },
71
- { NODE_MATCH3, NEN_VALUE, NEN_RECV, NEN_NONE, "MATCH3" },
70
+ { NODE_MATCH2, NEN_RECV, NEN_VALUE, NEN_NONE, "MATCH2" },
71
+ { NODE_MATCH3, NEN_RECV, NEN_VALUE, NEN_NONE, "MATCH3" },
72
72
  { NODE_MEMO, NEN_NONE, NEN_NONE, NEN_NONE, "MEMO" },
73
- { NODE_METHOD, NEN_BODY, NEN_NOEX, NEN_NONE, "METHOD" },
73
+ { NODE_METHOD, NEN_NOEX, NEN_BODY, NEN_NONE, "METHOD" },
74
74
  { NODE_MODULE, NEN_CPATH, NEN_BODY, NEN_NONE, "MODULE" },
75
75
  { NODE_NEWLINE, NEN_NEXT, NEN_NONE, NEN_NONE, "NEWLINE" },
76
76
  { NODE_NEXT, NEN_STTS, NEN_NONE, NEN_NONE, "NEXT" },
@@ -78,19 +78,19 @@ Node_Type_Descrip node_type_descrips_unsorted[] = {
78
78
  { NODE_NOT, NEN_BODY, NEN_NONE, NEN_NONE, "NOT" },
79
79
  { NODE_NTH_REF, NEN_NTH, NEN_CNT, NEN_NONE, "NTH_REF" },
80
80
  { NODE_OPT_N, NEN_BODY, NEN_NONE, NEN_NONE, "OPT_N" },
81
- { NODE_OP_ASGN1, NEN_ARGS, NEN_MID, NEN_RECV, "OP_ASGN1" },
82
- { NODE_OP_ASGN2, NEN_VALUE, NEN_NEXT, NEN_RECV, "OP_ASGN2" },
83
- { NODE_OP_ASGN2_ARG, NEN_VID, NEN_AID, NEN_MID, "OP_ASGN2_ARG" },
84
- { NODE_OP_ASGN_AND, NEN_VALUE, NEN_RECV, NEN_NONE, "OP_ASGN_AND" },
85
- { NODE_OP_ASGN_OR, NEN_AID, NEN_VALUE, NEN_RECV, "OP_ASGN_OR" },
81
+ { NODE_OP_ASGN1, NEN_MID, NEN_RECV, NEN_ARGS, "OP_ASGN1" },
82
+ { NODE_OP_ASGN2, NEN_RECV, NEN_NEXT, NEN_VALUE, "OP_ASGN2" },
83
+ { NODE_OP_ASGN2_ARG, NEN_MID, NEN_VID, NEN_AID, "OP_ASGN2_ARG" },
84
+ { NODE_OP_ASGN_AND, NEN_RECV, NEN_VALUE, NEN_NONE, "OP_ASGN_AND" },
85
+ { NODE_OP_ASGN_OR, NEN_RECV, NEN_AID, NEN_VALUE, "OP_ASGN_OR" },
86
86
  { NODE_OR, NEN_1ST, NEN_2ND, NEN_NONE, "OR" },
87
87
  { NODE_POSTEXE, NEN_NONE, NEN_NONE, NEN_NONE, "POSTEXE" },
88
88
  { NODE_REDO, NEN_NONE, NEN_NONE, NEN_NONE, "REDO" },
89
- { NODE_RESBODY, NEN_HEAD, NEN_ARGS, NEN_BODY, "RESBODY" },
90
- { NODE_RESCUE, NEN_HEAD, NEN_ELSE, NEN_RESQ, "RESCUE" },
89
+ { NODE_RESBODY, NEN_ARGS, NEN_HEAD, NEN_BODY, "RESBODY" },
90
+ { NODE_RESCUE, NEN_RESQ, NEN_HEAD, NEN_ELSE, "RESCUE" },
91
91
  { NODE_RETRY, NEN_NONE, NEN_NONE, NEN_NONE, "RETRY" },
92
92
  { NODE_RETURN, NEN_STTS, NEN_NONE, NEN_NONE, "RETURN" },
93
- { NODE_SCLASS, NEN_BODY, NEN_RECV, NEN_NONE, "SCLASS" },
93
+ { NODE_SCLASS, NEN_RECV, NEN_BODY, NEN_NONE, "SCLASS" },
94
94
  { NODE_SCOPE, NEN_TBL, NEN_RVAL, NEN_NEXT, "SCOPE" },
95
95
  { NODE_SELF, NEN_NONE, NEN_NONE, NEN_NONE, "SELF" },
96
96
  { NODE_SPLAT, NEN_HEAD, NEN_NONE, NEN_NONE, "SPLAT" },
@@ -100,13 +100,13 @@ Node_Type_Descrip node_type_descrips_unsorted[] = {
100
100
  { NODE_TO_ARY, NEN_HEAD, NEN_NONE, NEN_NONE, "TO_ARY" },
101
101
  { NODE_TRUE, NEN_NONE, NEN_NONE, NEN_NONE, "TRUE" },
102
102
  { NODE_UNDEF, NEN_BODY, NEN_NONE, NEN_NONE, "UNDEF" },
103
- { NODE_UNTIL, NEN_BODY, NEN_COND, NEN_STATE, "UNTIL" },
103
+ { NODE_UNTIL, NEN_COND, NEN_STATE, NEN_BODY, "UNTIL" },
104
104
  { NODE_VALIAS, NEN_1ST, NEN_2ND, NEN_NONE, "VALIAS" },
105
105
  { NODE_VCALL, NEN_MID, NEN_NONE, NEN_NONE, "VCALL" },
106
- { NODE_WHEN, NEN_HEAD, NEN_BODY, NEN_NEXT, "WHEN" },
107
- { NODE_WHILE, NEN_BODY, NEN_COND, NEN_STATE, "WHILE" },
106
+ { NODE_WHEN, NEN_NEXT, NEN_HEAD, NEN_BODY, "WHEN" },
107
+ { NODE_WHILE, NEN_COND, NEN_STATE, NEN_BODY, "WHILE" },
108
108
  { NODE_XSTR, NEN_LIT, NEN_NONE, NEN_NONE, "XSTR" },
109
- { NODE_YIELD, NEN_HEAD, NEN_STATE, NEN_NONE, "YIELD" },
109
+ { NODE_YIELD, NEN_STATE, NEN_HEAD, NEN_NONE, "YIELD" },
110
110
  { NODE_ZARRAY, NEN_NONE, NEN_NONE, NEN_NONE, "ZARRAY" },
111
111
  { NODE_ZSUPER, NEN_NONE, NEN_NONE, NEN_NONE, "ZSUPER" },
112
112
  { NODE_LAST, NEN_NONE, NEN_NONE, NEN_NONE, "LAST" },
@@ -228,7 +228,7 @@ VALUE dump_node_elem(enum Node_Elem_Name nen, NODE * n, VALUE node_hash)
228
228
  else
229
229
  {
230
230
  path = rb_class_path(klass);
231
- if(STR2CSTR(path)[0] == '#')
231
+ if(StringValuePtr(path)[0] == '#')
232
232
  {
233
233
  rb_raise(rb_eArgError, "cannot dump anonymous class");
234
234
  }
@@ -322,7 +322,7 @@ VALUE dump_node_elem(enum Node_Elem_Name nen, NODE * n, VALUE node_hash)
322
322
  else
323
323
  {
324
324
  path = rb_class_path(klass);
325
- if(STR2CSTR(path)[0] == '#')
325
+ if(StringValuePtr(path)[0] == '#')
326
326
  {
327
327
  rb_raise(rb_eArgError, "cannot dump anonymous class");
328
328
  }
@@ -565,7 +565,7 @@ VALUE dump_node_elem(enum Node_Elem_Name nen, NODE * n, VALUE node_hash)
565
565
  else
566
566
  {
567
567
  path = rb_class_path(klass);
568
- if(STR2CSTR(path)[0] == '#')
568
+ if(StringValuePtr(path)[0] == '#')
569
569
  {
570
570
  rb_raise(rb_eArgError, "cannot dump anonymous class");
571
571
  }
@@ -689,7 +689,7 @@ VALUE dump_node_elem(enum Node_Elem_Name nen, NODE * n, VALUE node_hash)
689
689
  else
690
690
  {
691
691
  path = rb_class_path(klass);
692
- if(STR2CSTR(path)[0] == '#')
692
+ if(StringValuePtr(path)[0] == '#')
693
693
  {
694
694
  rb_raise(rb_eArgError, "cannot dump anonymous class");
695
695
  }
@@ -897,7 +897,7 @@ VALUE dump_node_elem(enum Node_Elem_Name nen, NODE * n, VALUE node_hash)
897
897
  else
898
898
  {
899
899
  path = rb_class_path(klass);
900
- if(STR2CSTR(path)[0] == '#')
900
+ if(StringValuePtr(path)[0] == '#')
901
901
  {
902
902
  rb_raise(rb_eArgError, "cannot dump anonymous class");
903
903
  }
@@ -1152,20 +1152,23 @@ void load_node_elem(enum Node_Elem_Name nen, VALUE v, NODE * n, VALUE node_hash,
1152
1152
  }
1153
1153
  case NEN_CLSS:
1154
1154
  {
1155
+ int flags;
1155
1156
  Check_Type(v, T_ARRAY);
1156
1157
  if(RARRAY_LEN(v) != 2)
1157
1158
  {
1158
1159
  rb_raise(rb_eArgError, "wrong size for array");
1159
1160
  }
1160
- int flags = NUM2INT(RARRAY_PTR(v)[0]);
1161
+ flags = NUM2INT(RARRAY_PTR(v)[0]);
1161
1162
  switch(flags & T_MASK)
1162
1163
  {
1163
1164
  case T_CLASS:
1164
1165
  case T_MODULE:
1165
1166
  {
1166
- VALUE str = RARRAY_PTR(v)[1];
1167
+ VALUE str, klass;
1168
+
1169
+ str = RARRAY_PTR(v)[1];
1167
1170
  Check_Type(str, T_STRING);
1168
- VALUE klass = rb_path2class(STR2CSTR(str));
1171
+ klass = rb_path2class(StringValuePtr(str));
1169
1172
  if(flags & FL_SINGLETON)
1170
1173
  {
1171
1174
  *(VALUE *)(&n->nd_clss) =
@@ -1241,20 +1244,23 @@ void load_node_elem(enum Node_Elem_Name nen, VALUE v, NODE * n, VALUE node_hash,
1241
1244
  }
1242
1245
  case NEN_CVAL:
1243
1246
  {
1247
+ int flags;
1244
1248
  Check_Type(v, T_ARRAY);
1245
1249
  if(RARRAY_LEN(v) != 2)
1246
1250
  {
1247
1251
  rb_raise(rb_eArgError, "wrong size for array");
1248
1252
  }
1249
- int flags = NUM2INT(RARRAY_PTR(v)[0]);
1253
+ flags = NUM2INT(RARRAY_PTR(v)[0]);
1250
1254
  switch(flags & T_MASK)
1251
1255
  {
1252
1256
  case T_CLASS:
1253
1257
  case T_MODULE:
1254
1258
  {
1255
- VALUE str = RARRAY_PTR(v)[1];
1259
+ VALUE str, klass;
1260
+
1261
+ str = RARRAY_PTR(v)[1];
1256
1262
  Check_Type(str, T_STRING);
1257
- VALUE klass = rb_path2class(STR2CSTR(str));
1263
+ klass = rb_path2class(StringValuePtr(str));
1258
1264
  if(flags & FL_SINGLETON)
1259
1265
  {
1260
1266
  *(VALUE *)(&n->nd_cval) =
@@ -1480,20 +1486,23 @@ void load_node_elem(enum Node_Elem_Name nen, VALUE v, NODE * n, VALUE node_hash,
1480
1486
  }
1481
1487
  case NEN_LIT:
1482
1488
  {
1489
+ int flags;
1483
1490
  Check_Type(v, T_ARRAY);
1484
1491
  if(RARRAY_LEN(v) != 2)
1485
1492
  {
1486
1493
  rb_raise(rb_eArgError, "wrong size for array");
1487
1494
  }
1488
- int flags = NUM2INT(RARRAY_PTR(v)[0]);
1495
+ flags = NUM2INT(RARRAY_PTR(v)[0]);
1489
1496
  switch(flags & T_MASK)
1490
1497
  {
1491
1498
  case T_CLASS:
1492
1499
  case T_MODULE:
1493
1500
  {
1494
- VALUE str = RARRAY_PTR(v)[1];
1501
+ VALUE str, klass;
1502
+
1503
+ str = RARRAY_PTR(v)[1];
1495
1504
  Check_Type(str, T_STRING);
1496
- VALUE klass = rb_path2class(STR2CSTR(str));
1505
+ klass = rb_path2class(StringValuePtr(str));
1497
1506
  if(flags & FL_SINGLETON)
1498
1507
  {
1499
1508
  *(VALUE *)(&n->nd_lit) =
@@ -1606,20 +1615,23 @@ void load_node_elem(enum Node_Elem_Name nen, VALUE v, NODE * n, VALUE node_hash,
1606
1615
  }
1607
1616
  case NEN_ORIG:
1608
1617
  {
1618
+ int flags;
1609
1619
  Check_Type(v, T_ARRAY);
1610
1620
  if(RARRAY_LEN(v) != 2)
1611
1621
  {
1612
1622
  rb_raise(rb_eArgError, "wrong size for array");
1613
1623
  }
1614
- int flags = NUM2INT(RARRAY_PTR(v)[0]);
1624
+ flags = NUM2INT(RARRAY_PTR(v)[0]);
1615
1625
  switch(flags & T_MASK)
1616
1626
  {
1617
1627
  case T_CLASS:
1618
1628
  case T_MODULE:
1619
1629
  {
1620
- VALUE str = RARRAY_PTR(v)[1];
1630
+ VALUE str, klass;
1631
+
1632
+ str = RARRAY_PTR(v)[1];
1621
1633
  Check_Type(str, T_STRING);
1622
- VALUE klass = rb_path2class(STR2CSTR(str));
1634
+ klass = rb_path2class(StringValuePtr(str));
1623
1635
  if(flags & FL_SINGLETON)
1624
1636
  {
1625
1637
  *(VALUE *)(&n->nd_orig) =
@@ -1846,20 +1858,23 @@ void load_node_elem(enum Node_Elem_Name nen, VALUE v, NODE * n, VALUE node_hash,
1846
1858
  }
1847
1859
  case NEN_TVAL:
1848
1860
  {
1861
+ int flags;
1849
1862
  Check_Type(v, T_ARRAY);
1850
1863
  if(RARRAY_LEN(v) != 2)
1851
1864
  {
1852
1865
  rb_raise(rb_eArgError, "wrong size for array");
1853
1866
  }
1854
- int flags = NUM2INT(RARRAY_PTR(v)[0]);
1867
+ flags = NUM2INT(RARRAY_PTR(v)[0]);
1855
1868
  switch(flags & T_MASK)
1856
1869
  {
1857
1870
  case T_CLASS:
1858
1871
  case T_MODULE:
1859
1872
  {
1860
- VALUE str = RARRAY_PTR(v)[1];
1873
+ VALUE str, klass;
1874
+
1875
+ str = RARRAY_PTR(v)[1];
1861
1876
  Check_Type(str, T_STRING);
1862
- VALUE klass = rb_path2class(STR2CSTR(str));
1877
+ klass = rb_path2class(StringValuePtr(str));
1863
1878
  if(flags & FL_SINGLETON)
1864
1879
  {
1865
1880
  *(VALUE *)(&n->nd_tval) =
@@ -2931,18 +2946,18 @@ void define_node_subclass_methods()
2931
2946
  rb_iv_set(rb_cALLOCA, "__type__", INT2NUM(NODE_ALLOCA));
2932
2947
  rb_define_singleton_method(rb_cALLOCA, "members", node_s_members, 0);
2933
2948
 
2934
- /* Document-method: cfnc
2935
- * a pointer to the allocated memory
2936
- */
2937
- rb_define_method(rb_cALLOCA, "cfnc", node_cfnc, 0);
2938
- rb_ary_push(members, rb_str_new2("cfnc"));
2939
-
2940
2949
  /* Document-method: value
2941
2950
  * a pointer to the previously allocated temporary node
2942
2951
  */
2943
2952
  rb_define_method(rb_cALLOCA, "value", node_value, 0);
2944
2953
  rb_ary_push(members, rb_str_new2("value"));
2945
2954
 
2955
+ /* Document-method: cfnc
2956
+ * a pointer to the allocated memory
2957
+ */
2958
+ rb_define_method(rb_cALLOCA, "cfnc", node_cfnc, 0);
2959
+ rb_ary_push(members, rb_str_new2("cfnc"));
2960
+
2946
2961
  /* Document-method: cnt
2947
2962
  * the number of bytes allocated
2948
2963
  */
@@ -3073,12 +3088,6 @@ void define_node_subclass_methods()
3073
3088
  rb_iv_set(rb_cARRAY, "__member__", members);
3074
3089
  rb_iv_set(rb_cARRAY, "__type__", INT2NUM(NODE_ARRAY));
3075
3090
  rb_define_singleton_method(rb_cARRAY, "members", node_s_members, 0);
3076
-
3077
- /* Document-method: head
3078
- * the first element of the array
3079
- */
3080
- rb_define_method(rb_cARRAY, "head", node_head, 0);
3081
- rb_ary_push(members, rb_str_new2("head"));
3082
3091
  rb_define_method(rb_cARRAY, "alen", node_alen, 0);
3083
3092
  rb_ary_push(members, rb_str_new2("alen"));
3084
3093
 
@@ -3087,6 +3096,12 @@ void define_node_subclass_methods()
3087
3096
  */
3088
3097
  rb_define_method(rb_cARRAY, "next", node_next, 0);
3089
3098
  rb_ary_push(members, rb_str_new2("next"));
3099
+
3100
+ /* Document-method: head
3101
+ * the first element of the array
3102
+ */
3103
+ rb_define_method(rb_cARRAY, "head", node_head, 0);
3104
+ rb_ary_push(members, rb_str_new2("head"));
3090
3105
  }
3091
3106
 
3092
3107
  /* Document-class: Node::ATTRASGN
@@ -3103,11 +3118,11 @@ void define_node_subclass_methods()
3103
3118
  rb_iv_set(rb_cATTRASGN, "__type__", INT2NUM(NODE_ATTRASGN));
3104
3119
  rb_define_singleton_method(rb_cATTRASGN, "members", node_s_members, 0);
3105
3120
 
3106
- /* Document-method: args
3107
- * the arguments to the method
3121
+ /* Document-method: recv
3122
+ * the receiver of the method
3108
3123
  */
3109
- rb_define_method(rb_cATTRASGN, "args", node_args, 0);
3110
- rb_ary_push(members, rb_str_new2("args"));
3124
+ rb_define_method(rb_cATTRASGN, "recv", node_recv, 0);
3125
+ rb_ary_push(members, rb_str_new2("recv"));
3111
3126
 
3112
3127
  /* Document-method: mid
3113
3128
  * the id of the attribute, with a trailing '=' sign
@@ -3115,11 +3130,11 @@ void define_node_subclass_methods()
3115
3130
  rb_define_method(rb_cATTRASGN, "mid", node_mid, 0);
3116
3131
  rb_ary_push(members, rb_str_new2("mid"));
3117
3132
 
3118
- /* Document-method: recv
3119
- * the receiver of the method
3133
+ /* Document-method: args
3134
+ * the arguments to the method
3120
3135
  */
3121
- rb_define_method(rb_cATTRASGN, "recv", node_recv, 0);
3122
- rb_ary_push(members, rb_str_new2("recv"));
3136
+ rb_define_method(rb_cATTRASGN, "args", node_args, 0);
3137
+ rb_ary_push(members, rb_str_new2("args"));
3123
3138
  }
3124
3139
 
3125
3140
  /* Document-class: Node::ATTRSET
@@ -3207,17 +3222,17 @@ void define_node_subclass_methods()
3207
3222
  rb_iv_set(rb_cBLOCK, "__type__", INT2NUM(NODE_BLOCK));
3208
3223
  rb_define_singleton_method(rb_cBLOCK, "members", node_s_members, 0);
3209
3224
 
3210
- /* Document-method: head
3211
- * the first expression in the block of code
3212
- */
3213
- rb_define_method(rb_cBLOCK, "head", node_head, 0);
3214
- rb_ary_push(members, rb_str_new2("head"));
3215
-
3216
3225
  /* Document-method: next
3217
3226
  * the second expression in the block of code
3218
3227
  */
3219
3228
  rb_define_method(rb_cBLOCK, "next", node_next, 0);
3220
3229
  rb_ary_push(members, rb_str_new2("next"));
3230
+
3231
+ /* Document-method: head
3232
+ * the first expression in the block of code
3233
+ */
3234
+ rb_define_method(rb_cBLOCK, "head", node_head, 0);
3235
+ rb_ary_push(members, rb_str_new2("head"));
3221
3236
  }
3222
3237
 
3223
3238
  /* Document-class: Node::BLOCK_ARG
@@ -3258,17 +3273,17 @@ void define_node_subclass_methods()
3258
3273
  rb_iv_set(rb_cBLOCK_PASS, "__type__", INT2NUM(NODE_BLOCK_PASS));
3259
3274
  rb_define_singleton_method(rb_cBLOCK_PASS, "members", node_s_members, 0);
3260
3275
 
3261
- /* Document-method: body
3262
- * the object to pass as a block
3263
- */
3264
- rb_define_method(rb_cBLOCK_PASS, "body", node_body, 0);
3265
- rb_ary_push(members, rb_str_new2("body"));
3266
-
3267
3276
  /* Document-method: iter
3268
3277
  * an expression which calls a method
3269
3278
  */
3270
3279
  rb_define_method(rb_cBLOCK_PASS, "iter", node_iter, 0);
3271
3280
  rb_ary_push(members, rb_str_new2("iter"));
3281
+
3282
+ /* Document-method: body
3283
+ * the object to pass as a block
3284
+ */
3285
+ rb_define_method(rb_cBLOCK_PASS, "body", node_body, 0);
3286
+ rb_ary_push(members, rb_str_new2("body"));
3272
3287
  }
3273
3288
 
3274
3289
  /* Document-class: Node::BMETHOD
@@ -3325,12 +3340,6 @@ void define_node_subclass_methods()
3325
3340
  rb_iv_set(rb_cCALL, "__type__", INT2NUM(NODE_CALL));
3326
3341
  rb_define_singleton_method(rb_cCALL, "members", node_s_members, 0);
3327
3342
 
3328
- /* Document-method: args
3329
- * the arguments to the method
3330
- */
3331
- rb_define_method(rb_cCALL, "args", node_args, 0);
3332
- rb_ary_push(members, rb_str_new2("args"));
3333
-
3334
3343
  /* Document-method: mid
3335
3344
  * the method id
3336
3345
  */
@@ -3342,6 +3351,12 @@ void define_node_subclass_methods()
3342
3351
  */
3343
3352
  rb_define_method(rb_cCALL, "recv", node_recv, 0);
3344
3353
  rb_ary_push(members, rb_str_new2("recv"));
3354
+
3355
+ /* Document-method: args
3356
+ * the arguments to the method
3357
+ */
3358
+ rb_define_method(rb_cCALL, "args", node_args, 0);
3359
+ rb_ary_push(members, rb_str_new2("args"));
3345
3360
  }
3346
3361
 
3347
3362
  /* Document-class: Node::CASE
@@ -3358,6 +3373,8 @@ void define_node_subclass_methods()
3358
3373
  rb_iv_set(rb_cCASE, "__member__", members);
3359
3374
  rb_iv_set(rb_cCASE, "__type__", INT2NUM(NODE_CASE));
3360
3375
  rb_define_singleton_method(rb_cCASE, "members", node_s_members, 0);
3376
+ rb_define_method(rb_cCASE, "next", node_next, 0);
3377
+ rb_ary_push(members, rb_str_new2("next"));
3361
3378
 
3362
3379
  /* Document-method: head
3363
3380
  * the value to select on
@@ -3371,8 +3388,6 @@ void define_node_subclass_methods()
3371
3388
  */
3372
3389
  rb_define_method(rb_cCASE, "body", node_body, 0);
3373
3390
  rb_ary_push(members, rb_str_new2("body"));
3374
- rb_define_method(rb_cCASE, "next", node_next, 0);
3375
- rb_ary_push(members, rb_str_new2("next"));
3376
3391
  }
3377
3392
 
3378
3393
  /* Document-class: Node::CDECL
@@ -3387,17 +3402,17 @@ void define_node_subclass_methods()
3387
3402
  rb_iv_set(rb_cCDECL, "__type__", INT2NUM(NODE_CDECL));
3388
3403
  rb_define_singleton_method(rb_cCDECL, "members", node_s_members, 0);
3389
3404
 
3390
- /* Document-method: value
3391
- * the value to be assigned to the constant
3392
- */
3393
- rb_define_method(rb_cCDECL, "value", node_value, 0);
3394
- rb_ary_push(members, rb_str_new2("value"));
3395
-
3396
3405
  /* Document-method: vid
3397
3406
  * the name of the constant to be assigned, all uppercase
3398
3407
  */
3399
3408
  rb_define_method(rb_cCDECL, "vid", node_vid, 0);
3400
3409
  rb_ary_push(members, rb_str_new2("vid"));
3410
+
3411
+ /* Document-method: value
3412
+ * the value to be assigned to the constant
3413
+ */
3414
+ rb_define_method(rb_cCDECL, "value", node_value, 0);
3415
+ rb_ary_push(members, rb_str_new2("value"));
3401
3416
  }
3402
3417
 
3403
3418
  /* Document-class: Node::CFUNC
@@ -3410,10 +3425,10 @@ void define_node_subclass_methods()
3410
3425
  rb_iv_set(rb_cCFUNC, "__member__", members);
3411
3426
  rb_iv_set(rb_cCFUNC, "__type__", INT2NUM(NODE_CFUNC));
3412
3427
  rb_define_singleton_method(rb_cCFUNC, "members", node_s_members, 0);
3413
- rb_define_method(rb_cCFUNC, "cfnc", node_cfnc, 0);
3414
- rb_ary_push(members, rb_str_new2("cfnc"));
3415
3428
  rb_define_method(rb_cCFUNC, "argc", node_argc, 0);
3416
3429
  rb_ary_push(members, rb_str_new2("argc"));
3430
+ rb_define_method(rb_cCFUNC, "cfnc", node_cfnc, 0);
3431
+ rb_ary_push(members, rb_str_new2("cfnc"));
3417
3432
  }
3418
3433
 
3419
3434
  /* Document-class: Node::CLASS
@@ -3446,18 +3461,18 @@ void define_node_subclass_methods()
3446
3461
  rb_define_method(rb_cCLASS, "cpath", node_cpath, 0);
3447
3462
  rb_ary_push(members, rb_str_new2("cpath"));
3448
3463
 
3449
- /* Document-method: body
3450
- * the body of the class definition
3451
- */
3452
- rb_define_method(rb_cCLASS, "body", node_body, 0);
3453
- rb_ary_push(members, rb_str_new2("body"));
3454
-
3455
3464
  /* Document-method: super
3456
3465
  * an expression returning the base class, or false if there is no
3457
3466
  * base class specified
3458
3467
  */
3459
3468
  rb_define_method(rb_cCLASS, "super", node_super, 0);
3460
3469
  rb_ary_push(members, rb_str_new2("super"));
3470
+
3471
+ /* Document-method: body
3472
+ * the body of the class definition
3473
+ */
3474
+ rb_define_method(rb_cCLASS, "body", node_body, 0);
3475
+ rb_ary_push(members, rb_str_new2("body"));
3461
3476
  }
3462
3477
 
3463
3478
  /* Document-class: Node::COLON2
@@ -3476,17 +3491,17 @@ void define_node_subclass_methods()
3476
3491
  rb_iv_set(rb_cCOLON2, "__type__", INT2NUM(NODE_COLON2));
3477
3492
  rb_define_singleton_method(rb_cCOLON2, "members", node_s_members, 0);
3478
3493
 
3479
- /* Document-method: head
3480
- * an expression specifying the class in which to do the lookup
3481
- */
3482
- rb_define_method(rb_cCOLON2, "head", node_head, 0);
3483
- rb_ary_push(members, rb_str_new2("head"));
3484
-
3485
3494
  /* Document-method: mid
3486
3495
  * the name of the method or constant to call/look up
3487
3496
  */
3488
3497
  rb_define_method(rb_cCOLON2, "mid", node_mid, 0);
3489
3498
  rb_ary_push(members, rb_str_new2("mid"));
3499
+
3500
+ /* Document-method: head
3501
+ * an expression specifying the class in which to do the lookup
3502
+ */
3503
+ rb_define_method(rb_cCOLON2, "head", node_head, 0);
3504
+ rb_ary_push(members, rb_str_new2("head"));
3490
3505
  }
3491
3506
 
3492
3507
  /* Document-class: Node::COLON3
@@ -3545,11 +3560,11 @@ void define_node_subclass_methods()
3545
3560
  rb_iv_set(rb_cCREF, "__type__", INT2NUM(NODE_CREF));
3546
3561
  rb_define_singleton_method(rb_cCREF, "members", node_s_members, 0);
3547
3562
 
3548
- /* Document-method: body
3549
- * always 0 (false)
3563
+ /* Document-method: clss
3564
+ * the new class to use for the cbase.
3550
3565
  */
3551
- rb_define_method(rb_cCREF, "body", node_body, 0);
3552
- rb_ary_push(members, rb_str_new2("body"));
3566
+ rb_define_method(rb_cCREF, "clss", node_clss, 0);
3567
+ rb_ary_push(members, rb_str_new2("clss"));
3553
3568
 
3554
3569
  /* Document-method: next
3555
3570
  * the previous value of ruby_cref or ruby_top_cref
@@ -3557,11 +3572,11 @@ void define_node_subclass_methods()
3557
3572
  rb_define_method(rb_cCREF, "next", node_next, 0);
3558
3573
  rb_ary_push(members, rb_str_new2("next"));
3559
3574
 
3560
- /* Document-method: clss
3561
- * the new class to use for the cbase.
3575
+ /* Document-method: body
3576
+ * always 0 (false)
3562
3577
  */
3563
- rb_define_method(rb_cCREF, "clss", node_clss, 0);
3564
- rb_ary_push(members, rb_str_new2("clss"));
3578
+ rb_define_method(rb_cCREF, "body", node_body, 0);
3579
+ rb_ary_push(members, rb_str_new2("body"));
3565
3580
  }
3566
3581
 
3567
3582
  /* Document-class: Node::CVAR
@@ -3594,18 +3609,18 @@ void define_node_subclass_methods()
3594
3609
  rb_iv_set(rb_cCVASGN, "__type__", INT2NUM(NODE_CVASGN));
3595
3610
  rb_define_singleton_method(rb_cCVASGN, "members", node_s_members, 0);
3596
3611
 
3612
+ /* Document-method: vid
3613
+ * the name of the class variable to assign
3614
+ */
3615
+ rb_define_method(rb_cCVASGN, "vid", node_vid, 0);
3616
+ rb_ary_push(members, rb_str_new2("vid"));
3617
+
3597
3618
  /* Document-method: value
3598
3619
  * an expression whose result is the new value of the class
3599
3620
  * variable
3600
3621
  */
3601
3622
  rb_define_method(rb_cCVASGN, "value", node_value, 0);
3602
3623
  rb_ary_push(members, rb_str_new2("value"));
3603
-
3604
- /* Document-method: vid
3605
- * the name of the class variable to assign
3606
- */
3607
- rb_define_method(rb_cCVASGN, "vid", node_vid, 0);
3608
- rb_ary_push(members, rb_str_new2("vid"));
3609
3624
  }
3610
3625
 
3611
3626
  /* Document-class: Node::CVDECL
@@ -3621,18 +3636,18 @@ void define_node_subclass_methods()
3621
3636
  rb_iv_set(rb_cCVDECL, "__type__", INT2NUM(NODE_CVDECL));
3622
3637
  rb_define_singleton_method(rb_cCVDECL, "members", node_s_members, 0);
3623
3638
 
3639
+ /* Document-method: vid
3640
+ * the name of the class variable to assign
3641
+ */
3642
+ rb_define_method(rb_cCVDECL, "vid", node_vid, 0);
3643
+ rb_ary_push(members, rb_str_new2("vid"));
3644
+
3624
3645
  /* Document-method: value
3625
3646
  * an expression whose result is the new value of the class
3626
3647
  * variable
3627
3648
  */
3628
3649
  rb_define_method(rb_cCVDECL, "value", node_value, 0);
3629
3650
  rb_ary_push(members, rb_str_new2("value"));
3630
-
3631
- /* Document-method: vid
3632
- * the name of the class variable to assign
3633
- */
3634
- rb_define_method(rb_cCVDECL, "vid", node_vid, 0);
3635
- rb_ary_push(members, rb_str_new2("vid"));
3636
3651
  }
3637
3652
 
3638
3653
  /* Document-class: Node::DASGN
@@ -3655,17 +3670,17 @@ void define_node_subclass_methods()
3655
3670
  rb_iv_set(rb_cDASGN, "__type__", INT2NUM(NODE_DASGN));
3656
3671
  rb_define_singleton_method(rb_cDASGN, "members", node_s_members, 0);
3657
3672
 
3658
- /* Document-method: value
3659
- * the value to assign to the local variable
3660
- */
3661
- rb_define_method(rb_cDASGN, "value", node_value, 0);
3662
- rb_ary_push(members, rb_str_new2("value"));
3663
-
3664
3673
  /* Document-method: vid
3665
3674
  * the name of the local variable
3666
3675
  */
3667
3676
  rb_define_method(rb_cDASGN, "vid", node_vid, 0);
3668
3677
  rb_ary_push(members, rb_str_new2("vid"));
3678
+
3679
+ /* Document-method: value
3680
+ * the value to assign to the local variable
3681
+ */
3682
+ rb_define_method(rb_cDASGN, "value", node_value, 0);
3683
+ rb_ary_push(members, rb_str_new2("value"));
3669
3684
  }
3670
3685
 
3671
3686
  /* Document-class: Node::DASGN_CURR
@@ -3680,17 +3695,17 @@ void define_node_subclass_methods()
3680
3695
  rb_iv_set(rb_cDASGN_CURR, "__type__", INT2NUM(NODE_DASGN_CURR));
3681
3696
  rb_define_singleton_method(rb_cDASGN_CURR, "members", node_s_members, 0);
3682
3697
 
3683
- /* Document-method: value
3684
- * the value to assign to the local variable
3685
- */
3686
- rb_define_method(rb_cDASGN_CURR, "value", node_value, 0);
3687
- rb_ary_push(members, rb_str_new2("value"));
3688
-
3689
3698
  /* Document-method: vid
3690
3699
  * the name of the local variable
3691
3700
  */
3692
3701
  rb_define_method(rb_cDASGN_CURR, "vid", node_vid, 0);
3693
3702
  rb_ary_push(members, rb_str_new2("vid"));
3703
+
3704
+ /* Document-method: value
3705
+ * the value to assign to the local variable
3706
+ */
3707
+ rb_define_method(rb_cDASGN_CURR, "value", node_value, 0);
3708
+ rb_ary_push(members, rb_str_new2("value"));
3694
3709
  }
3695
3710
 
3696
3711
  /* Document-class: Node::DEFINED
@@ -3761,17 +3776,17 @@ void define_node_subclass_methods()
3761
3776
  rb_define_method(rb_cDEFS, "defn", node_defn, 0);
3762
3777
  rb_ary_push(members, rb_str_new2("defn"));
3763
3778
 
3764
- /* Document-method: mid
3765
- * the name of the method* defn the body of the method
3766
- */
3767
- rb_define_method(rb_cDEFS, "mid", node_mid, 0);
3768
- rb_ary_push(members, rb_str_new2("mid"));
3769
-
3770
3779
  /* Document-method: recv
3771
3780
  * the object to whose singleton class the new method is to be added
3772
3781
  */
3773
3782
  rb_define_method(rb_cDEFS, "recv", node_recv, 0);
3774
3783
  rb_ary_push(members, rb_str_new2("recv"));
3784
+
3785
+ /* Document-method: mid
3786
+ * the name of the method* defn the body of the method
3787
+ */
3788
+ rb_define_method(rb_cDEFS, "mid", node_mid, 0);
3789
+ rb_ary_push(members, rb_str_new2("mid"));
3775
3790
  }
3776
3791
 
3777
3792
  /* Document-class: Node::DMETHOD
@@ -3810,17 +3825,17 @@ void define_node_subclass_methods()
3810
3825
  rb_iv_set(rb_cDOT2, "__type__", INT2NUM(NODE_DOT2));
3811
3826
  rb_define_singleton_method(rb_cDOT2, "members", node_s_members, 0);
3812
3827
 
3813
- /* Document-method: beg
3814
- * the beginning of the range
3815
- */
3816
- rb_define_method(rb_cDOT2, "beg", node_beg, 0);
3817
- rb_ary_push(members, rb_str_new2("beg"));
3818
-
3819
3828
  /* Document-method: end
3820
3829
  * the end of the range
3821
3830
  */
3822
3831
  rb_define_method(rb_cDOT2, "end", node_end, 0);
3823
3832
  rb_ary_push(members, rb_str_new2("end"));
3833
+
3834
+ /* Document-method: beg
3835
+ * the beginning of the range
3836
+ */
3837
+ rb_define_method(rb_cDOT2, "beg", node_beg, 0);
3838
+ rb_ary_push(members, rb_str_new2("beg"));
3824
3839
  rb_define_method(rb_cDOT2, "state", node_state, 0);
3825
3840
  rb_ary_push(members, rb_str_new2("state"));
3826
3841
  }
@@ -3838,17 +3853,17 @@ void define_node_subclass_methods()
3838
3853
  rb_iv_set(rb_cDOT3, "__type__", INT2NUM(NODE_DOT3));
3839
3854
  rb_define_singleton_method(rb_cDOT3, "members", node_s_members, 0);
3840
3855
 
3841
- /* Document-method: beg
3842
- * the beginning of the range
3843
- */
3844
- rb_define_method(rb_cDOT3, "beg", node_beg, 0);
3845
- rb_ary_push(members, rb_str_new2("beg"));
3846
-
3847
3856
  /* Document-method: end
3848
3857
  * the end of the range
3849
3858
  */
3850
3859
  rb_define_method(rb_cDOT3, "end", node_end, 0);
3851
3860
  rb_ary_push(members, rb_str_new2("end"));
3861
+
3862
+ /* Document-method: beg
3863
+ * the beginning of the range
3864
+ */
3865
+ rb_define_method(rb_cDOT3, "beg", node_beg, 0);
3866
+ rb_ary_push(members, rb_str_new2("beg"));
3852
3867
  rb_define_method(rb_cDOT3, "state", node_state, 0);
3853
3868
  rb_ary_push(members, rb_str_new2("state"));
3854
3869
  }
@@ -4119,11 +4134,11 @@ void define_node_subclass_methods()
4119
4134
  rb_iv_set(rb_cFBODY, "__type__", INT2NUM(NODE_FBODY));
4120
4135
  rb_define_singleton_method(rb_cFBODY, "members", node_s_members, 0);
4121
4136
 
4122
- /* Document-method: head
4123
- * the method body
4137
+ /* Document-method: mid
4138
+ * the name of the method
4124
4139
  */
4125
- rb_define_method(rb_cFBODY, "head", node_head, 0);
4126
- rb_ary_push(members, rb_str_new2("head"));
4140
+ rb_define_method(rb_cFBODY, "mid", node_mid, 0);
4141
+ rb_ary_push(members, rb_str_new2("mid"));
4127
4142
 
4128
4143
  /* Document-method: orig
4129
4144
  * the origin class
@@ -4131,11 +4146,11 @@ void define_node_subclass_methods()
4131
4146
  rb_define_method(rb_cFBODY, "orig", node_orig, 0);
4132
4147
  rb_ary_push(members, rb_str_new2("orig"));
4133
4148
 
4134
- /* Document-method: mid
4135
- * the name of the method
4149
+ /* Document-method: head
4150
+ * the method body
4136
4151
  */
4137
- rb_define_method(rb_cFBODY, "mid", node_mid, 0);
4138
- rb_ary_push(members, rb_str_new2("mid"));
4152
+ rb_define_method(rb_cFBODY, "head", node_head, 0);
4153
+ rb_ary_push(members, rb_str_new2("head"));
4139
4154
  }
4140
4155
 
4141
4156
  /* Document-class: Node::FCALL
@@ -4153,17 +4168,17 @@ void define_node_subclass_methods()
4153
4168
  rb_iv_set(rb_cFCALL, "__type__", INT2NUM(NODE_FCALL));
4154
4169
  rb_define_singleton_method(rb_cFCALL, "members", node_s_members, 0);
4155
4170
 
4156
- /* Document-method: args
4157
- * the arguments to the method
4158
- */
4159
- rb_define_method(rb_cFCALL, "args", node_args, 0);
4160
- rb_ary_push(members, rb_str_new2("args"));
4161
-
4162
4171
  /* Document-method: mid
4163
4172
  * the method id
4164
4173
  */
4165
4174
  rb_define_method(rb_cFCALL, "mid", node_mid, 0);
4166
4175
  rb_ary_push(members, rb_str_new2("mid"));
4176
+
4177
+ /* Document-method: args
4178
+ * the arguments to the method
4179
+ */
4180
+ rb_define_method(rb_cFCALL, "args", node_args, 0);
4181
+ rb_ary_push(members, rb_str_new2("args"));
4167
4182
  }
4168
4183
 
4169
4184
  /* Document-class: Node::FLIP2
@@ -4180,18 +4195,18 @@ void define_node_subclass_methods()
4180
4195
  rb_iv_set(rb_cFLIP2, "__type__", INT2NUM(NODE_FLIP2));
4181
4196
  rb_define_singleton_method(rb_cFLIP2, "members", node_s_members, 0);
4182
4197
 
4183
- /* Document-method: beg
4184
- * the beginning of the range
4185
- */
4186
- rb_define_method(rb_cFLIP2, "beg", node_beg, 0);
4187
- rb_ary_push(members, rb_str_new2("beg"));
4188
-
4189
4198
  /* Document-method: end
4190
4199
  * the end of the range
4191
4200
  */
4192
4201
  rb_define_method(rb_cFLIP2, "end", node_end, 0);
4193
4202
  rb_ary_push(members, rb_str_new2("end"));
4194
4203
 
4204
+ /* Document-method: beg
4205
+ * the beginning of the range
4206
+ */
4207
+ rb_define_method(rb_cFLIP2, "beg", node_beg, 0);
4208
+ rb_ary_push(members, rb_str_new2("beg"));
4209
+
4195
4210
  /* Document-method: cnt
4196
4211
  * the index into the local variable table of the special variable
4197
4212
  * to use in the flip-flop expression (usually 2 for $_)
@@ -4214,18 +4229,18 @@ void define_node_subclass_methods()
4214
4229
  rb_iv_set(rb_cFLIP3, "__type__", INT2NUM(NODE_FLIP3));
4215
4230
  rb_define_singleton_method(rb_cFLIP3, "members", node_s_members, 0);
4216
4231
 
4217
- /* Document-method: beg
4218
- * the beginning of the range
4219
- */
4220
- rb_define_method(rb_cFLIP3, "beg", node_beg, 0);
4221
- rb_ary_push(members, rb_str_new2("beg"));
4222
-
4223
4232
  /* Document-method: end
4224
4233
  * the end of the range
4225
4234
  */
4226
4235
  rb_define_method(rb_cFLIP3, "end", node_end, 0);
4227
4236
  rb_ary_push(members, rb_str_new2("end"));
4228
4237
 
4238
+ /* Document-method: beg
4239
+ * the beginning of the range
4240
+ */
4241
+ rb_define_method(rb_cFLIP3, "beg", node_beg, 0);
4242
+ rb_ary_push(members, rb_str_new2("beg"));
4243
+
4229
4244
  /* Document-method: cnt
4230
4245
  * the index into the local variable table of the special variable
4231
4246
  * to use in the flip-flop expression (usually 2 for $_)
@@ -4256,12 +4271,6 @@ void define_node_subclass_methods()
4256
4271
  rb_iv_set(rb_cFOR, "__type__", INT2NUM(NODE_FOR));
4257
4272
  rb_define_singleton_method(rb_cFOR, "members", node_s_members, 0);
4258
4273
 
4259
- /* Document-method: body
4260
- * the body of the loop
4261
- */
4262
- rb_define_method(rb_cFOR, "body", node_body, 0);
4263
- rb_ary_push(members, rb_str_new2("body"));
4264
-
4265
4274
  /* Document-method: iter
4266
4275
  * the sequence over which to iterate
4267
4276
  */
@@ -4275,6 +4284,12 @@ void define_node_subclass_methods()
4275
4284
  */
4276
4285
  rb_define_method(rb_cFOR, "var", node_var, 0);
4277
4286
  rb_ary_push(members, rb_str_new2("var"));
4287
+
4288
+ /* Document-method: body
4289
+ * the body of the loop
4290
+ */
4291
+ rb_define_method(rb_cFOR, "body", node_body, 0);
4292
+ rb_ary_push(members, rb_str_new2("body"));
4278
4293
  }
4279
4294
 
4280
4295
  /* Document-class: Node::GASGN
@@ -4288,12 +4303,6 @@ void define_node_subclass_methods()
4288
4303
  rb_iv_set(rb_cGASGN, "__type__", INT2NUM(NODE_GASGN));
4289
4304
  rb_define_singleton_method(rb_cGASGN, "members", node_s_members, 0);
4290
4305
 
4291
- /* Document-method: value
4292
- * an expression whose result is the new value of the global variable
4293
- */
4294
- rb_define_method(rb_cGASGN, "value", node_value, 0);
4295
- rb_ary_push(members, rb_str_new2("value"));
4296
-
4297
4306
  /* Document-method: vid
4298
4307
  * the name of the global variable, with a leading '$' character.
4299
4308
  */
@@ -4301,6 +4310,12 @@ void define_node_subclass_methods()
4301
4310
  rb_ary_push(members, rb_str_new2("vid"));
4302
4311
  rb_define_method(rb_cGASGN, "entry", node_entry, 0);
4303
4312
  rb_ary_push(members, rb_str_new2("entry"));
4313
+
4314
+ /* Document-method: value
4315
+ * an expression whose result is the new value of the global variable
4316
+ */
4317
+ rb_define_method(rb_cGASGN, "value", node_value, 0);
4318
+ rb_ary_push(members, rb_str_new2("value"));
4304
4319
  }
4305
4320
 
4306
4321
  /* Document-class: Node::GVAR
@@ -4353,17 +4368,17 @@ void define_node_subclass_methods()
4353
4368
  rb_iv_set(rb_cIASGN, "__type__", INT2NUM(NODE_IASGN));
4354
4369
  rb_define_singleton_method(rb_cIASGN, "members", node_s_members, 0);
4355
4370
 
4356
- /* Document-method: value
4357
- * the value to assign to the instance variable
4358
- */
4359
- rb_define_method(rb_cIASGN, "value", node_value, 0);
4360
- rb_ary_push(members, rb_str_new2("value"));
4361
-
4362
4371
  /* Document-method: vid
4363
4372
  * the name of the instance variable, with a leading '@' sign
4364
4373
  */
4365
4374
  rb_define_method(rb_cIASGN, "vid", node_vid, 0);
4366
4375
  rb_ary_push(members, rb_str_new2("vid"));
4376
+
4377
+ /* Document-method: value
4378
+ * the value to assign to the instance variable
4379
+ */
4380
+ rb_define_method(rb_cIASGN, "value", node_value, 0);
4381
+ rb_ary_push(members, rb_str_new2("value"));
4367
4382
  }
4368
4383
 
4369
4384
  /* Document-class: Node::IF
@@ -4427,11 +4442,11 @@ void define_node_subclass_methods()
4427
4442
  rb_iv_set(rb_cIFUNC, "__type__", INT2NUM(NODE_IFUNC));
4428
4443
  rb_define_singleton_method(rb_cIFUNC, "members", node_s_members, 0);
4429
4444
 
4430
- /* Document-method: cfnc
4431
- * a pointer to the C function to which to yield
4445
+ /* Document-method: state
4446
+ * always 0
4432
4447
  */
4433
- rb_define_method(rb_cIFUNC, "cfnc", node_cfnc, 0);
4434
- rb_ary_push(members, rb_str_new2("cfnc"));
4448
+ rb_define_method(rb_cIFUNC, "state", node_state, 0);
4449
+ rb_ary_push(members, rb_str_new2("state"));
4435
4450
 
4436
4451
  /* Document-method: tval
4437
4452
  * the user-specified data to be passed as the second argument to
@@ -4440,11 +4455,11 @@ void define_node_subclass_methods()
4440
4455
  rb_define_method(rb_cIFUNC, "tval", node_tval, 0);
4441
4456
  rb_ary_push(members, rb_str_new2("tval"));
4442
4457
 
4443
- /* Document-method: state
4444
- * always 0
4458
+ /* Document-method: cfnc
4459
+ * a pointer to the C function to which to yield
4445
4460
  */
4446
- rb_define_method(rb_cIFUNC, "state", node_state, 0);
4447
- rb_ary_push(members, rb_str_new2("state"));
4461
+ rb_define_method(rb_cIFUNC, "cfnc", node_cfnc, 0);
4462
+ rb_ary_push(members, rb_str_new2("cfnc"));
4448
4463
  }
4449
4464
 
4450
4465
  /* Document-class: Node::ITER
@@ -4468,12 +4483,6 @@ void define_node_subclass_methods()
4468
4483
  rb_iv_set(rb_cITER, "__type__", INT2NUM(NODE_ITER));
4469
4484
  rb_define_singleton_method(rb_cITER, "members", node_s_members, 0);
4470
4485
 
4471
- /* Document-method: body
4472
- * the body of the loop
4473
- */
4474
- rb_define_method(rb_cITER, "body", node_body, 0);
4475
- rb_ary_push(members, rb_str_new2("body"));
4476
-
4477
4486
  /* Document-method: iter
4478
4487
  * an expression which calls the desired iteration method, usually
4479
4488
  * recv.each
@@ -4488,6 +4497,12 @@ void define_node_subclass_methods()
4488
4497
  */
4489
4498
  rb_define_method(rb_cITER, "var", node_var, 0);
4490
4499
  rb_ary_push(members, rb_str_new2("var"));
4500
+
4501
+ /* Document-method: body
4502
+ * the body of the loop
4503
+ */
4504
+ rb_define_method(rb_cITER, "body", node_body, 0);
4505
+ rb_ary_push(members, rb_str_new2("body"));
4491
4506
  }
4492
4507
 
4493
4508
  /* Document-class: Node::IVAR
@@ -4522,17 +4537,17 @@ void define_node_subclass_methods()
4522
4537
  rb_iv_set(rb_cLASGN, "__type__", INT2NUM(NODE_LASGN));
4523
4538
  rb_define_singleton_method(rb_cLASGN, "members", node_s_members, 0);
4524
4539
 
4525
- /* Document-method: value
4526
- * the value to assign to the local variable
4527
- */
4528
- rb_define_method(rb_cLASGN, "value", node_value, 0);
4529
- rb_ary_push(members, rb_str_new2("value"));
4530
-
4531
4540
  /* Document-method: vid
4532
4541
  * the name of the local variable
4533
4542
  */
4534
4543
  rb_define_method(rb_cLASGN, "vid", node_vid, 0);
4535
4544
  rb_ary_push(members, rb_str_new2("vid"));
4545
+
4546
+ /* Document-method: value
4547
+ * the value to assign to the local variable
4548
+ */
4549
+ rb_define_method(rb_cLASGN, "value", node_value, 0);
4550
+ rb_ary_push(members, rb_str_new2("value"));
4536
4551
  rb_define_method(rb_cLASGN, "cnt", node_cnt, 0);
4537
4552
  rb_ary_push(members, rb_str_new2("cnt"));
4538
4553
  }
@@ -4593,17 +4608,17 @@ void define_node_subclass_methods()
4593
4608
  rb_define_method(rb_cMASGN, "args", node_args, 0);
4594
4609
  rb_ary_push(members, rb_str_new2("args"));
4595
4610
 
4596
- /* Document-method: head
4597
- * TODO
4598
- */
4599
- rb_define_method(rb_cMASGN, "head", node_head, 0);
4600
- rb_ary_push(members, rb_str_new2("head"));
4601
-
4602
4611
  /* Document-method: value
4603
4612
  * TODO
4604
4613
  */
4605
4614
  rb_define_method(rb_cMASGN, "value", node_value, 0);
4606
4615
  rb_ary_push(members, rb_str_new2("value"));
4616
+
4617
+ /* Document-method: head
4618
+ * TODO
4619
+ */
4620
+ rb_define_method(rb_cMASGN, "head", node_head, 0);
4621
+ rb_ary_push(members, rb_str_new2("head"));
4607
4622
  }
4608
4623
 
4609
4624
  /* Document-class: Node::MATCH
@@ -4666,6 +4681,13 @@ void define_node_subclass_methods()
4666
4681
  rb_iv_set(rb_cMATCH2, "__type__", INT2NUM(NODE_MATCH2));
4667
4682
  rb_define_singleton_method(rb_cMATCH2, "members", node_s_members, 0);
4668
4683
 
4684
+ /* Document-method: recv
4685
+ * the regular expression on the left hand side of the match
4686
+ * operator
4687
+ */
4688
+ rb_define_method(rb_cMATCH2, "recv", node_recv, 0);
4689
+ rb_ary_push(members, rb_str_new2("recv"));
4690
+
4669
4691
  /* Document-method: value
4670
4692
  * the expression on the right hand side of the match operator, or
4671
4693
  * an expression returning $_ if there is nothing on the right hand
@@ -4673,13 +4695,6 @@ void define_node_subclass_methods()
4673
4695
  */
4674
4696
  rb_define_method(rb_cMATCH2, "value", node_value, 0);
4675
4697
  rb_ary_push(members, rb_str_new2("value"));
4676
-
4677
- /* Document-method: recv
4678
- * the regular expression on the left hand side of the match
4679
- * operator
4680
- */
4681
- rb_define_method(rb_cMATCH2, "recv", node_recv, 0);
4682
- rb_ary_push(members, rb_str_new2("recv"));
4683
4698
  }
4684
4699
 
4685
4700
  /* Document-class: Node::MATCH3
@@ -4697,17 +4712,17 @@ void define_node_subclass_methods()
4697
4712
  rb_iv_set(rb_cMATCH3, "__type__", INT2NUM(NODE_MATCH3));
4698
4713
  rb_define_singleton_method(rb_cMATCH3, "members", node_s_members, 0);
4699
4714
 
4700
- /* Document-method: value
4701
- * the right hand side of the match
4702
- */
4703
- rb_define_method(rb_cMATCH3, "value", node_value, 0);
4704
- rb_ary_push(members, rb_str_new2("value"));
4705
-
4706
4715
  /* Document-method: recv
4707
4716
  * the left hand side of the match
4708
4717
  */
4709
4718
  rb_define_method(rb_cMATCH3, "recv", node_recv, 0);
4710
4719
  rb_ary_push(members, rb_str_new2("recv"));
4720
+
4721
+ /* Document-method: value
4722
+ * the right hand side of the match
4723
+ */
4724
+ rb_define_method(rb_cMATCH3, "value", node_value, 0);
4725
+ rb_ary_push(members, rb_str_new2("value"));
4711
4726
  }
4712
4727
 
4713
4728
  /* Document-class: Node::MEMO
@@ -4744,17 +4759,17 @@ void define_node_subclass_methods()
4744
4759
  rb_iv_set(rb_cMETHOD, "__type__", INT2NUM(NODE_METHOD));
4745
4760
  rb_define_singleton_method(rb_cMETHOD, "members", node_s_members, 0);
4746
4761
 
4747
- /* Document-method: body
4748
- * the body of the method
4749
- */
4750
- rb_define_method(rb_cMETHOD, "body", node_body, 0);
4751
- rb_ary_push(members, rb_str_new2("body"));
4752
-
4753
4762
  /* Document-method: noex
4754
4763
  * the method's flags
4755
4764
  */
4756
4765
  rb_define_method(rb_cMETHOD, "noex", node_noex, 0);
4757
4766
  rb_ary_push(members, rb_str_new2("noex"));
4767
+
4768
+ /* Document-method: body
4769
+ * the body of the method
4770
+ */
4771
+ rb_define_method(rb_cMETHOD, "body", node_body, 0);
4772
+ rb_ary_push(members, rb_str_new2("body"));
4758
4773
  }
4759
4774
 
4760
4775
  /* Document-class: Node::MODULE
@@ -4928,12 +4943,6 @@ void define_node_subclass_methods()
4928
4943
  rb_iv_set(rb_cOP_ASGN1, "__type__", INT2NUM(NODE_OP_ASGN1));
4929
4944
  rb_define_singleton_method(rb_cOP_ASGN1, "members", node_s_members, 0);
4930
4945
 
4931
- /* Document-method: args
4932
- * the arguments to the assigment
4933
- */
4934
- rb_define_method(rb_cOP_ASGN1, "args", node_args, 0);
4935
- rb_ary_push(members, rb_str_new2("args"));
4936
-
4937
4946
  /* Document-method: mid
4938
4947
  * 0, 1, or the name a method to call to calculate the value of the
4939
4948
  * rhs
@@ -4946,6 +4955,12 @@ void define_node_subclass_methods()
4946
4955
  */
4947
4956
  rb_define_method(rb_cOP_ASGN1, "recv", node_recv, 0);
4948
4957
  rb_ary_push(members, rb_str_new2("recv"));
4958
+
4959
+ /* Document-method: args
4960
+ * the arguments to the assigment
4961
+ */
4962
+ rb_define_method(rb_cOP_ASGN1, "args", node_args, 0);
4963
+ rb_ary_push(members, rb_str_new2("args"));
4949
4964
  }
4950
4965
 
4951
4966
  /* Document-class: Node::OP_ASGN2
@@ -4968,11 +4983,11 @@ void define_node_subclass_methods()
4968
4983
  rb_iv_set(rb_cOP_ASGN2, "__type__", INT2NUM(NODE_OP_ASGN2));
4969
4984
  rb_define_singleton_method(rb_cOP_ASGN2, "members", node_s_members, 0);
4970
4985
 
4971
- /* Document-method: value
4972
- * the value to assign to the attribute
4986
+ /* Document-method: recv
4987
+ * the receiver of the attribute
4973
4988
  */
4974
- rb_define_method(rb_cOP_ASGN2, "value", node_value, 0);
4975
- rb_ary_push(members, rb_str_new2("value"));
4989
+ rb_define_method(rb_cOP_ASGN2, "recv", node_recv, 0);
4990
+ rb_ary_push(members, rb_str_new2("recv"));
4976
4991
 
4977
4992
  /* Document-method: next
4978
4993
  * another node of type OP_ASGN2 which contains more information
@@ -4981,11 +4996,11 @@ void define_node_subclass_methods()
4981
4996
  rb_define_method(rb_cOP_ASGN2, "next", node_next, 0);
4982
4997
  rb_ary_push(members, rb_str_new2("next"));
4983
4998
 
4984
- /* Document-method: recv
4985
- * the receiver of the attribute
4999
+ /* Document-method: value
5000
+ * the value to assign to the attribute
4986
5001
  */
4987
- rb_define_method(rb_cOP_ASGN2, "recv", node_recv, 0);
4988
- rb_ary_push(members, rb_str_new2("recv"));
5002
+ rb_define_method(rb_cOP_ASGN2, "value", node_value, 0);
5003
+ rb_ary_push(members, rb_str_new2("value"));
4989
5004
  }
4990
5005
 
4991
5006
  /* Document-class: Node::OP_ASGN2_ARG
@@ -5001,6 +5016,14 @@ void define_node_subclass_methods()
5001
5016
  rb_iv_set(rb_cOP_ASGN2_ARG, "__type__", INT2NUM(NODE_OP_ASGN2_ARG));
5002
5017
  rb_define_singleton_method(rb_cOP_ASGN2_ARG, "members", node_s_members, 0);
5003
5018
 
5019
+ /* Document-method: mid
5020
+ * The operation to apply to the attribute before setting it. May
5021
+ * be 0 (false) to indicate "logical or" or 1 (nil) to indicate
5022
+ * "logical and".
5023
+ */
5024
+ rb_define_method(rb_cOP_ASGN2_ARG, "mid", node_mid, 0);
5025
+ rb_ary_push(members, rb_str_new2("mid"));
5026
+
5004
5027
  /* Document-method: vid
5005
5028
  * The method to call on the receiver to retrieve the attribute
5006
5029
  */
@@ -5012,14 +5035,6 @@ void define_node_subclass_methods()
5012
5035
  */
5013
5036
  rb_define_method(rb_cOP_ASGN2_ARG, "aid", node_aid, 0);
5014
5037
  rb_ary_push(members, rb_str_new2("aid"));
5015
-
5016
- /* Document-method: mid
5017
- * The operation to apply to the attribute before setting it. May
5018
- * be 0 (false) to indicate "logical or" or 1 (nil) to indicate
5019
- * "logical and".
5020
- */
5021
- rb_define_method(rb_cOP_ASGN2_ARG, "mid", node_mid, 0);
5022
- rb_ary_push(members, rb_str_new2("mid"));
5023
5038
  }
5024
5039
 
5025
5040
  /* Document-class: Node::OP_ASGN_AND
@@ -5038,18 +5053,18 @@ void define_node_subclass_methods()
5038
5053
  rb_iv_set(rb_cOP_ASGN_AND, "__type__", INT2NUM(NODE_OP_ASGN_AND));
5039
5054
  rb_define_singleton_method(rb_cOP_ASGN_AND, "members", node_s_members, 0);
5040
5055
 
5056
+ /* Document-method: recv
5057
+ * an expression representing the left hand side of the assignment
5058
+ */
5059
+ rb_define_method(rb_cOP_ASGN_AND, "recv", node_recv, 0);
5060
+ rb_ary_push(members, rb_str_new2("recv"));
5061
+
5041
5062
  /* Document-method: value
5042
5063
  * an expression representing the assignment that should be
5043
5064
  * performed if the left hand side is true
5044
5065
  */
5045
5066
  rb_define_method(rb_cOP_ASGN_AND, "value", node_value, 0);
5046
5067
  rb_ary_push(members, rb_str_new2("value"));
5047
-
5048
- /* Document-method: recv
5049
- * an expression representing the left hand side of the assignment
5050
- */
5051
- rb_define_method(rb_cOP_ASGN_AND, "recv", node_recv, 0);
5052
- rb_ary_push(members, rb_str_new2("recv"));
5053
5068
  }
5054
5069
 
5055
5070
  /* Document-class: Node::OP_ASGN_OR
@@ -5068,6 +5083,12 @@ void define_node_subclass_methods()
5068
5083
  rb_iv_set(rb_cOP_ASGN_OR, "__type__", INT2NUM(NODE_OP_ASGN_OR));
5069
5084
  rb_define_singleton_method(rb_cOP_ASGN_OR, "members", node_s_members, 0);
5070
5085
 
5086
+ /* Document-method: recv
5087
+ * the receiver of the assignment
5088
+ */
5089
+ rb_define_method(rb_cOP_ASGN_OR, "recv", node_recv, 0);
5090
+ rb_ary_push(members, rb_str_new2("recv"));
5091
+
5071
5092
  /* Document-method: aid
5072
5093
  * if this indicator is nonzero, ruby will check to see if the
5073
5094
  * provided expression is defined, otherwise it will assume that
@@ -5081,12 +5102,6 @@ void define_node_subclass_methods()
5081
5102
  */
5082
5103
  rb_define_method(rb_cOP_ASGN_OR, "value", node_value, 0);
5083
5104
  rb_ary_push(members, rb_str_new2("value"));
5084
-
5085
- /* Document-method: recv
5086
- * the receiver of the assignment
5087
- */
5088
- rb_define_method(rb_cOP_ASGN_OR, "recv", node_recv, 0);
5089
- rb_ary_push(members, rb_str_new2("recv"));
5090
5105
  }
5091
5106
 
5092
5107
  /* Document-class: Node::OR
@@ -5166,18 +5181,18 @@ void define_node_subclass_methods()
5166
5181
  rb_iv_set(rb_cRESBODY, "__type__", INT2NUM(NODE_RESBODY));
5167
5182
  rb_define_singleton_method(rb_cRESBODY, "members", node_s_members, 0);
5168
5183
 
5169
- /* Document-method: head
5170
- * the next rescue
5171
- */
5172
- rb_define_method(rb_cRESBODY, "head", node_head, 0);
5173
- rb_ary_push(members, rb_str_new2("head"));
5174
-
5175
5184
  /* Document-method: args
5176
5185
  * the expression type to match against
5177
5186
  */
5178
5187
  rb_define_method(rb_cRESBODY, "args", node_args, 0);
5179
5188
  rb_ary_push(members, rb_str_new2("args"));
5180
5189
 
5190
+ /* Document-method: head
5191
+ * the next rescue
5192
+ */
5193
+ rb_define_method(rb_cRESBODY, "head", node_head, 0);
5194
+ rb_ary_push(members, rb_str_new2("head"));
5195
+
5181
5196
  /* Document-method: body
5182
5197
  * the expresion to evaluate if the exception type matches
5183
5198
  */
@@ -5222,6 +5237,12 @@ void define_node_subclass_methods()
5222
5237
  rb_iv_set(rb_cRESCUE, "__type__", INT2NUM(NODE_RESCUE));
5223
5238
  rb_define_singleton_method(rb_cRESCUE, "members", node_s_members, 0);
5224
5239
 
5240
+ /* Document-method: resq
5241
+ * the expression to be evaluated if an exception is raised
5242
+ */
5243
+ rb_define_method(rb_cRESCUE, "resq", node_resq, 0);
5244
+ rb_ary_push(members, rb_str_new2("resq"));
5245
+
5225
5246
  /* Document-method: head
5226
5247
  * the body of the block to evaluate
5227
5248
  */
@@ -5233,12 +5254,6 @@ void define_node_subclass_methods()
5233
5254
  */
5234
5255
  rb_define_method(rb_cRESCUE, "else", node_else, 0);
5235
5256
  rb_ary_push(members, rb_str_new2("else"));
5236
-
5237
- /* Document-method: resq
5238
- * the expression to be evaluated if an exception is raised
5239
- */
5240
- rb_define_method(rb_cRESCUE, "resq", node_resq, 0);
5241
- rb_ary_push(members, rb_str_new2("resq"));
5242
5257
  }
5243
5258
 
5244
5259
  /* Document-class: Node::RETRY
@@ -5293,17 +5308,17 @@ void define_node_subclass_methods()
5293
5308
  rb_iv_set(rb_cSCLASS, "__type__", INT2NUM(NODE_SCLASS));
5294
5309
  rb_define_singleton_method(rb_cSCLASS, "members", node_s_members, 0);
5295
5310
 
5296
- /* Document-method: body
5297
- * the body of the class definition
5298
- */
5299
- rb_define_method(rb_cSCLASS, "body", node_body, 0);
5300
- rb_ary_push(members, rb_str_new2("body"));
5301
-
5302
5311
  /* Document-method: recv
5303
5312
  * the object whose singleton class is to be modified
5304
5313
  */
5305
5314
  rb_define_method(rb_cSCLASS, "recv", node_recv, 0);
5306
5315
  rb_ary_push(members, rb_str_new2("recv"));
5316
+
5317
+ /* Document-method: body
5318
+ * the body of the class definition
5319
+ */
5320
+ rb_define_method(rb_cSCLASS, "body", node_body, 0);
5321
+ rb_ary_push(members, rb_str_new2("body"));
5307
5322
  }
5308
5323
 
5309
5324
  /* Document-class: Node::SCOPE
@@ -5514,12 +5529,6 @@ void define_node_subclass_methods()
5514
5529
  rb_iv_set(rb_cUNTIL, "__type__", INT2NUM(NODE_UNTIL));
5515
5530
  rb_define_singleton_method(rb_cUNTIL, "members", node_s_members, 0);
5516
5531
 
5517
- /* Document-method: body
5518
- * the body of the loop
5519
- */
5520
- rb_define_method(rb_cUNTIL, "body", node_body, 0);
5521
- rb_ary_push(members, rb_str_new2("body"));
5522
-
5523
5532
  /* Document-method: cond
5524
5533
  * a condition to terminate the loop when it becomes true
5525
5534
  */
@@ -5527,6 +5536,12 @@ void define_node_subclass_methods()
5527
5536
  rb_ary_push(members, rb_str_new2("cond"));
5528
5537
  rb_define_method(rb_cUNTIL, "state", node_state, 0);
5529
5538
  rb_ary_push(members, rb_str_new2("state"));
5539
+
5540
+ /* Document-method: body
5541
+ * the body of the loop
5542
+ */
5543
+ rb_define_method(rb_cUNTIL, "body", node_body, 0);
5544
+ rb_ary_push(members, rb_str_new2("body"));
5530
5545
  }
5531
5546
 
5532
5547
  /* Document-class: Node::VALIAS
@@ -5605,6 +5620,12 @@ void define_node_subclass_methods()
5605
5620
  rb_iv_set(rb_cWHEN, "__type__", INT2NUM(NODE_WHEN));
5606
5621
  rb_define_singleton_method(rb_cWHEN, "members", node_s_members, 0);
5607
5622
 
5623
+ /* Document-method: next
5624
+ * the next expression to be evaluated if the condition is false
5625
+ */
5626
+ rb_define_method(rb_cWHEN, "next", node_next, 0);
5627
+ rb_ary_push(members, rb_str_new2("next"));
5628
+
5608
5629
  /* Document-method: head
5609
5630
  * a value to compare against, or a condition to be tested
5610
5631
  */
@@ -5616,12 +5637,6 @@ void define_node_subclass_methods()
5616
5637
  */
5617
5638
  rb_define_method(rb_cWHEN, "body", node_body, 0);
5618
5639
  rb_ary_push(members, rb_str_new2("body"));
5619
-
5620
- /* Document-method: next
5621
- * the next expression to be evaluated if the condition is false
5622
- */
5623
- rb_define_method(rb_cWHEN, "next", node_next, 0);
5624
- rb_ary_push(members, rb_str_new2("next"));
5625
5640
  }
5626
5641
 
5627
5642
  /* Document-class: Node::WHILE
@@ -5638,12 +5653,6 @@ void define_node_subclass_methods()
5638
5653
  rb_iv_set(rb_cWHILE, "__type__", INT2NUM(NODE_WHILE));
5639
5654
  rb_define_singleton_method(rb_cWHILE, "members", node_s_members, 0);
5640
5655
 
5641
- /* Document-method: body
5642
- * the body of the loop
5643
- */
5644
- rb_define_method(rb_cWHILE, "body", node_body, 0);
5645
- rb_ary_push(members, rb_str_new2("body"));
5646
-
5647
5656
  /* Document-method: cond
5648
5657
  * a condition to terminate the loop when it becomes false
5649
5658
  */
@@ -5651,6 +5660,12 @@ void define_node_subclass_methods()
5651
5660
  rb_ary_push(members, rb_str_new2("cond"));
5652
5661
  rb_define_method(rb_cWHILE, "state", node_state, 0);
5653
5662
  rb_ary_push(members, rb_str_new2("state"));
5663
+
5664
+ /* Document-method: body
5665
+ * the body of the loop
5666
+ */
5667
+ rb_define_method(rb_cWHILE, "body", node_body, 0);
5668
+ rb_ary_push(members, rb_str_new2("body"));
5654
5669
  }
5655
5670
 
5656
5671
  /* Document-class: Node::XSTR
@@ -5687,17 +5702,17 @@ void define_node_subclass_methods()
5687
5702
  rb_iv_set(rb_cYIELD, "__type__", INT2NUM(NODE_YIELD));
5688
5703
  rb_define_singleton_method(rb_cYIELD, "members", node_s_members, 0);
5689
5704
 
5690
- /* Document-method: head
5691
- * the value to yield
5692
- */
5693
- rb_define_method(rb_cYIELD, "head", node_head, 0);
5694
- rb_ary_push(members, rb_str_new2("head"));
5695
-
5696
5705
  /* Document-method: state
5697
5706
  * if nonzero, splats the value before yielding
5698
5707
  */
5699
5708
  rb_define_method(rb_cYIELD, "state", node_state, 0);
5700
5709
  rb_ary_push(members, rb_str_new2("state"));
5710
+
5711
+ /* Document-method: head
5712
+ * the value to yield
5713
+ */
5714
+ rb_define_method(rb_cYIELD, "head", node_head, 0);
5715
+ rb_ary_push(members, rb_str_new2("head"));
5701
5716
  }
5702
5717
 
5703
5718
  /* Document-class: Node::ZARRAY