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
@@ -1,4 +1,4 @@
1
- #! /home/cout/.rvm/rubies/ruby-1.9.2-p318/bin/ruby
1
+ #! /home/cout/.rvm/rubies/ruby-1.8.7-p358/bin/ruby
2
2
 
3
3
  require 'pp'
4
4
  require 'internal/node/pp'
@@ -1,4 +1,4 @@
1
- #! /home/cout/.rvm/rubies/ruby-1.9.2-p318/bin/ruby
1
+ #! /home/cout/.rvm/rubies/ruby-1.8.7-p358/bin/ruby
2
2
 
3
3
  require 'internal/node/obfusc'
4
4
 
@@ -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
 
@@ -2,44 +2,44 @@
2
2
  #include "version.h"
3
3
 
4
4
  Node_Type_Descrip node_type_descrips_unsorted[] = {
5
- { NODE_ALIAS, NEN_1ST, NEN_2ND, NEN_NONE, "ALIAS" },
5
+ { NODE_ALIAS, NEN_2ND, NEN_1ST, 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
- { NODE_AND, NEN_1ST, NEN_2ND, NEN_NONE, "AND" },
10
- { NODE_ARGS, NEN_REST, NEN_OPT, NEN_CNT, "ARGS" },
11
- { NODE_ARGSCAT, NEN_HEAD, NEN_BODY, NEN_NONE, "ARGSCAT" },
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" },
9
+ { NODE_AND, NEN_2ND, NEN_1ST, NEN_NONE, "AND" },
10
+ { NODE_ARGS, NEN_CNT, NEN_REST, NEN_OPT, "ARGS" },
11
+ { NODE_ARGSCAT, NEN_BODY, NEN_HEAD, NEN_NONE, "ARGSCAT" },
12
+ { NODE_ARGSPUSH, NEN_BODY, NEN_HEAD, NEN_NONE, "ARGSPUSH" },
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
- { NODE_BACK_REF, NEN_NTH, NEN_CNT, NEN_NONE, "BACK_REF" },
16
+ { NODE_BACK_REF, NEN_CNT, NEN_NTH, 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
20
  { NODE_BLOCK_PASS, NEN_BODY, NEN_ITER, 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" },
23
+ { NODE_CALL, NEN_RECV, NEN_MID, NEN_ARGS, "CALL" },
24
+ { NODE_CASE, NEN_BODY, NEN_NEXT, NEN_HEAD, "CASE" },
25
25
  { NODE_CDECL, NEN_VALUE, NEN_VID, NEN_NONE, "CDECL" },
26
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" },
27
+ { NODE_CLASS, NEN_BODY, NEN_SUPER, NEN_CPATH, "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_BODY, NEN_CLSS, NEN_NEXT, "CREF" },
32
32
  { NODE_CVAR, NEN_VID, NEN_NONE, NEN_NONE, "CVAR" },
33
33
  { NODE_CVASGN, NEN_VALUE, NEN_VID, NEN_NONE, "CVASGN" },
34
34
  { NODE_CVDECL, NEN_VALUE, NEN_VID, NEN_NONE, "CVDECL" },
35
35
  { NODE_DASGN, NEN_VALUE, NEN_VID, NEN_NONE, "DASGN" },
36
36
  { NODE_DASGN_CURR, NEN_VALUE, NEN_VID, NEN_NONE, "DASGN_CURR" },
37
37
  { NODE_DEFINED, NEN_HEAD, NEN_NONE, NEN_NONE, "DEFINED" },
38
- { NODE_DEFN, NEN_DEFN, NEN_MID, NEN_NOEX, "DEFN" },
39
- { NODE_DEFS, NEN_DEFN, NEN_MID, NEN_RECV, "DEFS" },
38
+ { NODE_DEFN, NEN_NOEX, NEN_MID, NEN_DEFN, "DEFN" },
39
+ { NODE_DEFS, NEN_RECV, NEN_MID, NEN_DEFN, "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,45 +49,45 @@ 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" },
52
+ { NODE_FBODY, NEN_MID, NEN_ORIG, NEN_HEAD, "FBODY" },
53
+ { NODE_FCALL, NEN_MID, NEN_ARGS, NEN_NONE, "FCALL" },
54
+ { NODE_FLIP2, NEN_CNT, NEN_END, NEN_BEG, "FLIP2" },
55
+ { NODE_FLIP3, NEN_CNT, NEN_END, NEN_BEG, "FLIP3" },
56
56
  { NODE_FOR, NEN_BODY, NEN_ITER, NEN_VAR, "FOR" },
57
57
  { NODE_GASGN, NEN_VALUE, NEN_VID, NEN_ENTRY, "GASGN" },
58
58
  { NODE_GVAR, NEN_VID, NEN_ENTRY, NEN_NONE, "GVAR" },
59
59
  { NODE_HASH, NEN_HEAD, NEN_NONE, NEN_NONE, "HASH" },
60
60
  { NODE_IASGN, NEN_VALUE, NEN_VID, NEN_NONE, "IASGN" },
61
- { NODE_IF, NEN_COND, NEN_BODY, NEN_ELSE, "IF" },
62
- { NODE_IFUNC, NEN_CFNC, NEN_TVAL, NEN_STATE, "IFUNC" },
61
+ { NODE_IF, NEN_BODY, NEN_COND, NEN_ELSE, "IF" },
62
+ { NODE_IFUNC, NEN_CFNC, NEN_STATE, NEN_TVAL, "IFUNC" },
63
63
  { NODE_ITER, NEN_BODY, NEN_ITER, NEN_VAR, "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_VALUE, NEN_CNT, NEN_VID, "LASGN" },
66
66
  { NODE_LIT, NEN_LIT, NEN_NONE, NEN_NONE, "LIT" },
67
- { NODE_LVAR, NEN_VID, NEN_CNT, NEN_NONE, "LVAR" },
68
- { NODE_MASGN, NEN_ARGS, NEN_HEAD, NEN_VALUE, "MASGN" },
69
- { NODE_MATCH, NEN_LIT, NEN_VALUE, NEN_NONE, "MATCH" },
67
+ { NODE_LVAR, NEN_CNT, NEN_VID, NEN_NONE, "LVAR" },
68
+ { NODE_MASGN, NEN_VALUE, NEN_ARGS, NEN_HEAD, "MASGN" },
69
+ { NODE_MATCH, NEN_VALUE, NEN_LIT, NEN_NONE, "MATCH" },
70
70
  { NODE_MATCH2, NEN_VALUE, NEN_RECV, NEN_NONE, "MATCH2" },
71
71
  { NODE_MATCH3, NEN_VALUE, NEN_RECV, NEN_NONE, "MATCH3" },
72
72
  { NODE_MEMO, NEN_NONE, NEN_NONE, NEN_NONE, "MEMO" },
73
73
  { NODE_METHOD, NEN_BODY, NEN_NOEX, NEN_NONE, "METHOD" },
74
- { NODE_MODULE, NEN_CPATH, NEN_BODY, NEN_NONE, "MODULE" },
74
+ { NODE_MODULE, NEN_BODY, NEN_CPATH, 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" },
77
77
  { NODE_NIL, NEN_NONE, NEN_NONE, NEN_NONE, "NIL" },
78
78
  { NODE_NOT, NEN_BODY, NEN_NONE, NEN_NONE, "NOT" },
79
- { NODE_NTH_REF, NEN_NTH, NEN_CNT, NEN_NONE, "NTH_REF" },
79
+ { NODE_NTH_REF, NEN_CNT, NEN_NTH, 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" },
81
+ { NODE_OP_ASGN1, NEN_RECV, NEN_MID, NEN_ARGS, "OP_ASGN1" },
82
+ { NODE_OP_ASGN2, NEN_VALUE, NEN_RECV, NEN_NEXT, "OP_ASGN2" },
83
+ { NODE_OP_ASGN2_ARG, NEN_MID, NEN_VID, NEN_AID, "OP_ASGN2_ARG" },
84
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" },
86
- { NODE_OR, NEN_1ST, NEN_2ND, NEN_NONE, "OR" },
85
+ { NODE_OP_ASGN_OR, NEN_VALUE, NEN_RECV, NEN_AID, "OP_ASGN_OR" },
86
+ { NODE_OR, NEN_2ND, NEN_1ST, 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_BODY, NEN_ARGS, NEN_HEAD, "RESBODY" },
90
+ { NODE_RESCUE, NEN_RESQ, NEN_ELSE, NEN_HEAD, "RESCUE" },
91
91
  { NODE_RETRY, NEN_NONE, NEN_NONE, NEN_NONE, "RETRY" },
92
92
  { NODE_RETURN, NEN_STTS, NEN_NONE, NEN_NONE, "RETURN" },
93
93
  { NODE_SCLASS, NEN_BODY, NEN_RECV, NEN_NONE, "SCLASS" },
@@ -101,12 +101,12 @@ Node_Type_Descrip node_type_descrips_unsorted[] = {
101
101
  { NODE_TRUE, NEN_NONE, NEN_NONE, NEN_NONE, "TRUE" },
102
102
  { NODE_UNDEF, NEN_MID, NEN_NONE, NEN_NONE, "UNDEF" },
103
103
  { NODE_UNTIL, NEN_BODY, NEN_COND, NEN_STATE, "UNTIL" },
104
- { NODE_VALIAS, NEN_1ST, NEN_2ND, NEN_NONE, "VALIAS" },
104
+ { NODE_VALIAS, NEN_2ND, NEN_1ST, NEN_NONE, "VALIAS" },
105
105
  { NODE_VCALL, NEN_MID, NEN_NONE, NEN_NONE, "VCALL" },
106
- { NODE_WHEN, NEN_HEAD, NEN_BODY, NEN_NEXT, "WHEN" },
106
+ { NODE_WHEN, NEN_BODY, NEN_NEXT, NEN_HEAD, "WHEN" },
107
107
  { NODE_WHILE, NEN_BODY, NEN_COND, NEN_STATE, "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
  }
@@ -715,7 +715,7 @@ VALUE dump_node_elem(enum Node_Elem_Name nen, NODE * n, VALUE node_hash)
715
715
  else
716
716
  {
717
717
  path = rb_class_path(klass);
718
- if(STR2CSTR(path)[0] == '#')
718
+ if(StringValuePtr(path)[0] == '#')
719
719
  {
720
720
  rb_raise(rb_eArgError, "cannot dump anonymous class");
721
721
  }
@@ -903,7 +903,7 @@ VALUE dump_node_elem(enum Node_Elem_Name nen, NODE * n, VALUE node_hash)
903
903
  else
904
904
  {
905
905
  path = rb_class_path(klass);
906
- if(STR2CSTR(path)[0] == '#')
906
+ if(StringValuePtr(path)[0] == '#')
907
907
  {
908
908
  rb_raise(rb_eArgError, "cannot dump anonymous class");
909
909
  }
@@ -1158,20 +1158,23 @@ void load_node_elem(enum Node_Elem_Name nen, VALUE v, NODE * n, VALUE node_hash,
1158
1158
  }
1159
1159
  case NEN_CLSS:
1160
1160
  {
1161
+ int flags;
1161
1162
  Check_Type(v, T_ARRAY);
1162
1163
  if(RARRAY_LEN(v) != 2)
1163
1164
  {
1164
1165
  rb_raise(rb_eArgError, "wrong size for array");
1165
1166
  }
1166
- int flags = NUM2INT(RARRAY_PTR(v)[0]);
1167
+ flags = NUM2INT(RARRAY_PTR(v)[0]);
1167
1168
  switch(flags & T_MASK)
1168
1169
  {
1169
1170
  case T_CLASS:
1170
1171
  case T_MODULE:
1171
1172
  {
1172
- VALUE str = RARRAY_PTR(v)[1];
1173
+ VALUE str, klass;
1174
+
1175
+ str = RARRAY_PTR(v)[1];
1173
1176
  Check_Type(str, T_STRING);
1174
- VALUE klass = rb_path2class(STR2CSTR(str));
1177
+ klass = rb_path2class(StringValuePtr(str));
1175
1178
  if(flags & FL_SINGLETON)
1176
1179
  {
1177
1180
  *(VALUE *)(&n->nd_clss) =
@@ -1247,20 +1250,23 @@ void load_node_elem(enum Node_Elem_Name nen, VALUE v, NODE * n, VALUE node_hash,
1247
1250
  }
1248
1251
  case NEN_CVAL:
1249
1252
  {
1253
+ int flags;
1250
1254
  Check_Type(v, T_ARRAY);
1251
1255
  if(RARRAY_LEN(v) != 2)
1252
1256
  {
1253
1257
  rb_raise(rb_eArgError, "wrong size for array");
1254
1258
  }
1255
- int flags = NUM2INT(RARRAY_PTR(v)[0]);
1259
+ flags = NUM2INT(RARRAY_PTR(v)[0]);
1256
1260
  switch(flags & T_MASK)
1257
1261
  {
1258
1262
  case T_CLASS:
1259
1263
  case T_MODULE:
1260
1264
  {
1261
- VALUE str = RARRAY_PTR(v)[1];
1265
+ VALUE str, klass;
1266
+
1267
+ str = RARRAY_PTR(v)[1];
1262
1268
  Check_Type(str, T_STRING);
1263
- VALUE klass = rb_path2class(STR2CSTR(str));
1269
+ klass = rb_path2class(StringValuePtr(str));
1264
1270
  if(flags & FL_SINGLETON)
1265
1271
  {
1266
1272
  *(VALUE *)(&n->nd_cval) =
@@ -1486,20 +1492,23 @@ void load_node_elem(enum Node_Elem_Name nen, VALUE v, NODE * n, VALUE node_hash,
1486
1492
  }
1487
1493
  case NEN_LIT:
1488
1494
  {
1495
+ int flags;
1489
1496
  Check_Type(v, T_ARRAY);
1490
1497
  if(RARRAY_LEN(v) != 2)
1491
1498
  {
1492
1499
  rb_raise(rb_eArgError, "wrong size for array");
1493
1500
  }
1494
- int flags = NUM2INT(RARRAY_PTR(v)[0]);
1501
+ flags = NUM2INT(RARRAY_PTR(v)[0]);
1495
1502
  switch(flags & T_MASK)
1496
1503
  {
1497
1504
  case T_CLASS:
1498
1505
  case T_MODULE:
1499
1506
  {
1500
- VALUE str = RARRAY_PTR(v)[1];
1507
+ VALUE str, klass;
1508
+
1509
+ str = RARRAY_PTR(v)[1];
1501
1510
  Check_Type(str, T_STRING);
1502
- VALUE klass = rb_path2class(STR2CSTR(str));
1511
+ klass = rb_path2class(StringValuePtr(str));
1503
1512
  if(flags & FL_SINGLETON)
1504
1513
  {
1505
1514
  *(VALUE *)(&n->nd_lit) =
@@ -1644,20 +1653,23 @@ void load_node_elem(enum Node_Elem_Name nen, VALUE v, NODE * n, VALUE node_hash,
1644
1653
  }
1645
1654
  case NEN_ORIG:
1646
1655
  {
1656
+ int flags;
1647
1657
  Check_Type(v, T_ARRAY);
1648
1658
  if(RARRAY_LEN(v) != 2)
1649
1659
  {
1650
1660
  rb_raise(rb_eArgError, "wrong size for array");
1651
1661
  }
1652
- int flags = NUM2INT(RARRAY_PTR(v)[0]);
1662
+ flags = NUM2INT(RARRAY_PTR(v)[0]);
1653
1663
  switch(flags & T_MASK)
1654
1664
  {
1655
1665
  case T_CLASS:
1656
1666
  case T_MODULE:
1657
1667
  {
1658
- VALUE str = RARRAY_PTR(v)[1];
1668
+ VALUE str, klass;
1669
+
1670
+ str = RARRAY_PTR(v)[1];
1659
1671
  Check_Type(str, T_STRING);
1660
- VALUE klass = rb_path2class(STR2CSTR(str));
1672
+ klass = rb_path2class(StringValuePtr(str));
1661
1673
  if(flags & FL_SINGLETON)
1662
1674
  {
1663
1675
  *(VALUE *)(&n->nd_orig) =
@@ -1864,20 +1876,23 @@ void load_node_elem(enum Node_Elem_Name nen, VALUE v, NODE * n, VALUE node_hash,
1864
1876
  }
1865
1877
  case NEN_TVAL:
1866
1878
  {
1879
+ int flags;
1867
1880
  Check_Type(v, T_ARRAY);
1868
1881
  if(RARRAY_LEN(v) != 2)
1869
1882
  {
1870
1883
  rb_raise(rb_eArgError, "wrong size for array");
1871
1884
  }
1872
- int flags = NUM2INT(RARRAY_PTR(v)[0]);
1885
+ flags = NUM2INT(RARRAY_PTR(v)[0]);
1873
1886
  switch(flags & T_MASK)
1874
1887
  {
1875
1888
  case T_CLASS:
1876
1889
  case T_MODULE:
1877
1890
  {
1878
- VALUE str = RARRAY_PTR(v)[1];
1891
+ VALUE str, klass;
1892
+
1893
+ str = RARRAY_PTR(v)[1];
1879
1894
  Check_Type(str, T_STRING);
1880
- VALUE klass = rb_path2class(STR2CSTR(str));
1895
+ klass = rb_path2class(StringValuePtr(str));
1881
1896
  if(flags & FL_SINGLETON)
1882
1897
  {
1883
1898
  *(VALUE *)(&n->nd_tval) =
@@ -2911,10 +2926,10 @@ void define_node_subclass_methods()
2911
2926
  rb_iv_set(rb_cALIAS, "__member__", members);
2912
2927
  rb_iv_set(rb_cALIAS, "__type__", INT2NUM(NODE_ALIAS));
2913
2928
  rb_define_singleton_method(rb_cALIAS, "members", node_s_members, 0);
2914
- rb_define_method(rb_cALIAS, "first", node_1st, 0);
2915
- rb_ary_push(members, rb_str_new2("first"));
2916
2929
  rb_define_method(rb_cALIAS, "second", node_2nd, 0);
2917
2930
  rb_ary_push(members, rb_str_new2("second"));
2931
+ rb_define_method(rb_cALIAS, "first", node_1st, 0);
2932
+ rb_ary_push(members, rb_str_new2("first"));
2918
2933
  }
2919
2934
 
2920
2935
  /* Document-class: Node::ALLOCA
@@ -2932,18 +2947,18 @@ void define_node_subclass_methods()
2932
2947
  rb_iv_set(rb_cALLOCA, "__type__", INT2NUM(NODE_ALLOCA));
2933
2948
  rb_define_singleton_method(rb_cALLOCA, "members", node_s_members, 0);
2934
2949
 
2935
- /* Document-method: cfnc
2936
- * a pointer to the allocated memory
2937
- */
2938
- rb_define_method(rb_cALLOCA, "cfnc", node_cfnc, 0);
2939
- rb_ary_push(members, rb_str_new2("cfnc"));
2940
-
2941
2950
  /* Document-method: value
2942
2951
  * a pointer to the previously allocated temporary node
2943
2952
  */
2944
2953
  rb_define_method(rb_cALLOCA, "value", node_value, 0);
2945
2954
  rb_ary_push(members, rb_str_new2("value"));
2946
2955
 
2956
+ /* Document-method: cfnc
2957
+ * a pointer to the allocated memory
2958
+ */
2959
+ rb_define_method(rb_cALLOCA, "cfnc", node_cfnc, 0);
2960
+ rb_ary_push(members, rb_str_new2("cfnc"));
2961
+
2947
2962
  /* Document-method: cnt
2948
2963
  * the number of bytes allocated
2949
2964
  */
@@ -2967,17 +2982,17 @@ void define_node_subclass_methods()
2967
2982
  rb_iv_set(rb_cAND, "__type__", INT2NUM(NODE_AND));
2968
2983
  rb_define_singleton_method(rb_cAND, "members", node_s_members, 0);
2969
2984
 
2970
- /* Document-method: first
2971
- * the expression on the left hand side
2972
- */
2973
- rb_define_method(rb_cAND, "first", node_1st, 0);
2974
- rb_ary_push(members, rb_str_new2("first"));
2975
-
2976
2985
  /* Document-method: second
2977
2986
  * the expression on the right hand side
2978
2987
  */
2979
2988
  rb_define_method(rb_cAND, "second", node_2nd, 0);
2980
2989
  rb_ary_push(members, rb_str_new2("second"));
2990
+
2991
+ /* Document-method: first
2992
+ * the expression on the left hand side
2993
+ */
2994
+ rb_define_method(rb_cAND, "first", node_1st, 0);
2995
+ rb_ary_push(members, rb_str_new2("first"));
2981
2996
  }
2982
2997
 
2983
2998
  /* Document-class: Node::ARGS
@@ -2991,6 +3006,12 @@ void define_node_subclass_methods()
2991
3006
  rb_iv_set(rb_cARGS, "__type__", INT2NUM(NODE_ARGS));
2992
3007
  rb_define_singleton_method(rb_cARGS, "members", node_s_members, 0);
2993
3008
 
3009
+ /* Document-method: cnt
3010
+ * the number of required arguments
3011
+ */
3012
+ rb_define_method(rb_cARGS, "cnt", node_cnt, 0);
3013
+ rb_ary_push(members, rb_str_new2("cnt"));
3014
+
2994
3015
  /* Document-method: rest
2995
3016
  * an assignment node to assign the rest arg, if it is present
2996
3017
  */
@@ -3003,12 +3024,6 @@ void define_node_subclass_methods()
3003
3024
  */
3004
3025
  rb_define_method(rb_cARGS, "opt", node_opt, 0);
3005
3026
  rb_ary_push(members, rb_str_new2("opt"));
3006
-
3007
- /* Document-method: cnt
3008
- * the number of required arguments
3009
- */
3010
- rb_define_method(rb_cARGS, "cnt", node_cnt, 0);
3011
- rb_ary_push(members, rb_str_new2("cnt"));
3012
3027
  }
3013
3028
 
3014
3029
  /* Document-class: Node::ARGSCAT
@@ -3028,18 +3043,18 @@ void define_node_subclass_methods()
3028
3043
  rb_iv_set(rb_cARGSCAT, "__type__", INT2NUM(NODE_ARGSCAT));
3029
3044
  rb_define_singleton_method(rb_cARGSCAT, "members", node_s_members, 0);
3030
3045
 
3031
- /* Document-method: head
3032
- * a list of fixed arguments
3033
- */
3034
- rb_define_method(rb_cARGSCAT, "head", node_head, 0);
3035
- rb_ary_push(members, rb_str_new2("head"));
3036
-
3037
3046
  /* Document-method: body
3038
3047
  * the last argument, which will be splatted onto the end of the
3039
3048
  * fixed arguments
3040
3049
  */
3041
3050
  rb_define_method(rb_cARGSCAT, "body", node_body, 0);
3042
3051
  rb_ary_push(members, rb_str_new2("body"));
3052
+
3053
+ /* Document-method: head
3054
+ * a list of fixed arguments
3055
+ */
3056
+ rb_define_method(rb_cARGSCAT, "head", node_head, 0);
3057
+ rb_ary_push(members, rb_str_new2("head"));
3043
3058
  }
3044
3059
 
3045
3060
  /* Document-class: Node::ARGSPUSH
@@ -3056,10 +3071,10 @@ void define_node_subclass_methods()
3056
3071
  rb_iv_set(rb_cARGSPUSH, "__member__", members);
3057
3072
  rb_iv_set(rb_cARGSPUSH, "__type__", INT2NUM(NODE_ARGSPUSH));
3058
3073
  rb_define_singleton_method(rb_cARGSPUSH, "members", node_s_members, 0);
3059
- rb_define_method(rb_cARGSPUSH, "head", node_head, 0);
3060
- rb_ary_push(members, rb_str_new2("head"));
3061
3074
  rb_define_method(rb_cARGSPUSH, "body", node_body, 0);
3062
3075
  rb_ary_push(members, rb_str_new2("body"));
3076
+ rb_define_method(rb_cARGSPUSH, "head", node_head, 0);
3077
+ rb_ary_push(members, rb_str_new2("head"));
3063
3078
  }
3064
3079
 
3065
3080
  /* Document-class: Node::ARRAY
@@ -3074,12 +3089,6 @@ void define_node_subclass_methods()
3074
3089
  rb_iv_set(rb_cARRAY, "__member__", members);
3075
3090
  rb_iv_set(rb_cARRAY, "__type__", INT2NUM(NODE_ARRAY));
3076
3091
  rb_define_singleton_method(rb_cARRAY, "members", node_s_members, 0);
3077
-
3078
- /* Document-method: head
3079
- * the first element of the array
3080
- */
3081
- rb_define_method(rb_cARRAY, "head", node_head, 0);
3082
- rb_ary_push(members, rb_str_new2("head"));
3083
3092
  rb_define_method(rb_cARRAY, "alen", node_alen, 0);
3084
3093
  rb_ary_push(members, rb_str_new2("alen"));
3085
3094
 
@@ -3088,6 +3097,12 @@ void define_node_subclass_methods()
3088
3097
  */
3089
3098
  rb_define_method(rb_cARRAY, "next", node_next, 0);
3090
3099
  rb_ary_push(members, rb_str_new2("next"));
3100
+
3101
+ /* Document-method: head
3102
+ * the first element of the array
3103
+ */
3104
+ rb_define_method(rb_cARRAY, "head", node_head, 0);
3105
+ rb_ary_push(members, rb_str_new2("head"));
3091
3106
  }
3092
3107
 
3093
3108
  /* Document-class: Node::ATTRASGN
@@ -3104,11 +3119,11 @@ void define_node_subclass_methods()
3104
3119
  rb_iv_set(rb_cATTRASGN, "__type__", INT2NUM(NODE_ATTRASGN));
3105
3120
  rb_define_singleton_method(rb_cATTRASGN, "members", node_s_members, 0);
3106
3121
 
3107
- /* Document-method: args
3108
- * the arguments to the method
3122
+ /* Document-method: recv
3123
+ * the receiver of the method
3109
3124
  */
3110
- rb_define_method(rb_cATTRASGN, "args", node_args, 0);
3111
- rb_ary_push(members, rb_str_new2("args"));
3125
+ rb_define_method(rb_cATTRASGN, "recv", node_recv, 0);
3126
+ rb_ary_push(members, rb_str_new2("recv"));
3112
3127
 
3113
3128
  /* Document-method: mid
3114
3129
  * the id of the attribute, with a trailing '=' sign
@@ -3116,11 +3131,11 @@ void define_node_subclass_methods()
3116
3131
  rb_define_method(rb_cATTRASGN, "mid", node_mid, 0);
3117
3132
  rb_ary_push(members, rb_str_new2("mid"));
3118
3133
 
3119
- /* Document-method: recv
3120
- * the receiver of the method
3134
+ /* Document-method: args
3135
+ * the arguments to the method
3121
3136
  */
3122
- rb_define_method(rb_cATTRASGN, "recv", node_recv, 0);
3123
- rb_ary_push(members, rb_str_new2("recv"));
3137
+ rb_define_method(rb_cATTRASGN, "args", node_args, 0);
3138
+ rb_ary_push(members, rb_str_new2("args"));
3124
3139
  }
3125
3140
 
3126
3141
  /* Document-class: Node::ATTRSET
@@ -3159,19 +3174,19 @@ void define_node_subclass_methods()
3159
3174
  rb_iv_set(rb_cBACK_REF, "__type__", INT2NUM(NODE_BACK_REF));
3160
3175
  rb_define_singleton_method(rb_cBACK_REF, "members", node_s_members, 0);
3161
3176
 
3162
- /* Document-method: nth
3163
- * the integer representation of the character of the variable to
3164
- * reference, one of '&', '`', '\'', or '+'
3165
- */
3166
- rb_define_method(rb_cBACK_REF, "nth", node_nth, 0);
3167
- rb_ary_push(members, rb_str_new2("nth"));
3168
-
3169
3177
  /* Document-method: cnt
3170
3178
  * the index into the local variable table where the match data is
3171
3179
  * stored
3172
3180
  */
3173
3181
  rb_define_method(rb_cBACK_REF, "cnt", node_cnt, 0);
3174
3182
  rb_ary_push(members, rb_str_new2("cnt"));
3183
+
3184
+ /* Document-method: nth
3185
+ * the integer representation of the character of the variable to
3186
+ * reference, one of '&', '`', '\'', or '+'
3187
+ */
3188
+ rb_define_method(rb_cBACK_REF, "nth", node_nth, 0);
3189
+ rb_ary_push(members, rb_str_new2("nth"));
3175
3190
  }
3176
3191
 
3177
3192
  /* Document-class: Node::BEGIN
@@ -3208,17 +3223,17 @@ void define_node_subclass_methods()
3208
3223
  rb_iv_set(rb_cBLOCK, "__type__", INT2NUM(NODE_BLOCK));
3209
3224
  rb_define_singleton_method(rb_cBLOCK, "members", node_s_members, 0);
3210
3225
 
3211
- /* Document-method: head
3212
- * the first expression in the block of code
3213
- */
3214
- rb_define_method(rb_cBLOCK, "head", node_head, 0);
3215
- rb_ary_push(members, rb_str_new2("head"));
3216
-
3217
3226
  /* Document-method: next
3218
3227
  * the second expression in the block of code
3219
3228
  */
3220
3229
  rb_define_method(rb_cBLOCK, "next", node_next, 0);
3221
3230
  rb_ary_push(members, rb_str_new2("next"));
3231
+
3232
+ /* Document-method: head
3233
+ * the first expression in the block of code
3234
+ */
3235
+ rb_define_method(rb_cBLOCK, "head", node_head, 0);
3236
+ rb_ary_push(members, rb_str_new2("head"));
3222
3237
  }
3223
3238
 
3224
3239
  /* Document-class: Node::BLOCK_ARG
@@ -3326,11 +3341,11 @@ void define_node_subclass_methods()
3326
3341
  rb_iv_set(rb_cCALL, "__type__", INT2NUM(NODE_CALL));
3327
3342
  rb_define_singleton_method(rb_cCALL, "members", node_s_members, 0);
3328
3343
 
3329
- /* Document-method: args
3330
- * the arguments to the method
3344
+ /* Document-method: recv
3345
+ * the receiver of the method
3331
3346
  */
3332
- rb_define_method(rb_cCALL, "args", node_args, 0);
3333
- rb_ary_push(members, rb_str_new2("args"));
3347
+ rb_define_method(rb_cCALL, "recv", node_recv, 0);
3348
+ rb_ary_push(members, rb_str_new2("recv"));
3334
3349
 
3335
3350
  /* Document-method: mid
3336
3351
  * the method id
@@ -3338,11 +3353,11 @@ void define_node_subclass_methods()
3338
3353
  rb_define_method(rb_cCALL, "mid", node_mid, 0);
3339
3354
  rb_ary_push(members, rb_str_new2("mid"));
3340
3355
 
3341
- /* Document-method: recv
3342
- * the receiver of the method
3356
+ /* Document-method: args
3357
+ * the arguments to the method
3343
3358
  */
3344
- rb_define_method(rb_cCALL, "recv", node_recv, 0);
3345
- rb_ary_push(members, rb_str_new2("recv"));
3359
+ rb_define_method(rb_cCALL, "args", node_args, 0);
3360
+ rb_ary_push(members, rb_str_new2("args"));
3346
3361
  }
3347
3362
 
3348
3363
  /* Document-class: Node::CASE
@@ -3360,12 +3375,6 @@ void define_node_subclass_methods()
3360
3375
  rb_iv_set(rb_cCASE, "__type__", INT2NUM(NODE_CASE));
3361
3376
  rb_define_singleton_method(rb_cCASE, "members", node_s_members, 0);
3362
3377
 
3363
- /* Document-method: head
3364
- * the value to select on
3365
- */
3366
- rb_define_method(rb_cCASE, "head", node_head, 0);
3367
- rb_ary_push(members, rb_str_new2("head"));
3368
-
3369
3378
  /* Document-method: body
3370
3379
  * a linked list of nodes, each node representing a when
3371
3380
  * conditional
@@ -3374,6 +3383,12 @@ void define_node_subclass_methods()
3374
3383
  rb_ary_push(members, rb_str_new2("body"));
3375
3384
  rb_define_method(rb_cCASE, "next", node_next, 0);
3376
3385
  rb_ary_push(members, rb_str_new2("next"));
3386
+
3387
+ /* Document-method: head
3388
+ * the value to select on
3389
+ */
3390
+ rb_define_method(rb_cCASE, "head", node_head, 0);
3391
+ rb_ary_push(members, rb_str_new2("head"));
3377
3392
  }
3378
3393
 
3379
3394
  /* Document-class: Node::CDECL
@@ -3441,12 +3456,6 @@ void define_node_subclass_methods()
3441
3456
  rb_iv_set(rb_cCLASS, "__type__", INT2NUM(NODE_CLASS));
3442
3457
  rb_define_singleton_method(rb_cCLASS, "members", node_s_members, 0);
3443
3458
 
3444
- /* Document-method: cpath
3445
- * the name of the class to define
3446
- */
3447
- rb_define_method(rb_cCLASS, "cpath", node_cpath, 0);
3448
- rb_ary_push(members, rb_str_new2("cpath"));
3449
-
3450
3459
  /* Document-method: body
3451
3460
  * the body of the class definition
3452
3461
  */
@@ -3459,6 +3468,12 @@ void define_node_subclass_methods()
3459
3468
  */
3460
3469
  rb_define_method(rb_cCLASS, "super", node_super, 0);
3461
3470
  rb_ary_push(members, rb_str_new2("super"));
3471
+
3472
+ /* Document-method: cpath
3473
+ * the name of the class to define
3474
+ */
3475
+ rb_define_method(rb_cCLASS, "cpath", node_cpath, 0);
3476
+ rb_ary_push(members, rb_str_new2("cpath"));
3462
3477
  }
3463
3478
 
3464
3479
  /* Document-class: Node::COLON2
@@ -3477,17 +3492,17 @@ void define_node_subclass_methods()
3477
3492
  rb_iv_set(rb_cCOLON2, "__type__", INT2NUM(NODE_COLON2));
3478
3493
  rb_define_singleton_method(rb_cCOLON2, "members", node_s_members, 0);
3479
3494
 
3480
- /* Document-method: head
3481
- * an expression specifying the class in which to do the lookup
3482
- */
3483
- rb_define_method(rb_cCOLON2, "head", node_head, 0);
3484
- rb_ary_push(members, rb_str_new2("head"));
3485
-
3486
3495
  /* Document-method: mid
3487
3496
  * the name of the method or constant to call/look up
3488
3497
  */
3489
3498
  rb_define_method(rb_cCOLON2, "mid", node_mid, 0);
3490
3499
  rb_ary_push(members, rb_str_new2("mid"));
3500
+
3501
+ /* Document-method: head
3502
+ * an expression specifying the class in which to do the lookup
3503
+ */
3504
+ rb_define_method(rb_cCOLON2, "head", node_head, 0);
3505
+ rb_ary_push(members, rb_str_new2("head"));
3491
3506
  }
3492
3507
 
3493
3508
  /* Document-class: Node::COLON3
@@ -3552,17 +3567,17 @@ void define_node_subclass_methods()
3552
3567
  rb_define_method(rb_cCREF, "body", node_body, 0);
3553
3568
  rb_ary_push(members, rb_str_new2("body"));
3554
3569
 
3555
- /* Document-method: next
3556
- * the previous value of ruby_cref or ruby_top_cref
3557
- */
3558
- rb_define_method(rb_cCREF, "next", node_next, 0);
3559
- rb_ary_push(members, rb_str_new2("next"));
3560
-
3561
3570
  /* Document-method: clss
3562
3571
  * the new class to use for the cbase.
3563
3572
  */
3564
3573
  rb_define_method(rb_cCREF, "clss", node_clss, 0);
3565
3574
  rb_ary_push(members, rb_str_new2("clss"));
3575
+
3576
+ /* Document-method: next
3577
+ * the previous value of ruby_cref or ruby_top_cref
3578
+ */
3579
+ rb_define_method(rb_cCREF, "next", node_next, 0);
3580
+ rb_ary_push(members, rb_str_new2("next"));
3566
3581
  }
3567
3582
 
3568
3583
  /* Document-class: Node::CVAR
@@ -3727,11 +3742,11 @@ void define_node_subclass_methods()
3727
3742
  rb_iv_set(rb_cDEFN, "__type__", INT2NUM(NODE_DEFN));
3728
3743
  rb_define_singleton_method(rb_cDEFN, "members", node_s_members, 0);
3729
3744
 
3730
- /* Document-method: defn
3731
- * the body of the method definition
3745
+ /* Document-method: noex
3746
+ * the flags which should be used to define the method
3732
3747
  */
3733
- rb_define_method(rb_cDEFN, "defn", node_defn, 0);
3734
- rb_ary_push(members, rb_str_new2("defn"));
3748
+ rb_define_method(rb_cDEFN, "noex", node_noex, 0);
3749
+ rb_ary_push(members, rb_str_new2("noex"));
3735
3750
 
3736
3751
  /* Document-method: mid
3737
3752
  * the name of the method* defn the body of the method
@@ -3739,11 +3754,11 @@ void define_node_subclass_methods()
3739
3754
  rb_define_method(rb_cDEFN, "mid", node_mid, 0);
3740
3755
  rb_ary_push(members, rb_str_new2("mid"));
3741
3756
 
3742
- /* Document-method: noex
3743
- * the flags which should be used to define the method
3757
+ /* Document-method: defn
3758
+ * the body of the method definition
3744
3759
  */
3745
- rb_define_method(rb_cDEFN, "noex", node_noex, 0);
3746
- rb_ary_push(members, rb_str_new2("noex"));
3760
+ rb_define_method(rb_cDEFN, "defn", node_defn, 0);
3761
+ rb_ary_push(members, rb_str_new2("defn"));
3747
3762
  }
3748
3763
 
3749
3764
  /* Document-class: Node::DEFS
@@ -3759,20 +3774,20 @@ void define_node_subclass_methods()
3759
3774
  rb_iv_set(rb_cDEFS, "__member__", members);
3760
3775
  rb_iv_set(rb_cDEFS, "__type__", INT2NUM(NODE_DEFS));
3761
3776
  rb_define_singleton_method(rb_cDEFS, "members", node_s_members, 0);
3762
- rb_define_method(rb_cDEFS, "defn", node_defn, 0);
3763
- rb_ary_push(members, rb_str_new2("defn"));
3764
-
3765
- /* Document-method: mid
3766
- * the name of the method* defn the body of the method
3767
- */
3768
- rb_define_method(rb_cDEFS, "mid", node_mid, 0);
3769
- rb_ary_push(members, rb_str_new2("mid"));
3770
3777
 
3771
3778
  /* Document-method: recv
3772
3779
  * the object to whose singleton class the new method is to be added
3773
3780
  */
3774
3781
  rb_define_method(rb_cDEFS, "recv", node_recv, 0);
3775
3782
  rb_ary_push(members, rb_str_new2("recv"));
3783
+
3784
+ /* Document-method: mid
3785
+ * the name of the method* defn the body of the method
3786
+ */
3787
+ rb_define_method(rb_cDEFS, "mid", node_mid, 0);
3788
+ rb_ary_push(members, rb_str_new2("mid"));
3789
+ rb_define_method(rb_cDEFS, "defn", node_defn, 0);
3790
+ rb_ary_push(members, rb_str_new2("defn"));
3776
3791
  }
3777
3792
 
3778
3793
  /* Document-class: Node::DMETHOD
@@ -3811,17 +3826,17 @@ void define_node_subclass_methods()
3811
3826
  rb_iv_set(rb_cDOT2, "__type__", INT2NUM(NODE_DOT2));
3812
3827
  rb_define_singleton_method(rb_cDOT2, "members", node_s_members, 0);
3813
3828
 
3814
- /* Document-method: beg
3815
- * the beginning of the range
3816
- */
3817
- rb_define_method(rb_cDOT2, "beg", node_beg, 0);
3818
- rb_ary_push(members, rb_str_new2("beg"));
3819
-
3820
3829
  /* Document-method: end
3821
3830
  * the end of the range
3822
3831
  */
3823
3832
  rb_define_method(rb_cDOT2, "end", node_end, 0);
3824
3833
  rb_ary_push(members, rb_str_new2("end"));
3834
+
3835
+ /* Document-method: beg
3836
+ * the beginning of the range
3837
+ */
3838
+ rb_define_method(rb_cDOT2, "beg", node_beg, 0);
3839
+ rb_ary_push(members, rb_str_new2("beg"));
3825
3840
  rb_define_method(rb_cDOT2, "state", node_state, 0);
3826
3841
  rb_ary_push(members, rb_str_new2("state"));
3827
3842
  }
@@ -3839,17 +3854,17 @@ void define_node_subclass_methods()
3839
3854
  rb_iv_set(rb_cDOT3, "__type__", INT2NUM(NODE_DOT3));
3840
3855
  rb_define_singleton_method(rb_cDOT3, "members", node_s_members, 0);
3841
3856
 
3842
- /* Document-method: beg
3843
- * the beginning of the range
3844
- */
3845
- rb_define_method(rb_cDOT3, "beg", node_beg, 0);
3846
- rb_ary_push(members, rb_str_new2("beg"));
3847
-
3848
3857
  /* Document-method: end
3849
3858
  * the end of the range
3850
3859
  */
3851
3860
  rb_define_method(rb_cDOT3, "end", node_end, 0);
3852
3861
  rb_ary_push(members, rb_str_new2("end"));
3862
+
3863
+ /* Document-method: beg
3864
+ * the beginning of the range
3865
+ */
3866
+ rb_define_method(rb_cDOT3, "beg", node_beg, 0);
3867
+ rb_ary_push(members, rb_str_new2("beg"));
3853
3868
  rb_define_method(rb_cDOT3, "state", node_state, 0);
3854
3869
  rb_ary_push(members, rb_str_new2("state"));
3855
3870
  }
@@ -4120,11 +4135,11 @@ void define_node_subclass_methods()
4120
4135
  rb_iv_set(rb_cFBODY, "__type__", INT2NUM(NODE_FBODY));
4121
4136
  rb_define_singleton_method(rb_cFBODY, "members", node_s_members, 0);
4122
4137
 
4123
- /* Document-method: head
4124
- * the method body
4138
+ /* Document-method: mid
4139
+ * the name of the method
4125
4140
  */
4126
- rb_define_method(rb_cFBODY, "head", node_head, 0);
4127
- rb_ary_push(members, rb_str_new2("head"));
4141
+ rb_define_method(rb_cFBODY, "mid", node_mid, 0);
4142
+ rb_ary_push(members, rb_str_new2("mid"));
4128
4143
 
4129
4144
  /* Document-method: orig
4130
4145
  * the origin class
@@ -4132,11 +4147,11 @@ void define_node_subclass_methods()
4132
4147
  rb_define_method(rb_cFBODY, "orig", node_orig, 0);
4133
4148
  rb_ary_push(members, rb_str_new2("orig"));
4134
4149
 
4135
- /* Document-method: mid
4136
- * the name of the method
4150
+ /* Document-method: head
4151
+ * the method body
4137
4152
  */
4138
- rb_define_method(rb_cFBODY, "mid", node_mid, 0);
4139
- rb_ary_push(members, rb_str_new2("mid"));
4153
+ rb_define_method(rb_cFBODY, "head", node_head, 0);
4154
+ rb_ary_push(members, rb_str_new2("head"));
4140
4155
  }
4141
4156
 
4142
4157
  /* Document-class: Node::FCALL
@@ -4154,17 +4169,17 @@ void define_node_subclass_methods()
4154
4169
  rb_iv_set(rb_cFCALL, "__type__", INT2NUM(NODE_FCALL));
4155
4170
  rb_define_singleton_method(rb_cFCALL, "members", node_s_members, 0);
4156
4171
 
4157
- /* Document-method: args
4158
- * the arguments to the method
4159
- */
4160
- rb_define_method(rb_cFCALL, "args", node_args, 0);
4161
- rb_ary_push(members, rb_str_new2("args"));
4162
-
4163
4172
  /* Document-method: mid
4164
4173
  * the method id
4165
4174
  */
4166
4175
  rb_define_method(rb_cFCALL, "mid", node_mid, 0);
4167
4176
  rb_ary_push(members, rb_str_new2("mid"));
4177
+
4178
+ /* Document-method: args
4179
+ * the arguments to the method
4180
+ */
4181
+ rb_define_method(rb_cFCALL, "args", node_args, 0);
4182
+ rb_ary_push(members, rb_str_new2("args"));
4168
4183
  }
4169
4184
 
4170
4185
  /* Document-class: Node::FLIP2
@@ -4181,11 +4196,12 @@ void define_node_subclass_methods()
4181
4196
  rb_iv_set(rb_cFLIP2, "__type__", INT2NUM(NODE_FLIP2));
4182
4197
  rb_define_singleton_method(rb_cFLIP2, "members", node_s_members, 0);
4183
4198
 
4184
- /* Document-method: beg
4185
- * the beginning of the range
4199
+ /* Document-method: cnt
4200
+ * the index into the local variable table of the special variable
4201
+ * to use in the flip-flop expression (usually 2 for $_)
4186
4202
  */
4187
- rb_define_method(rb_cFLIP2, "beg", node_beg, 0);
4188
- rb_ary_push(members, rb_str_new2("beg"));
4203
+ rb_define_method(rb_cFLIP2, "cnt", node_cnt, 0);
4204
+ rb_ary_push(members, rb_str_new2("cnt"));
4189
4205
 
4190
4206
  /* Document-method: end
4191
4207
  * the end of the range
@@ -4193,12 +4209,11 @@ void define_node_subclass_methods()
4193
4209
  rb_define_method(rb_cFLIP2, "end", node_end, 0);
4194
4210
  rb_ary_push(members, rb_str_new2("end"));
4195
4211
 
4196
- /* Document-method: cnt
4197
- * the index into the local variable table of the special variable
4198
- * to use in the flip-flop expression (usually 2 for $_)
4212
+ /* Document-method: beg
4213
+ * the beginning of the range
4199
4214
  */
4200
- rb_define_method(rb_cFLIP2, "cnt", node_cnt, 0);
4201
- rb_ary_push(members, rb_str_new2("cnt"));
4215
+ rb_define_method(rb_cFLIP2, "beg", node_beg, 0);
4216
+ rb_ary_push(members, rb_str_new2("beg"));
4202
4217
  }
4203
4218
 
4204
4219
  /* Document-class: Node::FLIP3
@@ -4215,11 +4230,12 @@ void define_node_subclass_methods()
4215
4230
  rb_iv_set(rb_cFLIP3, "__type__", INT2NUM(NODE_FLIP3));
4216
4231
  rb_define_singleton_method(rb_cFLIP3, "members", node_s_members, 0);
4217
4232
 
4218
- /* Document-method: beg
4219
- * the beginning of the range
4233
+ /* Document-method: cnt
4234
+ * the index into the local variable table of the special variable
4235
+ * to use in the flip-flop expression (usually 2 for $_)
4220
4236
  */
4221
- rb_define_method(rb_cFLIP3, "beg", node_beg, 0);
4222
- rb_ary_push(members, rb_str_new2("beg"));
4237
+ rb_define_method(rb_cFLIP3, "cnt", node_cnt, 0);
4238
+ rb_ary_push(members, rb_str_new2("cnt"));
4223
4239
 
4224
4240
  /* Document-method: end
4225
4241
  * the end of the range
@@ -4227,12 +4243,11 @@ void define_node_subclass_methods()
4227
4243
  rb_define_method(rb_cFLIP3, "end", node_end, 0);
4228
4244
  rb_ary_push(members, rb_str_new2("end"));
4229
4245
 
4230
- /* Document-method: cnt
4231
- * the index into the local variable table of the special variable
4232
- * to use in the flip-flop expression (usually 2 for $_)
4246
+ /* Document-method: beg
4247
+ * the beginning of the range
4233
4248
  */
4234
- rb_define_method(rb_cFLIP3, "cnt", node_cnt, 0);
4235
- rb_ary_push(members, rb_str_new2("cnt"));
4249
+ rb_define_method(rb_cFLIP3, "beg", node_beg, 0);
4250
+ rb_ary_push(members, rb_str_new2("beg"));
4236
4251
  }
4237
4252
 
4238
4253
  /* Document-class: Node::FOR
@@ -4396,12 +4411,6 @@ void define_node_subclass_methods()
4396
4411
  rb_iv_set(rb_cIF, "__type__", INT2NUM(NODE_IF));
4397
4412
  rb_define_singleton_method(rb_cIF, "members", node_s_members, 0);
4398
4413
 
4399
- /* Document-method: cond
4400
- * the condition to evaluate
4401
- */
4402
- rb_define_method(rb_cIF, "cond", node_cond, 0);
4403
- rb_ary_push(members, rb_str_new2("cond"));
4404
-
4405
4414
  /* Document-method: body
4406
4415
  * the expression to evaluate if the expression is true, or false
4407
4416
  * if the expression is empty
@@ -4409,6 +4418,12 @@ void define_node_subclass_methods()
4409
4418
  rb_define_method(rb_cIF, "body", node_body, 0);
4410
4419
  rb_ary_push(members, rb_str_new2("body"));
4411
4420
 
4421
+ /* Document-method: cond
4422
+ * the condition to evaluate
4423
+ */
4424
+ rb_define_method(rb_cIF, "cond", node_cond, 0);
4425
+ rb_ary_push(members, rb_str_new2("cond"));
4426
+
4412
4427
  /* Document-method: else
4413
4428
  * the expression to evaluate if the expression is false, or false
4414
4429
  * if the expression is empty
@@ -4434,18 +4449,18 @@ void define_node_subclass_methods()
4434
4449
  rb_define_method(rb_cIFUNC, "cfnc", node_cfnc, 0);
4435
4450
  rb_ary_push(members, rb_str_new2("cfnc"));
4436
4451
 
4452
+ /* Document-method: state
4453
+ * always 0
4454
+ */
4455
+ rb_define_method(rb_cIFUNC, "state", node_state, 0);
4456
+ rb_ary_push(members, rb_str_new2("state"));
4457
+
4437
4458
  /* Document-method: tval
4438
4459
  * the user-specified data to be passed as the second argument to
4439
4460
  * cfnc
4440
4461
  */
4441
4462
  rb_define_method(rb_cIFUNC, "tval", node_tval, 0);
4442
4463
  rb_ary_push(members, rb_str_new2("tval"));
4443
-
4444
- /* Document-method: state
4445
- * always 0
4446
- */
4447
- rb_define_method(rb_cIFUNC, "state", node_state, 0);
4448
- rb_ary_push(members, rb_str_new2("state"));
4449
4464
  }
4450
4465
 
4451
4466
  /* Document-class: Node::ITER
@@ -4528,14 +4543,14 @@ void define_node_subclass_methods()
4528
4543
  */
4529
4544
  rb_define_method(rb_cLASGN, "value", node_value, 0);
4530
4545
  rb_ary_push(members, rb_str_new2("value"));
4546
+ rb_define_method(rb_cLASGN, "cnt", node_cnt, 0);
4547
+ rb_ary_push(members, rb_str_new2("cnt"));
4531
4548
 
4532
4549
  /* Document-method: vid
4533
4550
  * the name of the local variable
4534
4551
  */
4535
4552
  rb_define_method(rb_cLASGN, "vid", node_vid, 0);
4536
4553
  rb_ary_push(members, rb_str_new2("vid"));
4537
- rb_define_method(rb_cLASGN, "cnt", node_cnt, 0);
4538
- rb_ary_push(members, rb_str_new2("cnt"));
4539
4554
  }
4540
4555
 
4541
4556
  /* Document-class: Node::LIT
@@ -4567,14 +4582,14 @@ void define_node_subclass_methods()
4567
4582
  rb_iv_set(rb_cLVAR, "__member__", members);
4568
4583
  rb_iv_set(rb_cLVAR, "__type__", INT2NUM(NODE_LVAR));
4569
4584
  rb_define_singleton_method(rb_cLVAR, "members", node_s_members, 0);
4585
+ rb_define_method(rb_cLVAR, "cnt", node_cnt, 0);
4586
+ rb_ary_push(members, rb_str_new2("cnt"));
4570
4587
 
4571
4588
  /* Document-method: vid
4572
4589
  * the name of the local variable to retrieve.
4573
4590
  */
4574
4591
  rb_define_method(rb_cLVAR, "vid", node_vid, 0);
4575
4592
  rb_ary_push(members, rb_str_new2("vid"));
4576
- rb_define_method(rb_cLVAR, "cnt", node_cnt, 0);
4577
- rb_ary_push(members, rb_str_new2("cnt"));
4578
4593
  }
4579
4594
 
4580
4595
  /* Document-class: Node::MASGN
@@ -4588,6 +4603,12 @@ void define_node_subclass_methods()
4588
4603
  rb_iv_set(rb_cMASGN, "__type__", INT2NUM(NODE_MASGN));
4589
4604
  rb_define_singleton_method(rb_cMASGN, "members", node_s_members, 0);
4590
4605
 
4606
+ /* Document-method: value
4607
+ * TODO
4608
+ */
4609
+ rb_define_method(rb_cMASGN, "value", node_value, 0);
4610
+ rb_ary_push(members, rb_str_new2("value"));
4611
+
4591
4612
  /* Document-method: args
4592
4613
  * TODO
4593
4614
  */
@@ -4599,12 +4620,6 @@ void define_node_subclass_methods()
4599
4620
  */
4600
4621
  rb_define_method(rb_cMASGN, "head", node_head, 0);
4601
4622
  rb_ary_push(members, rb_str_new2("head"));
4602
-
4603
- /* Document-method: value
4604
- * TODO
4605
- */
4606
- rb_define_method(rb_cMASGN, "value", node_value, 0);
4607
- rb_ary_push(members, rb_str_new2("value"));
4608
4623
  }
4609
4624
 
4610
4625
  /* Document-class: Node::MATCH
@@ -4629,17 +4644,17 @@ void define_node_subclass_methods()
4629
4644
  rb_iv_set(rb_cMATCH, "__type__", INT2NUM(NODE_MATCH));
4630
4645
  rb_define_singleton_method(rb_cMATCH, "members", node_s_members, 0);
4631
4646
 
4632
- /* Document-method: lit
4633
- * the regular expression to use in the condition.
4634
- */
4635
- rb_define_method(rb_cMATCH, "lit", node_lit, 0);
4636
- rb_ary_push(members, rb_str_new2("lit"));
4637
-
4638
4647
  /* Document-method: value
4639
4648
  * the value to compare against
4640
4649
  */
4641
4650
  rb_define_method(rb_cMATCH, "value", node_value, 0);
4642
4651
  rb_ary_push(members, rb_str_new2("value"));
4652
+
4653
+ /* Document-method: lit
4654
+ * the regular expression to use in the condition.
4655
+ */
4656
+ rb_define_method(rb_cMATCH, "lit", node_lit, 0);
4657
+ rb_ary_push(members, rb_str_new2("lit"));
4643
4658
  }
4644
4659
 
4645
4660
  /* Document-class: Node::MATCH2
@@ -4777,17 +4792,17 @@ void define_node_subclass_methods()
4777
4792
  rb_iv_set(rb_cMODULE, "__type__", INT2NUM(NODE_MODULE));
4778
4793
  rb_define_singleton_method(rb_cMODULE, "members", node_s_members, 0);
4779
4794
 
4780
- /* Document-method: cpath
4781
- * the name of the module to define
4782
- */
4783
- rb_define_method(rb_cMODULE, "cpath", node_cpath, 0);
4784
- rb_ary_push(members, rb_str_new2("cpath"));
4785
-
4786
4795
  /* Document-method: body
4787
4796
  * the body of the module definition
4788
4797
  */
4789
4798
  rb_define_method(rb_cMODULE, "body", node_body, 0);
4790
4799
  rb_ary_push(members, rb_str_new2("body"));
4800
+
4801
+ /* Document-method: cpath
4802
+ * the name of the module to define
4803
+ */
4804
+ rb_define_method(rb_cMODULE, "cpath", node_cpath, 0);
4805
+ rb_ary_push(members, rb_str_new2("cpath"));
4791
4806
  }
4792
4807
 
4793
4808
  /* Document-class: Node::NEWLINE
@@ -4866,17 +4881,17 @@ void define_node_subclass_methods()
4866
4881
  rb_iv_set(rb_cNTH_REF, "__type__", INT2NUM(NODE_NTH_REF));
4867
4882
  rb_define_singleton_method(rb_cNTH_REF, "members", node_s_members, 0);
4868
4883
 
4869
- /* Document-method: nth
4870
- * the index of the match data item to retrieve
4871
- */
4872
- rb_define_method(rb_cNTH_REF, "nth", node_nth, 0);
4873
- rb_ary_push(members, rb_str_new2("nth"));
4874
-
4875
4884
  /* Document-method: cnt
4876
4885
  * the index into the local variable table where the match data is stored
4877
4886
  */
4878
4887
  rb_define_method(rb_cNTH_REF, "cnt", node_cnt, 0);
4879
4888
  rb_ary_push(members, rb_str_new2("cnt"));
4889
+
4890
+ /* Document-method: nth
4891
+ * the index of the match data item to retrieve
4892
+ */
4893
+ rb_define_method(rb_cNTH_REF, "nth", node_nth, 0);
4894
+ rb_ary_push(members, rb_str_new2("nth"));
4880
4895
  }
4881
4896
 
4882
4897
  /* Document-class: Node::OPT_N
@@ -4929,11 +4944,11 @@ void define_node_subclass_methods()
4929
4944
  rb_iv_set(rb_cOP_ASGN1, "__type__", INT2NUM(NODE_OP_ASGN1));
4930
4945
  rb_define_singleton_method(rb_cOP_ASGN1, "members", node_s_members, 0);
4931
4946
 
4932
- /* Document-method: args
4933
- * the arguments to the assigment
4947
+ /* Document-method: recv
4948
+ * the receiver of the assignment
4934
4949
  */
4935
- rb_define_method(rb_cOP_ASGN1, "args", node_args, 0);
4936
- rb_ary_push(members, rb_str_new2("args"));
4950
+ rb_define_method(rb_cOP_ASGN1, "recv", node_recv, 0);
4951
+ rb_ary_push(members, rb_str_new2("recv"));
4937
4952
 
4938
4953
  /* Document-method: mid
4939
4954
  * 0, 1, or the name a method to call to calculate the value of the
@@ -4942,11 +4957,11 @@ void define_node_subclass_methods()
4942
4957
  rb_define_method(rb_cOP_ASGN1, "mid", node_mid, 0);
4943
4958
  rb_ary_push(members, rb_str_new2("mid"));
4944
4959
 
4945
- /* Document-method: recv
4946
- * the receiver of the assignment
4960
+ /* Document-method: args
4961
+ * the arguments to the assigment
4947
4962
  */
4948
- rb_define_method(rb_cOP_ASGN1, "recv", node_recv, 0);
4949
- rb_ary_push(members, rb_str_new2("recv"));
4963
+ rb_define_method(rb_cOP_ASGN1, "args", node_args, 0);
4964
+ rb_ary_push(members, rb_str_new2("args"));
4950
4965
  }
4951
4966
 
4952
4967
  /* Document-class: Node::OP_ASGN2
@@ -4975,18 +4990,18 @@ void define_node_subclass_methods()
4975
4990
  rb_define_method(rb_cOP_ASGN2, "value", node_value, 0);
4976
4991
  rb_ary_push(members, rb_str_new2("value"));
4977
4992
 
4993
+ /* Document-method: recv
4994
+ * the receiver of the attribute
4995
+ */
4996
+ rb_define_method(rb_cOP_ASGN2, "recv", node_recv, 0);
4997
+ rb_ary_push(members, rb_str_new2("recv"));
4998
+
4978
4999
  /* Document-method: next
4979
5000
  * another node of type OP_ASGN2 which contains more information
4980
5001
  * about the assignment operation than can fit in this node alone
4981
5002
  */
4982
5003
  rb_define_method(rb_cOP_ASGN2, "next", node_next, 0);
4983
5004
  rb_ary_push(members, rb_str_new2("next"));
4984
-
4985
- /* Document-method: recv
4986
- * the receiver of the attribute
4987
- */
4988
- rb_define_method(rb_cOP_ASGN2, "recv", node_recv, 0);
4989
- rb_ary_push(members, rb_str_new2("recv"));
4990
5005
  }
4991
5006
 
4992
5007
  /* Document-class: Node::OP_ASGN2_ARG
@@ -5002,6 +5017,14 @@ void define_node_subclass_methods()
5002
5017
  rb_iv_set(rb_cOP_ASGN2_ARG, "__type__", INT2NUM(NODE_OP_ASGN2_ARG));
5003
5018
  rb_define_singleton_method(rb_cOP_ASGN2_ARG, "members", node_s_members, 0);
5004
5019
 
5020
+ /* Document-method: mid
5021
+ * The operation to apply to the attribute before setting it. May
5022
+ * be 0 (false) to indicate "logical or" or 1 (nil) to indicate
5023
+ * "logical and".
5024
+ */
5025
+ rb_define_method(rb_cOP_ASGN2_ARG, "mid", node_mid, 0);
5026
+ rb_ary_push(members, rb_str_new2("mid"));
5027
+
5005
5028
  /* Document-method: vid
5006
5029
  * The method to call on the receiver to retrieve the attribute
5007
5030
  */
@@ -5013,14 +5036,6 @@ void define_node_subclass_methods()
5013
5036
  */
5014
5037
  rb_define_method(rb_cOP_ASGN2_ARG, "aid", node_aid, 0);
5015
5038
  rb_ary_push(members, rb_str_new2("aid"));
5016
-
5017
- /* Document-method: mid
5018
- * The operation to apply to the attribute before setting it. May
5019
- * be 0 (false) to indicate "logical or" or 1 (nil) to indicate
5020
- * "logical and".
5021
- */
5022
- rb_define_method(rb_cOP_ASGN2_ARG, "mid", node_mid, 0);
5023
- rb_ary_push(members, rb_str_new2("mid"));
5024
5039
  }
