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,7 +2,7 @@
2
2
 
3
3
  node.h -
4
4
 
5
- $Author: ko1 $
5
+ $Author: muraken $
6
6
  created at: Fri May 28 15:14:02 JST 1993
7
7
 
8
8
  Copyright (C) 1993-2007 Yukihiro Matsumoto
@@ -20,12 +20,6 @@ extern "C" {
20
20
  #endif
21
21
 
22
22
  enum node_type {
23
- NODE_METHOD,
24
- #define NODE_METHOD NODE_METHOD
25
- NODE_FBODY,
26
- #define NODE_FBODY NODE_FBODY
27
- NODE_CFUNC,
28
- #define NODE_CFUNC NODE_CFUNC
29
23
  NODE_SCOPE,
30
24
  #define NODE_SCOPE NODE_SCOPE
31
25
  NODE_BLOCK,
@@ -202,8 +196,6 @@ enum node_type {
202
196
  #define NODE_FLIP2 NODE_FLIP2
203
197
  NODE_FLIP3,
204
198
  #define NODE_FLIP3 NODE_FLIP3
205
- NODE_ATTRSET,
206
- #define NODE_ATTRSET NODE_ATTRSET
207
199
  NODE_SELF,
208
200
  #define NODE_SELF NODE_SELF
209
201
  NODE_NIL,
@@ -260,7 +252,7 @@ typedef struct RNode {
260
252
  struct RNode *node;
261
253
  ID id;
262
254
  long state;
263
- struct global_entry *entry;
255
+ struct rb_global_entry *entry;
264
256
  long cnt;
265
257
  VALUE value;
266
258
  } u3;
@@ -270,17 +262,18 @@ typedef struct RNode {
270
262
 
271
263
  /* 0..4:T_TYPES, 5:FL_MARK, 6:reserved, 7:NODE_FL_NEWLINE */
272
264
  #define NODE_FL_NEWLINE (((VALUE)1)<<7)
265
+ #define NODE_FL_CREF_PUSHED_BY_EVAL NODE_FL_NEWLINE
273
266
 
274
267
  #define NODE_TYPESHIFT 8
275
268
  #define NODE_TYPEMASK (((VALUE)0x7f)<<NODE_TYPESHIFT)
276
269
 
277
270
  #define nd_type(n) ((int) (((RNODE(n))->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
278
271
  #define nd_set_type(n,t) \
279
- RNODE(n)->flags=((RNODE(n)->flags&~NODE_TYPEMASK)|(((t)<<NODE_TYPESHIFT)&NODE_TYPEMASK))
272
+ RNODE(n)->flags=((RNODE(n)->flags&~NODE_TYPEMASK)|((((unsigned long)t)<<NODE_TYPESHIFT)&NODE_TYPEMASK))
280
273
 
281
274
  #define NODE_LSHIFT (NODE_TYPESHIFT+7)
282
275
  #define NODE_LMASK (((SIGNED_VALUE)1<<(sizeof(VALUE)*CHAR_BIT-NODE_LSHIFT))-1)
283
- #define nd_line(n) ((VALUE)(((RNODE(n))->flags>>NODE_LSHIFT)&NODE_LMASK))
276
+ #define nd_line(n) (int)(RNODE(n)->flags>>NODE_LSHIFT)
284
277
  #define nd_set_line(n,l) \
285
278
  RNODE(n)->flags=((RNODE(n)->flags&~(-1<<NODE_LSHIFT))|(((l)&NODE_LMASK)<<NODE_LSHIFT))
286
279
 
@@ -355,11 +348,8 @@ typedef struct RNode {
355
348
 
356
349
  #define NEW_NODE(t,a0,a1,a2) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2))
357
350
 
358
- #define NEW_METHOD(n,x,v) NEW_NODE(NODE_METHOD,x,n,v)
359
- #define NEW_FBODY(n,i) NEW_NODE(NODE_FBODY,i,n,0)
360
351
  #define NEW_DEFN(i,a,d,p) NEW_NODE(NODE_DEFN,0,i,NEW_SCOPE(a,d))
361
352
  #define NEW_DEFS(r,i,a,d) NEW_NODE(NODE_DEFS,r,i,NEW_SCOPE(a,d))
362
- #define NEW_CFUNC(f,c) NEW_NODE(NODE_CFUNC,f,c,0)
363
353
  #define NEW_IFUNC(f,c) NEW_NODE(NODE_IFUNC,f,c,0)
364
354
  #define NEW_SCOPE(a,b) NEW_NODE(NODE_SCOPE,local_tbl(),b,a)
365
355
  #define NEW_BLOCK(a) NEW_NODE(NODE_BLOCK,a,0,0)
@@ -445,7 +435,6 @@ typedef struct RNode {
445
435
  #define NEW_COLON3(i) NEW_NODE(NODE_COLON3,0,i,0)
446
436
  #define NEW_DOT2(b,e) NEW_NODE(NODE_DOT2,b,e,0)
447
437
  #define NEW_DOT3(b,e) NEW_NODE(NODE_DOT3,b,e,0)
448
- #define NEW_ATTRSET(a) NEW_NODE(NODE_ATTRSET,a,0,0)
449
438
  #define NEW_SELF() NEW_NODE(NODE_SELF,0,0,0)
450
439
  #define NEW_NIL() NEW_NODE(NODE_NIL,0,0,0)
451
440
  #define NEW_TRUE() NEW_NODE(NODE_TRUE,0,0,0)
@@ -459,30 +448,6 @@ typedef struct RNode {
459
448
  #define NEW_PRELUDE(p,b) NEW_NODE(NODE_PRELUDE,p,b,0)
460
449
  #define NEW_OPTBLOCK(a) NEW_NODE(NODE_OPTBLOCK,a,0,0)
461
450
 
462
- #define NOEX_PUBLIC 0x00
463
- #define NOEX_NOSUPER 0x01
464
- #define NOEX_PRIVATE 0x02
465
- #define NOEX_PROTECTED 0x04
466
- #define NOEX_MASK 0x06 /* 0110 */
467
- #define NOEX_BASIC 0x08
468
-
469
- #define NOEX_UNDEF NOEX_NOSUPER
470
-
471
- #define NOEX_MODFUNC 0x10
472
- #define NOEX_SUPER 0x20
473
- #define NOEX_VCALL 0x40
474
-
475
- #define NOEX_SAFE(n) (((n) >> 8) & 0x0F)
476
- #define NOEX_WITH(n, s) ((s << 8) | (n) | (ruby_running ? 0 : NOEX_BASIC))
477
- #define NOEX_WITH_SAFE(n) NOEX_WITH(n, rb_safe_level())
478
-
479
- #define CALL_PUBLIC 0
480
- #define CALL_FCALL 1
481
- #define CALL_VCALL 2
482
- #define CALL_SUPER 3
483
-
484
- #define RUBY_VM_METHOD_NODE NODE_METHOD
485
-
486
451
  VALUE rb_parser_new(void);
487
452
  VALUE rb_parser_end_seen_p(VALUE);
488
453
  VALUE rb_parser_encoding(VALUE);
@@ -495,16 +460,18 @@ NODE *rb_compile_cstr(const char*, const char*, int, int);
495
460
  NODE *rb_compile_string(const char*, VALUE, int);
496
461
  NODE *rb_compile_file(const char*, VALUE, int);
497
462
 
498
- void rb_add_method(VALUE, ID, NODE *, int);
499
463
  NODE *rb_node_newnode(enum node_type,VALUE,VALUE,VALUE);
464
+ NODE *rb_node_newnode_longlife(enum node_type,VALUE,VALUE,VALUE);
500
465
 
501
- NODE* rb_method_node(VALUE klass, ID id);
502
- int rb_node_arity(NODE* node);
466
+ struct rb_global_entry {
467
+ struct rb_global_variable *var;
468
+ ID id;
469
+ };
503
470
 
504
- struct global_entry *rb_global_entry(ID);
505
- VALUE rb_gvar_get(struct global_entry *);
506
- VALUE rb_gvar_set(struct global_entry *, VALUE);
507
- VALUE rb_gvar_defined(struct global_entry *);
471
+ struct rb_global_entry *rb_global_entry(ID);
472
+ VALUE rb_gvar_get(struct rb_global_entry *);
473
+ VALUE rb_gvar_set(struct rb_global_entry *, VALUE);
474
+ VALUE rb_gvar_defined(struct rb_global_entry *);
508
475
 
509
476
  #if defined(__cplusplus)
510
477
  #if 0
@@ -1,24 +1,21 @@
1
- /* A Bison parser, made by GNU Bison 2.3. */
1
+ /* A Bison parser, made by GNU Bison 2.5. */
2
2
 
3
- /* Skeleton interface for Bison's Yacc-like parsers in C
4
-
5
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6
- Free Software Foundation, Inc.
7
-
8
- This program is free software; you can redistribute it and/or modify
3
+ /* Bison interface for Yacc-like parsers in C
4
+
5
+ Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
6
+
7
+ This program is free software: you can redistribute it and/or modify
9
8
  it under the terms of the GNU General Public License as published by
10
- the Free Software Foundation; either version 2, or (at your option)
11
- any later version.
12
-
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
13
12
  This program is distributed in the hope that it will be useful,
14
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
15
  GNU General Public License for more details.
17
-
16
+
18
17
  You should have received a copy of the GNU General Public License
19
- along with this program; if not, write to the Free Software
20
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
- Boston, MA 02110-1301, USA. */
18
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
22
19
 
23
20
  /* As a special exception, you may create a larger work that contains
24
21
  part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +26,11 @@
29
26
  special exception, which will cause the skeleton and the resulting
30
27
  Bison output files to be licensed under the GNU General Public
31
28
  License without this special exception.
32
-
29
+
33
30
  This special exception was added by the Free Software Foundation in
34
31
  version 2.2 of Bison. */
35
32
 
33
+
36
34
  /* Tokens. */
37
35
  #ifndef YYTOKENTYPE
38
36
  # define YYTOKENTYPE
@@ -150,154 +148,39 @@
150
148
  idRespond_to = 366,
151
149
  idIFUNC = 367,
152
150
  idCFUNC = 368,
153
- idThrowState = 369,
154
- id_core_set_method_alias = 370,
155
- id_core_set_variable_alias = 371,
156
- id_core_undef_method = 372,
157
- id_core_define_method = 373,
158
- id_core_define_singleton_method = 374,
159
- id_core_set_postexe = 375,
160
- tLAST_TOKEN = 376
151
+ id_core_set_method_alias = 369,
152
+ id_core_set_variable_alias = 370,
153
+ id_core_undef_method = 371,
154
+ id_core_define_method = 372,
155
+ id_core_define_singleton_method = 373,
156
+ id_core_set_postexe = 374,
157
+ tLAST_TOKEN = 375
161
158
  };
162
159
  #endif
163
- /* Tokens. */
164
- #define keyword_class 258
165
- #define keyword_module 259
166
- #define keyword_def 260
167
- #define keyword_undef 261
168
- #define keyword_begin 262
169
- #define keyword_rescue 263
170
- #define keyword_ensure 264
171
- #define keyword_end 265
172
- #define keyword_if 266
173
- #define keyword_unless 267
174
- #define keyword_then 268
175
- #define keyword_elsif 269
176
- #define keyword_else 270
177
- #define keyword_case 271
178
- #define keyword_when 272
179
- #define keyword_while 273
180
- #define keyword_until 274
181
- #define keyword_for 275
182
- #define keyword_break 276
183
- #define keyword_next 277
184
- #define keyword_redo 278
185
- #define keyword_retry 279
186
- #define keyword_in 280
187
- #define keyword_do 281
188
- #define keyword_do_cond 282
189
- #define keyword_do_block 283
190
- #define keyword_do_LAMBDA 284
191
- #define keyword_return 285
192
- #define keyword_yield 286
193
- #define keyword_super 287
194
- #define keyword_self 288
195
- #define keyword_nil 289
196
- #define keyword_true 290
197
- #define keyword_false 291
198
- #define keyword_and 292
199
- #define keyword_or 293
200
- #define keyword_not 294
201
- #define modifier_if 295
202
- #define modifier_unless 296
203
- #define modifier_while 297
204
- #define modifier_until 298
205
- #define modifier_rescue 299
206
- #define keyword_alias 300
207
- #define keyword_defined 301
208
- #define keyword_BEGIN 302
209
- #define keyword_END 303
210
- #define keyword__LINE__ 304
211
- #define keyword__FILE__ 305
212
- #define keyword__ENCODING__ 306
213
- #define tIDENTIFIER 307
214
- #define tFID 308
215
- #define tGVAR 309
216
- #define tIVAR 310
217
- #define tCONSTANT 311
218
- #define tCVAR 312
219
- #define tLABEL 313
220
- #define tINTEGER 314
221
- #define tFLOAT 315
222
- #define tSTRING_CONTENT 316
223
- #define tCHAR 317
224
- #define tNTH_REF 318
225
- #define tBACK_REF 319
226
- #define tREGEXP_END 320
227
- #define tUPLUS 321
228
- #define tUMINUS 322
229
- #define tPOW 323
230
- #define tCMP 324
231
- #define tEQ 325
232
- #define tEQQ 326
233
- #define tNEQ 327
234
- #define tGEQ 328
235
- #define tLEQ 329
236
- #define tANDOP 330
237
- #define tOROP 331
238
- #define tMATCH 332
239
- #define tNMATCH 333
240
- #define tDOT2 334
241
- #define tDOT3 335
242
- #define tAREF 336
243
- #define tASET 337
244
- #define tLSHFT 338
245
- #define tRSHFT 339
246
- #define tCOLON2 340
247
- #define tCOLON3 341
248
- #define tOP_ASGN 342
249
- #define tASSOC 343
250
- #define tLPAREN 344
251
- #define tLPAREN_ARG 345
252
- #define tRPAREN 346
253
- #define tLBRACK 347
254
- #define tLBRACE 348
255
- #define tLBRACE_ARG 349
256
- #define tSTAR 350
257
- #define tAMPER 351
258
- #define tLAMBDA 352
259
- #define tSYMBEG 353
260
- #define tSTRING_BEG 354
261
- #define tXSTRING_BEG 355
262
- #define tREGEXP_BEG 356
263
- #define tWORDS_BEG 357
264
- #define tQWORDS_BEG 358
265
- #define tSTRING_DBEG 359
266
- #define tSTRING_DVAR 360
267
- #define tSTRING_END 361
268
- #define tLAMBEG 362
269
- #define tLOWEST 363
270
- #define tUMINUS_NUM 364
271
- #define idNULL 365
272
- #define idRespond_to 366
273
- #define idIFUNC 367
274
- #define idCFUNC 368
275
- #define idThrowState 369
276
- #define id_core_set_method_alias 370
277
- #define id_core_set_variable_alias 371
278
- #define id_core_undef_method 372
279
- #define id_core_define_method 373
280
- #define id_core_define_singleton_method 374
281
- #define id_core_set_postexe 375
282
- #define tLAST_TOKEN 376
283
-
284
160
 
285
161
 
286
162
 
287
163
  #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
288
164
  typedef union YYSTYPE
289
165
  {
166
+
167
+ /* Line 2068 of yacc.c */
168
+
290
169
  VALUE val;
291
170
  NODE *node;
292
171
  ID id;
293
172
  int num;
294
- }
295
- /* Line 1489 of yacc.c. */
296
- YYSTYPE;
173
+ const struct vtable *vars;
174
+
175
+
176
+
177
+ /* Line 2068 of yacc.c */
178
+ } YYSTYPE;
179
+ # define YYSTYPE_IS_TRIVIAL 1
297
180
  # define yystype YYSTYPE /* obsolescent; will be withdrawn */
298
181
  # define YYSTYPE_IS_DECLARED 1
299
- # define YYSTYPE_IS_TRIVIAL 1
300
182
  #endif
301
183
 
302
184
 
303
185
 
186
+
@@ -4,7 +4,7 @@
4
4
  regenc.h - Oniguruma (regular expression library)
5
5
  **********************************************************************/
6
6
  /*-
7
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
7
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
8
8
  * All rights reserved.
9
9
  *
10
10
  * Redistribution and use in source and binary forms, with or without
@@ -96,11 +96,12 @@ typedef struct {
96
96
 
97
97
 
98
98
  typedef struct {
99
- UChar *name;
99
+ const UChar *name;
100
100
  int ctype;
101
101
  short int len;
102
102
  } PosixBracketEntryType;
103
103
 
104
+ #define PosixBracketEntryInit(name, ctype) {(const UChar *)name, ctype, (short int)(sizeof(name) - 1)}
104
105
 
105
106
  /* #define USE_CRNL_AS_LINE_TERMINATOR */
106
107
  #define USE_UNICODE_PROPERTIES
@@ -152,6 +153,9 @@ ONIG_EXTERN int onigenc_unicode_mbc_case_fold P_((OnigEncoding enc, OnigCaseFold
152
153
  ONIG_EXTERN int onigenc_unicode_apply_all_case_fold P_((OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg, OnigEncoding enc));
153
154
 
154
155
 
156
+ #define UTF16_IS_SURROGATE_FIRST(c) (((c) & 0xfc) == 0xd8)
157
+ #define UTF16_IS_SURROGATE_SECOND(c) (((c) & 0xfc) == 0xdc)
158
+
155
159
  #define ONIGENC_ISO_8859_1_TO_LOWER_CASE(c) \
156
160
  OnigEncISO_8859_1_ToLowerCaseTable[c]
157
161
  #define ONIGENC_ISO_8859_1_TO_UPPER_CASE(c) \
@@ -181,7 +185,7 @@ ONIG_EXTERN const unsigned short OnigEncAsciiCtypeTable[];
181
185
  #define ONIGENC_IS_ASCII_CODE_CASE_AMBIG(code) \
182
186
  (ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_UPPER) ||\
183
187
  ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_LOWER))
184
-
188
+
185
189
  #ifdef ONIG_ENC_REGISTER
186
190
  extern int ONIG_ENC_REGISTER(const char *, OnigEncodingType*);
187
191
  #define OnigEncodingName(n) encoding_##n
@@ -4,7 +4,7 @@
4
4
  regint.h - Oniguruma (regular expression library)
5
5
  **********************************************************************/
6
6
  /*-
7
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
7
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
8
8
  * All rights reserved.
9
9
  *
10
10
  * Redistribution and use in source and binary forms, with or without
@@ -352,7 +352,7 @@ typedef unsigned char Bits;
352
352
  typedef Bits BitSet[BITSET_SIZE];
353
353
  typedef Bits* BitSetRef;
354
354
 
355
- #define SIZE_BITSET sizeof(BitSet)
355
+ #define SIZE_BITSET (int)sizeof(BitSet)
356
356
 
357
357
  #define BITSET_CLEAR(bs) do {\
358
358
  int i;\
@@ -582,15 +582,15 @@ typedef short int StateCheckNumType;
582
582
  typedef void* PointerType;
583
583
 
584
584
  #define SIZE_OPCODE 1
585
- #define SIZE_RELADDR sizeof(RelAddrType)
586
- #define SIZE_ABSADDR sizeof(AbsAddrType)
587
- #define SIZE_LENGTH sizeof(LengthType)
588
- #define SIZE_MEMNUM sizeof(MemNumType)
589
- #define SIZE_STATE_CHECK_NUM sizeof(StateCheckNumType)
590
- #define SIZE_REPEATNUM sizeof(RepeatNumType)
591
- #define SIZE_OPTION sizeof(OnigOptionType)
592
- #define SIZE_CODE_POINT sizeof(OnigCodePoint)
593
- #define SIZE_POINTER sizeof(PointerType)
585
+ #define SIZE_RELADDR (int)sizeof(RelAddrType)
586
+ #define SIZE_ABSADDR (int)sizeof(AbsAddrType)
587
+ #define SIZE_LENGTH (int)sizeof(LengthType)
588
+ #define SIZE_MEMNUM (int)sizeof(MemNumType)
589
+ #define SIZE_STATE_CHECK_NUM (int)sizeof(StateCheckNumType)
590
+ #define SIZE_REPEATNUM (int)sizeof(RepeatNumType)
591
+ #define SIZE_OPTION (int)sizeof(OnigOptionType)
592
+ #define SIZE_CODE_POINT (int)sizeof(OnigCodePoint)
593
+ #define SIZE_POINTER (int)sizeof(PointerType)
594
594
 
595
595
 
596
596
  #define GET_RELADDR_INC(addr,p) PLATFORM_GET_INC(addr, p, RelAddrType)
@@ -716,7 +716,7 @@ typedef struct {
716
716
  BBuf* mbuf; /* multi-byte info or NULL */
717
717
  } CClassNode;
718
718
 
719
- typedef long OnigStackIndex;
719
+ typedef intptr_t OnigStackIndex;
720
720
 
721
721
  typedef struct _OnigStackType {
722
722
  unsigned int type;
@@ -760,7 +760,7 @@ typedef struct _OnigStackType {
760
760
 
761
761
  typedef struct {
762
762
  void* stack_p;
763
- int stack_n;
763
+ size_t stack_n;
764
764
  OnigOptionType options;
765
765
  OnigRegion* region;
766
766
  const UChar* start; /* search start position (for \G: BEGIN_POSITION) */
@@ -788,7 +788,7 @@ typedef struct {
788
788
 
789
789
  extern OnigOpInfoType OnigOpInfo[];
790
790
 
791
- extern void onig_print_compiled_byte_code P_((FILE* f, UChar* bp, UChar** nextp, OnigEncoding enc));
791
+ /* extern void onig_print_compiled_byte_code P_((FILE* f, UChar* bp, UChar* bpend, UChar** nextp, OnigEncoding enc)); */
792
792
 
793
793
  #ifdef ONIG_DEBUG_STATISTICS
794
794
  extern void onig_statistics_init P_((void));
@@ -799,8 +799,7 @@ extern void onig_print_statistics P_((FILE* f));
799
799
  extern UChar* onig_error_code_to_format P_((int code));
800
800
  extern void onig_snprintf_with_pattern PV_((UChar buf[], int bufsize, OnigEncoding enc, UChar* pat, UChar* pat_end, const UChar *fmt, ...));
801
801
  extern int onig_bbuf_init P_((BBuf* buf, int size));
802
- extern int onig_alloc_init P_((regex_t** reg, OnigOptionType option, OnigCaseFoldType case_fold_flag, OnigEncoding enc, const OnigSyntaxType* syntax));
803
- extern int onig_compile P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo));
802
+ extern int onig_compile P_((regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo, const char *sourcefile, int sourceline));
804
803
  extern void onig_chain_reduce P_((regex_t* reg));
805
804
  extern void onig_chain_link_add P_((regex_t* to, regex_t* add));
806
805
  extern void onig_transfer P_((regex_t* to, regex_t* from));
@@ -816,7 +815,7 @@ typedef st_data_t hash_data_type;
816
815
  typedef unsigned long hash_data_type;
817
816
  #endif
818
817
 
819
- extern hash_table_type* onig_st_init_strend_table_with_size P_((int size));
818
+ extern hash_table_type* onig_st_init_strend_table_with_size P_((st_index_t size));
820
819
  extern int onig_st_lookup_strend P_((hash_table_type* table, const UChar* str_key, const UChar* end_key, hash_data_type *value));
821
820
  extern int onig_st_insert_strend P_((hash_table_type* table, const UChar* str_key, const UChar* end_key, hash_data_type value));
822
821