5025
5040
 
5026
5041
  /* Document-class: Node::OP_ASGN_AND
@@ -5069,14 +5084,6 @@ void define_node_subclass_methods()
5069
5084
  rb_iv_set(rb_cOP_ASGN_OR, "__type__", INT2NUM(NODE_OP_ASGN_OR));
5070
5085
  rb_define_singleton_method(rb_cOP_ASGN_OR, "members", node_s_members, 0);
5071
5086
 
5072
- /* Document-method: aid
5073
- * if this indicator is nonzero, ruby will check to see if the
5074
- * provided expression is defined, otherwise it will assume that
5075
- * the provided expression is defined.
5076
- */
5077
- rb_define_method(rb_cOP_ASGN_OR, "aid", node_aid, 0);
5078
- rb_ary_push(members, rb_str_new2("aid"));
5079
-
5080
5087
  /* Document-method: value
5081
5088
  * the right hand side of the assignment
5082
5089
  */
@@ -5088,6 +5095,14 @@ void define_node_subclass_methods()
5088
5095
  */
5089
5096
  rb_define_method(rb_cOP_ASGN_OR, "recv", node_recv, 0);
5090
5097
  rb_ary_push(members, rb_str_new2("recv"));
5098
+
5099
+ /* Document-method: aid
5100
+ * if this indicator is nonzero, ruby will check to see if the
5101
+ * provided expression is defined, otherwise it will assume that
5102
+ * the provided expression is defined.
5103
+ */
5104
+ rb_define_method(rb_cOP_ASGN_OR, "aid", node_aid, 0);
5105
+ rb_ary_push(members, rb_str_new2("aid"));
5091
5106
  }
5092
5107
 
5093
5108
  /* Document-class: Node::OR
@@ -5105,17 +5120,17 @@ void define_node_subclass_methods()
5105
5120
  rb_iv_set(rb_cOR, "__type__", INT2NUM(NODE_OR));
5106
5121
  rb_define_singleton_method(rb_cOR, "members", node_s_members, 0);
5107
5122
 
5108
- /* Document-method: first
5109
- * the expression on the left hand side
5110
- */
5111
- rb_define_method(rb_cOR, "first", node_1st, 0);
5112
- rb_ary_push(members, rb_str_new2("first"));
5113
-
5114
5123
  /* Document-method: second
5115
5124
  * the expression on the right hand side
5116
5125
  */
5117
5126
  rb_define_method(rb_cOR, "second", node_2nd, 0);
5118
5127
  rb_ary_push(members, rb_str_new2("second"));
5128
+
5129
+ /* Document-method: first
5130
+ * the expression on the left hand side
5131
+ */
5132
+ rb_define_method(rb_cOR, "first", node_1st, 0);
5133
+ rb_ary_push(members, rb_str_new2("first"));
5119
5134
  }
5120
5135
 
5121
5136
  /* Document-class: Node::POSTEXE
@@ -5167,11 +5182,11 @@ void define_node_subclass_methods()
5167
5182
  rb_iv_set(rb_cRESBODY, "__type__", INT2NUM(NODE_RESBODY));
5168
5183
  rb_define_singleton_method(rb_cRESBODY, "members", node_s_members, 0);
5169
5184
 
5170
- /* Document-method: head
5171
- * the next rescue
5185
+ /* Document-method: body
5186
+ * the expresion to evaluate if the exception type matches
5172
5187
  */
5173
- rb_define_method(rb_cRESBODY, "head", node_head, 0);
5174
- rb_ary_push(members, rb_str_new2("head"));
5188
+ rb_define_method(rb_cRESBODY, "body", node_body, 0);
5189
+ rb_ary_push(members, rb_str_new2("body"));
5175
5190
 
5176
5191
  /* Document-method: args
5177
5192
  * the expression type to match against
@@ -5179,11 +5194,11 @@ void define_node_subclass_methods()
5179
5194
  rb_define_method(rb_cRESBODY, "args", node_args, 0);
5180
5195
  rb_ary_push(members, rb_str_new2("args"));
5181
5196
 
5182
- /* Document-method: body
5183
- * the expresion to evaluate if the exception type matches
5197
+ /* Document-method: head
5198
+ * the next rescue
5184
5199
  */
5185
- rb_define_method(rb_cRESBODY, "body", node_body, 0);
5186
- rb_ary_push(members, rb_str_new2("body"));
5200
+ rb_define_method(rb_cRESBODY, "head", node_head, 0);
5201
+ rb_ary_push(members, rb_str_new2("head"));
5187
5202
  }
5188
5203
 
5189
5204
  /* Document-class: Node::RESCUE
@@ -5223,11 +5238,11 @@ void define_node_subclass_methods()
5223
5238
  rb_iv_set(rb_cRESCUE, "__type__", INT2NUM(NODE_RESCUE));
5224
5239
  rb_define_singleton_method(rb_cRESCUE, "members", node_s_members, 0);
5225
5240
 
5226
- /* Document-method: head
5227
- * the body of the block to evaluate
5241
+ /* Document-method: resq
5242
+ * the expression to be evaluated if an exception is raised
5228
5243
  */
5229
- rb_define_method(rb_cRESCUE, "head", node_head, 0);
5230
- rb_ary_push(members, rb_str_new2("head"));
5244
+ rb_define_method(rb_cRESCUE, "resq", node_resq, 0);
5245
+ rb_ary_push(members, rb_str_new2("resq"));
5231
5246
 
5232
5247
  /* Document-method: else
5233
5248
  * the expression to be evaluated if no exception is raised
@@ -5235,11 +5250,11 @@ void define_node_subclass_methods()
5235
5250
  rb_define_method(rb_cRESCUE, "else", node_else, 0);
5236
5251
  rb_ary_push(members, rb_str_new2("else"));
5237
5252
 
5238
- /* Document-method: resq
5239
- * the expression to be evaluated if an exception is raised
5253
+ /* Document-method: head
5254
+ * the body of the block to evaluate
5240
5255
  */
5241
- rb_define_method(rb_cRESCUE, "resq", node_resq, 0);
5242
- rb_ary_push(members, rb_str_new2("resq"));
5256
+ rb_define_method(rb_cRESCUE, "head", node_head, 0);
5257
+ rb_ary_push(members, rb_str_new2("head"));
5243
5258
  }
5244
5259
 
5245
5260
  /* Document-class: Node::RETRY
@@ -5543,10 +5558,10 @@ void define_node_subclass_methods()
5543
5558
  rb_iv_set(rb_cVALIAS, "__member__", members);
5544
5559
  rb_iv_set(rb_cVALIAS, "__type__", INT2NUM(NODE_VALIAS));
5545
5560
  rb_define_singleton_method(rb_cVALIAS, "members", node_s_members, 0);
5546
- rb_define_method(rb_cVALIAS, "first", node_1st, 0);
5547
- rb_ary_push(members, rb_str_new2("first"));
5548
5561
  rb_define_method(rb_cVALIAS, "second", node_2nd, 0);
5549
5562
  rb_ary_push(members, rb_str_new2("second"));
5563
+ rb_define_method(rb_cVALIAS, "first", node_1st, 0);
5564
+ rb_ary_push(members, rb_str_new2("first"));
5550
5565
  }
5551
5566
 
5552
5567
  /* Document-class: Node::VCALL
@@ -5606,12 +5621,6 @@ void define_node_subclass_methods()
5606
5621
  rb_iv_set(rb_cWHEN, "__type__", INT2NUM(NODE_WHEN));
5607
5622
  rb_define_singleton_method(rb_cWHEN, "members", node_s_members, 0);
5608
5623
 
5609
- /* Document-method: head
5610
- * a value to compare against, or a condition to be tested
5611
- */
5612
- rb_define_method(rb_cWHEN, "head", node_head, 0);
5613
- rb_ary_push(members, rb_str_new2("head"));
5614
-
5615
5624
  /* Document-method: body
5616
5625
  * an expression to evaluate if the condition evaluates to true
5617
5626
  */
@@ -5623,6 +5632,12 @@ void define_node_subclass_methods()
5623
5632
  */
5624
5633
  rb_define_method(rb_cWHEN, "next", node_next, 0);
5625
5634
  rb_ary_push(members, rb_str_new2("next"));
5635
+
5636
+ /* Document-method: head
5637
+ * a value to compare against, or a condition to be tested
5638
+ */
5639
+ rb_define_method(rb_cWHEN, "head", node_head, 0);
5640
+ rb_ary_push(members, rb_str_new2("head"));
5626
5641
  }
5627
5642
 
5628
5643
  /* Document-class: Node::WHILE
@@ -5688,17 +5703,17 @@ void define_node_subclass_methods()
5688
5703
  rb_iv_set(rb_cYIELD, "__type__", INT2NUM(NODE_YIELD));
5689
5704
  rb_define_singleton_method(rb_cYIELD, "members", node_s_members, 0);
5690
5705
 
5691
- /* Document-method: head
5692
- * the value to yield
5693
- */
5694
- rb_define_method(rb_cYIELD, "head", node_head, 0);
5695
- rb_ary_push(members, rb_str_new2("head"));
5696
-
5697
5706
  /* Document-method: state
5698
5707
  * if nonzero, splats the value before yielding
5699
5708
  */
5700
5709
  rb_define_method(rb_cYIELD, "state", node_state, 0);
5701
5710
  rb_ary_push(members, rb_str_new2("state"));
5711
+
5712
+ /* Document-method: head
5713
+ * the value to yield
5714
+ */
5715
+ rb_define_method(rb_cYIELD, "head", node_head, 0);
5716
+ rb_ary_push(members, rb_str_new2("head"));
5702
5717
  }
5703
5718
 
5704
5719
  /* Document-class: Node::ZARRAY