Skip to content
Browse files

My lexical scoping refactoring (just jruby source this time)

git-svn-id: http://svn.codehaus.org/jruby/branches/enebo_lexical@2378 961051c9-f516-0410-bf72-c9f7e237a7b7
  • Loading branch information...
2 parents a3abb37 + 5853771 commit 15fad8293de1562abf831c585a7b88cb55679123 @enebo enebo committed Oct 24, 2006
Showing with 0 additions and 3,287 deletions.
  1. 0 {jruby → }/.classpath
  2. 0 {jruby → }/.cvsignore
  3. 0 {jruby → }/.externalToolBuilders/Create Jar File.launch
  4. 0 {jruby → }/.externalToolBuilders/Serialize Builtin Files.launch
  5. 0 {jruby → }/.project
  6. 0 {jruby → }/.settings/org.eclipse.jdt.core.prefs
  7. 0 {jruby → }/.settings/org.eclipse.jdt.ui.prefs
  8. 0 {jruby → }/COPYING
  9. 0 {jruby → }/COPYING.CPL
  10. 0 {jruby → }/COPYING.GPL
  11. 0 {jruby → }/COPYING.LGPL
  12. 0 {jruby → }/LICENSE.RUBY
  13. 0 {jruby → }/README
  14. 0 {jruby → }/bin/gem
  15. 0 {jruby → }/bin/gem.bat
  16. 0 {jruby → }/bin/gem_mirror
  17. 0 {jruby → }/bin/gem_mirror.bat
  18. 0 {jruby → }/bin/gem_server
  19. 0 {jruby → }/bin/gem_server.bat
  20. 0 {jruby → }/bin/gemlock
  21. 0 {jruby → }/bin/gemri
  22. 0 {jruby → }/bin/gemwhich
  23. 0 {jruby → }/bin/gemwhich.bat
  24. 0 {jruby → }/bin/generate_yaml_index.rb
  25. 0 {jruby → }/bin/index_gem_repository.rb
  26. 0 {jruby → }/bin/jirb
  27. 0 {jruby → }/bin/jirb.bat
  28. 0 {jruby → }/bin/jruby
  29. 0 {jruby → }/bin/jruby.bat
  30. 0 {jruby → }/bin/jruby.rb
  31. 0 {jruby → }/bin/jrubyd.bat
  32. 0 {jruby → }/bin/jrubyw.bat
  33. 0 {jruby → }/bin/update_rubygems
  34. 0 {jruby → }/build-config.xml
  35. 0 {jruby → }/build.xml
  36. +0 −11 codegen/.project
  37. BIN codegen/lib/asm-2.2.2.jar
  38. +0 −134 codegen/src/codegen.rb
  39. +0 −352 codegen/src/codegen2.rb
  40. +0 −57 codegen/src/codegen2_test.rb
  41. +0 −7 codegen/src/codegen_test.rb
  42. +0 −37 codegen/src/compiler_support_asm.rb
  43. +0 −201 codegen/src/instruction_compiler.rb
  44. +0 −187 codegen/src/instruction_compiler2.rb
  45. +0 −497 codegen/src/nodeprinter.rb
  46. 0 {jruby → }/default.build.properties
  47. 0 {jruby → }/docs/.cvsignore
  48. 0 {jruby → }/docs/BeanScriptingFramework
  49. 0 {jruby → }/docs/CodeConventions.txt
  50. 0 {jruby → }/docs/Compiler.txt
  51. 0 {jruby → }/docs/Differences.txt
  52. 0 {jruby → }/docs/FAQ.html
  53. 0 {jruby → }/docs/Glossary.txt
  54. 0 {jruby → }/docs/Javasupport-highlevel.txt
  55. 0 {jruby → }/docs/Javasupport-lowlevel.txt
  56. 0 {jruby → }/docs/Javasupport-overview.txt
  57. 0 {jruby → }/docs/README.coverage
  58. 0 {jruby → }/docs/README.rails
  59. 0 {jruby → }/docs/README.test
  60. 0 {jruby → }/docs/Readline-HOWTO.txt
  61. 0 {jruby → }/docs/getting_a_working_eclipse_sandbox.html
  62. 0 {jruby → }/docs/getting_involved.html
  63. 0 {jruby → }/docs/jvyaml/CREDITS
  64. 0 {jruby/docs/rbyaml → docs/jvyaml}/LICENSE
  65. 0 {jruby/docs/rbyaml → docs/jvyaml}/README
  66. 0 {jruby → }/docs/limitations.html
  67. 0 {jruby → }/docs/patches/rails/rails-1.1.2-blockargs-fix.patch
  68. 0 {jruby → }/docs/patches/rubylib/ruby-1.8.4_fileutils_fu_windows_designator.patch
  69. 0 {jruby/docs/jvyaml → docs/rbyaml}/LICENSE
  70. 0 {jruby/docs/jvyaml → docs/rbyaml}/README
  71. 0 {jruby → }/docs/release-checklist.txt
  72. +0 −185 dox.conf
  73. +0 −13 homepage/.htaccess
  74. +0 −11 homepage/.project
  75. +0 −7 homepage/_footer.shtml
  76. +0 −59 homepage/_header.shtml
  77. +0 −19 homepage/contact.shtml
  78. +0 −53 homepage/credits.shtml
  79. +0 −50 homepage/css/base.css
  80. +0 −55 homepage/docs/BeanScriptingFramework
  81. +0 −9 homepage/docs/FAQ.html
  82. +0 −214 homepage/docs/Javasupport-highlevel.txt
  83. +0 −481 homepage/docs/Javasupport-lowlevel.txt
  84. +0 −96 homepage/docs/Javasupport-overview.txt
  85. +0 −5 homepage/docs/bsf.shtml
  86. +0 −5 homepage/docs/faq.shtml
  87. +0 −5 homepage/docs/java-highlevel.shtml
  88. +0 −5 homepage/docs/java-lowlevel.shtml
  89. +0 −5 homepage/docs/java-overview.shtml
  90. +0 −87 homepage/docs/limitations.html
  91. +0 −5 homepage/docs/limitations.shtml
  92. +0 −132 homepage/docs/milestones.shtml
  93. BIN homepage/images/logo.ico
  94. BIN homepage/images/logo.ico.png
  95. BIN homepage/images/logo.png
  96. +0 −214 homepage/images/logo.svg
  97. BIN homepage/images/logo2.png
  98. BIN homepage/images/logo_trans.png
  99. +0 −41 homepage/index.shtml
  100. +0 −39 homepage/links.shtml
  101. +0 −9 jruby-homepage/.classpath
  102. 0 {jruby → }/lib/.cvsignore
  103. 0 {jruby → }/lib/LICENCE.bsf
  104. 0 {jruby → }/lib/LICENSE.ant
  105. 0 {jruby → }/lib/ant.jar
  106. 0 {jruby → }/lib/asm-2.2.2.jar
  107. 0 {jruby → }/lib/bsf.jar
  108. 0 {jruby → }/lib/emma.jar
  109. 0 {jruby → }/lib/emma_ant.jar
  110. 0 {jruby → }/lib/junit.jar
  111. 0 {jruby → }/lib/jvyaml.jar
  112. 0 {jruby → }/lib/plaincharset.jar
  113. 0 {jruby → }/lib/ruby/.cvsignore
  114. 0 {jruby → }/lib/ruby/1.8/English.rb
  115. 0 {jruby → }/lib/ruby/1.8/Env.rb
  116. 0 {jruby → }/lib/ruby/1.8/abbrev.rb
  117. 0 {jruby → }/lib/ruby/1.8/base64.rb
  118. 0 {jruby → }/lib/ruby/1.8/benchmark.rb
  119. 0 {jruby → }/lib/ruby/1.8/bigdecimal/jacobian.rb
  120. 0 {jruby → }/lib/ruby/1.8/bigdecimal/ludcmp.rb
  121. 0 {jruby → }/lib/ruby/1.8/bigdecimal/math.rb
  122. 0 {jruby → }/lib/ruby/1.8/bigdecimal/newton.rb
  123. 0 {jruby → }/lib/ruby/1.8/bigdecimal/util.rb
  124. 0 {jruby → }/lib/ruby/1.8/cgi-lib.rb
  125. 0 {jruby → }/lib/ruby/1.8/cgi.rb
  126. 0 {jruby → }/lib/ruby/1.8/cgi/session.rb
  127. 0 {jruby → }/lib/ruby/1.8/cgi/session/pstore.rb
  128. 0 {jruby → }/lib/ruby/1.8/complex.rb
  129. 0 {jruby → }/lib/ruby/1.8/csv.rb
  130. 0 {jruby → }/lib/ruby/1.8/date.rb
  131. 0 {jruby → }/lib/ruby/1.8/date/format.rb
  132. 0 {jruby → }/lib/ruby/1.8/date2.rb
  133. 0 {jruby → }/lib/ruby/1.8/debug.rb
  134. 0 {jruby → }/lib/ruby/1.8/delegate.rb
  135. 0 {jruby → }/lib/ruby/1.8/drb.rb
  136. 0 {jruby → }/lib/ruby/1.8/drb/acl.rb
  137. 0 {jruby → }/lib/ruby/1.8/drb/drb.rb
  138. 0 {jruby → }/lib/ruby/1.8/drb/eq.rb
  139. 0 {jruby → }/lib/ruby/1.8/drb/extserv.rb
  140. 0 {jruby → }/lib/ruby/1.8/drb/extservm.rb
  141. 0 {jruby → }/lib/ruby/1.8/drb/gw.rb
  142. 0 {jruby → }/lib/ruby/1.8/drb/invokemethod.rb
  143. 0 {jruby → }/lib/ruby/1.8/drb/observer.rb
  144. 0 {jruby → }/lib/ruby/1.8/drb/ssl.rb
  145. 0 {jruby → }/lib/ruby/1.8/drb/timeridconv.rb
  146. 0 {jruby → }/lib/ruby/1.8/drb/unix.rb
  147. 0 {jruby → }/lib/ruby/1.8/e2mmap.rb
  148. 0 {jruby → }/lib/ruby/1.8/erb.rb
  149. 0 {jruby → }/lib/ruby/1.8/eregex.rb
  150. 0 {jruby → }/lib/ruby/1.8/expect.rb
  151. 0 {jruby → }/lib/ruby/1.8/fileutils.rb
  152. 0 {jruby → }/lib/ruby/1.8/finalize.rb
  153. 0 {jruby → }/lib/ruby/1.8/find.rb
  154. 0 {jruby → }/lib/ruby/1.8/forwardable.rb
  155. 0 {jruby → }/lib/ruby/1.8/ftools.rb
  156. 0 {jruby → }/lib/ruby/1.8/generator.rb
  157. 0 {jruby/src → }/lib/ruby/1.8/getoptlong.rb
  158. 0 {jruby → }/lib/ruby/1.8/getopts.rb
  159. 0 {jruby → }/lib/ruby/1.8/gserver.rb
  160. 0 {jruby → }/lib/ruby/1.8/importenv.rb
  161. 0 {jruby → }/lib/ruby/1.8/io/nonblock.rb
  162. 0 {jruby → }/lib/ruby/1.8/ipaddr.rb
  163. 0 {jruby → }/lib/ruby/1.8/irb.rb
  164. 0 {jruby → }/lib/ruby/1.8/irb/cmd/chws.rb
  165. 0 {jruby → }/lib/ruby/1.8/irb/cmd/fork.rb
  166. 0 {jruby → }/lib/ruby/1.8/irb/cmd/help.rb
  167. 0 {jruby → }/lib/ruby/1.8/irb/cmd/load.rb
  168. 0 {jruby → }/lib/ruby/1.8/irb/cmd/nop.rb
  169. 0 {jruby → }/lib/ruby/1.8/irb/cmd/pushws.rb
  170. 0 {jruby → }/lib/ruby/1.8/irb/cmd/subirb.rb
  171. 0 {jruby → }/lib/ruby/1.8/irb/completion.rb
  172. 0 {jruby → }/lib/ruby/1.8/irb/context.rb
  173. 0 {jruby → }/lib/ruby/1.8/irb/ext/change-ws.rb
  174. 0 {jruby → }/lib/ruby/1.8/irb/ext/history.rb
  175. 0 {jruby → }/lib/ruby/1.8/irb/ext/loader.rb
  176. 0 {jruby → }/lib/ruby/1.8/irb/ext/math-mode.rb
  177. 0 {jruby → }/lib/ruby/1.8/irb/ext/multi-irb.rb
  178. 0 {jruby → }/lib/ruby/1.8/irb/ext/save-history.rb
  179. 0 {jruby → }/lib/ruby/1.8/irb/ext/tracer.rb
  180. 0 {jruby → }/lib/ruby/1.8/irb/ext/use-loader.rb
  181. 0 {jruby → }/lib/ruby/1.8/irb/ext/workspaces.rb
  182. 0 {jruby → }/lib/ruby/1.8/irb/extend-command.rb
  183. 0 {jruby → }/lib/ruby/1.8/irb/frame.rb
  184. 0 {jruby → }/lib/ruby/1.8/irb/help.rb
  185. 0 {jruby → }/lib/ruby/1.8/irb/init.rb
  186. 0 {jruby → }/lib/ruby/1.8/irb/input-method.rb
  187. 0 {jruby → }/lib/ruby/1.8/irb/lc/error.rb
  188. 0 {jruby → }/lib/ruby/1.8/irb/lc/help-message
  189. 0 {jruby → }/lib/ruby/1.8/irb/lc/ja/error.rb
  190. 0 {jruby → }/lib/ruby/1.8/irb/lc/ja/help-message
  191. 0 {jruby → }/lib/ruby/1.8/irb/locale.rb
  192. 0 {jruby → }/lib/ruby/1.8/irb/notifier.rb
  193. 0 {jruby → }/lib/ruby/1.8/irb/output-method.rb
  194. 0 {jruby → }/lib/ruby/1.8/irb/ruby-lex.rb
  195. 0 {jruby → }/lib/ruby/1.8/irb/ruby-token.rb
  196. 0 {jruby → }/lib/ruby/1.8/irb/slex.rb
  197. 0 {jruby → }/lib/ruby/1.8/irb/version.rb
  198. 0 {jruby → }/lib/ruby/1.8/irb/workspace.rb
  199. 0 {jruby → }/lib/ruby/1.8/irb/ws-for-case-2.rb
  200. 0 {jruby → }/lib/ruby/1.8/irb/xmp.rb
  201. 0 {jruby → }/lib/ruby/1.8/jcode.rb
  202. 0 {jruby → }/lib/ruby/1.8/kconv.rb
  203. 0 {jruby → }/lib/ruby/1.8/logger.rb
  204. 0 {jruby → }/lib/ruby/1.8/mailread.rb
  205. 0 {jruby → }/lib/ruby/1.8/mathn.rb
  206. 0 {jruby → }/lib/ruby/1.8/matrix.rb
  207. 0 {jruby → }/lib/ruby/1.8/md5.rb
  208. 0 {jruby → }/lib/ruby/1.8/mkmf.rb
  209. 0 {jruby → }/lib/ruby/1.8/monitor.rb
  210. 0 {jruby → }/lib/ruby/1.8/mutex_m.rb
  211. 0 {jruby → }/lib/ruby/1.8/net/ftp.rb
  212. 0 {jruby → }/lib/ruby/1.8/net/http.rb
  213. 0 {jruby → }/lib/ruby/1.8/net/imap.rb
  214. 0 {jruby → }/lib/ruby/1.8/net/pop.rb
  215. 0 {jruby → }/lib/ruby/1.8/net/protocol.rb
  216. 0 {jruby → }/lib/ruby/1.8/net/smtp.rb
  217. 0 {jruby → }/lib/ruby/1.8/net/telnet.rb
  218. 0 {jruby → }/lib/ruby/1.8/observer.rb
  219. 0 {jruby → }/lib/ruby/1.8/open-uri.rb
  220. 0 {jruby → }/lib/ruby/1.8/open3.rb
  221. 0 {jruby → }/lib/ruby/1.8/optparse.rb
  222. 0 {jruby → }/lib/ruby/1.8/optparse/date.rb
  223. 0 {jruby → }/lib/ruby/1.8/optparse/shellwords.rb
  224. 0 {jruby → }/lib/ruby/1.8/optparse/time.rb
  225. 0 {jruby → }/lib/ruby/1.8/optparse/uri.rb
  226. 0 {jruby → }/lib/ruby/1.8/optparse/version.rb
  227. 0 {jruby → }/lib/ruby/1.8/ostruct.rb
  228. 0 {jruby → }/lib/ruby/1.8/parsearg.rb
  229. 0 {jruby → }/lib/ruby/1.8/parsedate.rb
  230. 0 {jruby → }/lib/ruby/1.8/pathname.rb
  231. 0 {jruby → }/lib/ruby/1.8/ping.rb
  232. 0 {jruby → }/lib/ruby/1.8/pp.rb
  233. 0 {jruby → }/lib/ruby/1.8/prettyprint.rb
  234. 0 {jruby → }/lib/ruby/1.8/profile.rb
  235. 0 {jruby → }/lib/ruby/1.8/profiler.rb
  236. 0 {jruby → }/lib/ruby/1.8/pstore.rb
  237. 0 {jruby → }/lib/ruby/1.8/racc/parser.rb
  238. 0 {jruby → }/lib/ruby/1.8/rational.rb
  239. 0 {jruby → }/lib/ruby/1.8/rdoc/code_objects.rb
  240. 0 {jruby → }/lib/ruby/1.8/rdoc/diagram.rb
  241. 0 {jruby → }/lib/ruby/1.8/rdoc/dot/dot.rb
  242. 0 {jruby → }/lib/ruby/1.8/rdoc/generators/chm_generator.rb
  243. 0 {jruby → }/lib/ruby/1.8/rdoc/generators/html_generator.rb
  244. 0 {jruby → }/lib/ruby/1.8/rdoc/generators/ri_generator.rb
  245. 0 {jruby → }/lib/ruby/1.8/rdoc/generators/template/chm/chm.rb
  246. 0 {jruby → }/lib/ruby/1.8/rdoc/generators/template/html/hefss.rb
  247. 0 {jruby → }/lib/ruby/1.8/rdoc/generators/template/html/html.rb
  248. 0 {jruby → }/lib/ruby/1.8/rdoc/generators/template/html/kilmer.rb
  249. 0 {jruby → }/lib/ruby/1.8/rdoc/generators/template/html/old_html.rb
  250. 0 {jruby → }/lib/ruby/1.8/rdoc/generators/template/html/one_page_html.rb
  251. 0 {jruby → }/lib/ruby/1.8/rdoc/generators/template/xml/rdf.rb
  252. 0 {jruby → }/lib/ruby/1.8/rdoc/generators/template/xml/xml.rb
  253. 0 {jruby → }/lib/ruby/1.8/rdoc/generators/xml_generator.rb
  254. 0 {jruby → }/lib/ruby/1.8/rdoc/markup/sample/rdoc2latex.rb
  255. 0 {jruby → }/lib/ruby/1.8/rdoc/markup/sample/sample.rb
  256. 0 {jruby → }/lib/ruby/1.8/rdoc/markup/simple_markup.rb
  257. 0 {jruby → }/lib/ruby/1.8/rdoc/markup/simple_markup/fragments.rb
  258. 0 {jruby → }/lib/ruby/1.8/rdoc/markup/simple_markup/inline.rb
  259. 0 {jruby → }/lib/ruby/1.8/rdoc/markup/simple_markup/lines.rb
  260. 0 {jruby → }/lib/ruby/1.8/rdoc/markup/simple_markup/preprocess.rb
  261. 0 {jruby → }/lib/ruby/1.8/rdoc/markup/simple_markup/to_flow.rb
  262. 0 {jruby → }/lib/ruby/1.8/rdoc/markup/simple_markup/to_html.rb
  263. 0 {jruby → }/lib/ruby/1.8/rdoc/markup/simple_markup/to_latex.rb
  264. 0 {jruby → }/lib/ruby/1.8/rdoc/markup/test/AllTests.rb
  265. 0 {jruby → }/lib/ruby/1.8/rdoc/markup/test/TestInline.rb
  266. 0 {jruby → }/lib/ruby/1.8/rdoc/markup/test/TestParse.rb
  267. 0 {jruby → }/lib/ruby/1.8/rdoc/options.rb
  268. 0 {jruby → }/lib/ruby/1.8/rdoc/parsers/parse_c.rb
  269. 0 {jruby → }/lib/ruby/1.8/rdoc/parsers/parse_f95.rb
  270. 0 {jruby → }/lib/ruby/1.8/rdoc/parsers/parse_rb.rb
  271. 0 {jruby → }/lib/ruby/1.8/rdoc/parsers/parse_simple.rb
  272. 0 {jruby → }/lib/ruby/1.8/rdoc/parsers/parserfactory.rb
  273. 0 {jruby → }/lib/ruby/1.8/rdoc/rdoc.rb
  274. 0 {jruby → }/lib/ruby/1.8/rdoc/ri/ri_cache.rb
  275. 0 {jruby → }/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb
  276. 0 {jruby → }/lib/ruby/1.8/rdoc/ri/ri_display.rb
  277. 0 {jruby → }/lib/ruby/1.8/rdoc/ri/ri_driver.rb
  278. 0 {jruby → }/lib/ruby/1.8/rdoc/ri/ri_formatter.rb
  279. 0 {jruby → }/lib/ruby/1.8/rdoc/ri/ri_options.rb
  280. 0 {jruby → }/lib/ruby/1.8/rdoc/ri/ri_paths.rb
  281. 0 {jruby → }/lib/ruby/1.8/rdoc/ri/ri_reader.rb
  282. 0 {jruby → }/lib/ruby/1.8/rdoc/ri/ri_util.rb
  283. 0 {jruby → }/lib/ruby/1.8/rdoc/ri/ri_writer.rb
  284. 0 {jruby → }/lib/ruby/1.8/rdoc/template.rb
  285. 0 {jruby → }/lib/ruby/1.8/rdoc/tokenstream.rb
  286. 0 {jruby → }/lib/ruby/1.8/rdoc/usage.rb
  287. 0 {jruby → }/lib/ruby/1.8/readbytes.rb
  288. 0 {jruby → }/lib/ruby/1.8/resolv-replace.rb
  289. 0 {jruby → }/lib/ruby/1.8/resolv.rb
  290. 0 {jruby → }/lib/ruby/1.8/rexml/attlistdecl.rb
  291. 0 {jruby → }/lib/ruby/1.8/rexml/attribute.rb
  292. 0 {jruby → }/lib/ruby/1.8/rexml/cdata.rb
  293. 0 {jruby → }/lib/ruby/1.8/rexml/child.rb
  294. 0 {jruby → }/lib/ruby/1.8/rexml/comment.rb
  295. 0 {jruby → }/lib/ruby/1.8/rexml/doctype.rb
  296. 0 {jruby → }/lib/ruby/1.8/rexml/document.rb
  297. 0 {jruby → }/lib/ruby/1.8/rexml/dtd/attlistdecl.rb
  298. 0 {jruby → }/lib/ruby/1.8/rexml/dtd/dtd.rb
  299. 0 {jruby → }/lib/ruby/1.8/rexml/dtd/elementdecl.rb
  300. 0 {jruby → }/lib/ruby/1.8/rexml/dtd/entitydecl.rb
Sorry, we could not display the entire diff because too many files (2,114) changed.
View
0 jruby/.classpath → .classpath
File renamed without changes.
View
0 jruby/.cvsignore → .cvsignore
File renamed without changes.
View
0 ...ternalToolBuilders/Create Jar File.launch → .externalToolBuilders/Create Jar File.launch
File renamed without changes.
View
0 ...olBuilders/Serialize Builtin Files.launch → ...olBuilders/Serialize Builtin Files.launch
File renamed without changes.
View
0 jruby/.project → .project
File renamed without changes.
View
0 jruby/.settings/org.eclipse.jdt.core.prefs → .settings/org.eclipse.jdt.core.prefs
File renamed without changes.
View
0 jruby/.settings/org.eclipse.jdt.ui.prefs → .settings/org.eclipse.jdt.ui.prefs
File renamed without changes.
View
0 jruby/COPYING → COPYING
File renamed without changes.
View
0 jruby/COPYING.CPL → COPYING.CPL
File renamed without changes.
View
0 jruby/COPYING.GPL → COPYING.GPL
File renamed without changes.
View
0 jruby/COPYING.LGPL → COPYING.LGPL
File renamed without changes.
View
0 jruby/LICENSE.RUBY → LICENSE.RUBY
File renamed without changes.
View
0 jruby/README → README
File renamed without changes.
View
0 jruby/bin/gem → bin/gem
File renamed without changes.
View
0 jruby/bin/gem.bat → bin/gem.bat
File renamed without changes.
View
0 jruby/bin/gem_mirror → bin/gem_mirror
File renamed without changes.
View
0 jruby/bin/gem_mirror.bat → bin/gem_mirror.bat
File renamed without changes.
View
0 jruby/bin/gem_server → bin/gem_server
File renamed without changes.
View
0 jruby/bin/gem_server.bat → bin/gem_server.bat
File renamed without changes.
View
0 jruby/bin/gemlock → bin/gemlock
File renamed without changes.
View
0 jruby/bin/gemri → bin/gemri
File renamed without changes.
View
0 jruby/bin/gemwhich → bin/gemwhich
File renamed without changes.
View
0 jruby/bin/gemwhich.bat → bin/gemwhich.bat
File renamed without changes.
View
0 jruby/bin/generate_yaml_index.rb → bin/generate_yaml_index.rb
File renamed without changes.
View
0 jruby/bin/index_gem_repository.rb → bin/index_gem_repository.rb
File renamed without changes.
View
0 jruby/bin/jirb → bin/jirb
File renamed without changes.
View
0 jruby/bin/jirb.bat → bin/jirb.bat
File renamed without changes.
View
0 jruby/bin/jruby → bin/jruby
File renamed without changes.
View
0 jruby/bin/jruby.bat → bin/jruby.bat
File renamed without changes.
View
0 jruby/bin/jruby.rb → bin/jruby.rb
File renamed without changes.
View
0 jruby/bin/jrubyd.bat → bin/jrubyd.bat
File renamed without changes.
View
0 jruby/bin/jrubyw.bat → bin/jrubyw.bat
File renamed without changes.
View
0 jruby/bin/update_rubygems → bin/update_rubygems
File renamed without changes.
View
0 jruby/build-config.xml → build-config.xml
File renamed without changes.
View
0 jruby/build.xml → build.xml
File renamed without changes.
View
11 codegen/.project
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>codegen</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
View
BIN codegen/lib/asm-2.2.2.jar
Binary file not shown.
View
134 codegen/src/codegen.rb
@@ -1,134 +0,0 @@
-require 'java'
-
-include_class "org.objectweb.asm.ClassWriter"
-include_class("org.objectweb.asm.Opcodes") {|p,c| "J" + c}
-include_class "org.objectweb.asm.Type"
-include_class("java.lang.String") {|p,c| "J#{c}"}
-
-module Opcodes
- JOpcodes.constants.each {|c| eval("Opcodes::#{c} = JOpcodes::#{c}", TOPLEVEL_BINDING)}
-
- def self.insn_map
- @insn_map
- end
-
- zero_op_insns = [:NOP, :ACONST_NULL, :ICONST_M1, :ICONST_0, :ICONST_1, :ICONST_2, :ICONST_3, :ICONST_4, :ICONST_5, :LCONST_0, :LCONST_1, :FCONST_0, :FCONST_1, :FCONST_2, :DCONST_0, :DCONST_1, :IALOAD, :LALOAD, :FALOAD, :DALOAD, :AALOAD, :BALOAD, :CALOAD, :SALOAD, :IASTORE, :LASTORE, :FASTORE, :DASTORE, :AASTORE, :BASTORE, :CASTORE, :SASTORE, :POP, :POP2, :DUP, :DUP_X1, :DUP_X2, :DUP2, :DUP2_X1, :DUP2_X2, :SWAP, :IADD, :LADD, :FADD, :DADD, :ISUB, :LSUB, :FSUB, :DSUB, :IMUL, :LMUL, :FMUL, :DMUL, :IDIV, :LDIV, :FDIV, :DDIV, :IREM, :LREM, :FREM, :DREM, :INEG, :LNEG, :FNEG, :DNEG, :ISHL, :LSHL, :ISHR, :LSHR, :IUSHR, :LUSHR, :IAND, :LAND, :IOR, :LOR, :IXOR, :LXOR, :I2L, :I2F, :I2D, :L2I, :L2F, :L2D, :F2I, :F2L, :F2D, :D2I, :D2L, :D2F, :I2B, :I2C, :I2S, :LCMP, :FCMPL, :FCMPG, :DCMPL, :DCMPG, :IRETURN, :LRETURN, :FRETURN, :DRETURN, :ARETURN, :RETURN, :ARRAYLENGTH, :ATHROW, :MONITORENTER, :MONITOREXIT]
- int_op_insns = [:BIPUSH, :SIPUSH, :NEWARRAY]
- var_insns = [:ILOAD, :LLOAD, :FLOAD, :DLOAD, :ALOAD, :ISTORE, :LSTORE, :FSTORE, :DSTORE, :ASTORE, :RET]
- type_insns = [:NEW, :ANEWARRAY, :CHECKCAST, :INSTANCEOF]
- field_insns = [:GETSTATIC, :PUTSTATIC, :GETFIELD, :PUTFIELD]
- method_insns = [:INVOKEVIRTUAL, :INVOKESPECIAL, :INVOKESTATIC, :INVOKEINTERFACE]
- jump_insns = [:IFEQ, :IFNE, :IFLT, :IFGE, :IFGT, :IFLE, :IF_ICMPEQ, :IF_ICMPNE, :IF_ICMPLT, :IF_ICMPGE, :IF_ICMPGT, :IF_ICMPLE, :IF_ACMPEQ, :IF_ACMPNE, :GOTO, :JSR, :IFNULL, :IFNONNULL]
-
- @insn_map = {}
- zero_op_insns.each {|insn| @insn_map[insn] = :visit_insn}
- int_op_insns.each {|insn| @insn_map[insn] = :visit_int_insn}
- var_insns.each {|insn| @insn_map[insn] = :visit_var_insn}
- type_insns.each {|insn| @insn_map[insn] = :visit_type_insn}
- field_insns.each {|insn| @insn_map[insn] = :visit_field_insn}
- method_insns.each {|insn| @insn_map[insn] = :visit_method_insn}
- jump_insns.each {|insn| @insn_map[insn] = :visit_jump_insn}
- @insn_map[:LDC] = :visit_ldc_insn
- @insn_map[:IINC] = :visit_iinc_insn
- @insn_map[:TABLESWITCH] = :visit_table_switch_insn
- @insn_map[:LOOKUPSWITCH] = :visit_lookup_switch_insn
- @insn_map[:MULTIANEWARRAY] = :visitMultiANewArrayInsn
-end
-
-module ClassUtils
- def ClassUtils.cls(classname)
- classname.sub(".", "/")
- end
-end
-
-class ClassCreator
- include Opcodes
-
- def initialize(classname, parentname="java.lang.Object", ifcs=nil, vis=ACC_PUBLIC)
- @classname = classname.sub(".", "/")
- @parentname = parentname.sub(".", "/")
- if ifcs then
- str_ifcs = JString[].new(ifcs.size)
- ifcs.each_index {|i| str_ifcs[i] = ifcs[i].sub(".", "/")}
- @interfaces = str_ifcs
- end
-
- @cv = ClassWriter.new(false)
-
- if block_given? then
- yield @cv
- else
- @cv.visit(V1_1, vis, @classname, nil, @parentname, ifcs)
- end
- end
-
- def new_method(name, desc, excepts=nil)
- excepts = excepts.collect {|ex, arr| arr ||= []; arr << ex.sub('.', '/'); arr} if excepts
-
- mv = @cv.visit_method(ACC_PUBLIC, name, desc, nil, excepts)
- MethodCreator.new(mv)
- end
-end
-
-module MethodUtils
- def MethodUtils.desc(params, retval)
- desc = ""
- desc << "("
- if params
- params.each do |param|
- case param
- when "int"
- desc << "I"
- when "float"
- desc << "F"
- when "double"
- desc << "D"
- else
- desc << "L#{ClassUtils.cls(param)};"
- end
- end
- end
- desc << ")"
- case retval
- when "void"
- desc << "V"
- when "int"
- desc << "I"
- when "float"
- desc << "F"
- when "double"
- desc << "D"
- else
- desc << "L#{ClassUtils.cls(retval)};"
- end
-
- desc
- end
-end
-
-class MethodCreator
- include Opcodes
-
- Opcodes.insn_map.each_key do |key|
- if [:visit_ldc_insn, :visit_iinc_insn, :visit_tableswitch_insn, :visit_lookupswitch_insn, :visitMultiANewArrayInsn].include?(Opcodes.insn_map[key])
- method_def = <<EOE
-def #{key.to_s.downcase}(*args)
- @mv.#{Opcodes.insn_map[key]}(*args)
-end
-EOE
- else
- method_def = <<EOE
-def #{key.to_s.downcase}(*args)
- @mv.#{Opcodes.insn_map[key]}(#{key}, *args)
-end
-EOE
- end
-
- eval method_def
- end
-
-
- def initialize(mv)
- @mv = mv
- end
-end
View
352 codegen/src/codegen2.rb
@@ -1,352 +0,0 @@
-require 'java'
-
-include_class "org.objectweb.asm.ClassWriter"
-include_class("org.objectweb.asm.Opcodes") {|p,c| "J" + c}
-include_class "org.objectweb.asm.Type"
-include_class("java.lang.String") {|p,c| "J#{c}"}
-
-module Opcodes
- JOpcodes.constants.each {|c| eval("Opcodes::#{c} = JOpcodes::#{c}", TOPLEVEL_BINDING)}
-
- def self.insn_map
- @insn_map
- end
-
- zero_op_insns = [:NOP, :ACONST_NULL, :ICONST_M1, :ICONST_0, :ICONST_1, :ICONST_2, :ICONST_3, :ICONST_4, :ICONST_5, :LCONST_0, :LCONST_1, :FCONST_0, :FCONST_1, :FCONST_2, :DCONST_0, :DCONST_1, :IALOAD, :LALOAD, :FALOAD, :DALOAD, :AALOAD, :BALOAD, :CALOAD, :SALOAD, :IASTORE, :LASTORE, :FASTORE, :DASTORE, :AASTORE, :BASTORE, :CASTORE, :SASTORE, :POP, :POP2, :DUP, :DUP_X1, :DUP_X2, :DUP2, :DUP2_X1, :DUP2_X2, :SWAP, :IADD, :LADD, :FADD, :DADD, :ISUB, :LSUB, :FSUB, :DSUB, :IMUL, :LMUL, :FMUL, :DMUL, :IDIV, :LDIV, :FDIV, :DDIV, :IREM, :LREM, :FREM, :DREM, :INEG, :LNEG, :FNEG, :DNEG, :ISHL, :LSHL, :ISHR, :LSHR, :IUSHR, :LUSHR, :IAND, :LAND, :IOR, :LOR, :IXOR, :LXOR, :I2L, :I2F, :I2D, :L2I, :L2F, :L2D, :F2I, :F2L, :F2D, :D2I, :D2L, :D2F, :I2B, :I2C, :I2S, :LCMP, :FCMPL, :FCMPG, :DCMPL, :DCMPG, :IRETURN, :LRETURN, :FRETURN, :DRETURN, :ARETURN, :RETURN, :ARRAYLENGTH, :ATHROW, :MONITORENTER, :MONITOREXIT]
- int_op_insns = [:BIPUSH, :SIPUSH, :NEWARRAY]
- var_insns = [:ILOAD, :LLOAD, :FLOAD, :DLOAD, :ALOAD, :ISTORE, :LSTORE, :FSTORE, :DSTORE, :ASTORE, :RET]
- type_insns = [:NEW, :ANEWARRAY, :CHECKCAST, :INSTANCEOF]
- field_insns = [:GETSTATIC, :PUTSTATIC, :GETFIELD, :PUTFIELD]
- method_insns = [:INVOKEVIRTUAL, :INVOKESPECIAL, :INVOKESTATIC, :INVOKEINTERFACE]
- jump_insns = [:IFEQ, :IFNE, :IFLT, :IFGE, :IFGT, :IFLE, :IF_ICMPEQ, :IF_ICMPNE, :IF_ICMPLT, :IF_ICMPGE, :IF_ICMPGT, :IF_ICMPLE, :IF_ACMPEQ, :IF_ACMPNE, :GOTO, :JSR, :IFNULL, :IFNONNULL]
-
- @insn_map = {}
- zero_op_insns.each {|insn| @insn_map[insn] = :visit_insn}
- int_op_insns.each {|insn| @insn_map[insn] = :visit_int_insn}
- var_insns.each {|insn| @insn_map[insn] = :visit_var_insn}
- type_insns.each {|insn| @insn_map[insn] = :visit_type_insn}
- field_insns.each {|insn| @insn_map[insn] = :visit_field_insn}
- method_insns.each {|insn| @insn_map[insn] = :visit_method_insn}
- jump_insns.each {|insn| @insn_map[insn] = :visit_jump_insn}
- @insn_map[:LDC] = :visit_ldc_insn
- @insn_map[:IINC] = :visit_iinc_insn
- @insn_map[:TABLESWITCH] = :visit_table_switch_insn
- @insn_map[:LOOKUPSWITCH] = :visit_lookup_switch_insn
- @insn_map[:MULTIANEWARRAY] = :visitMultiANewArrayInsn
-end
-
-module GenUtils
- def method_desc(retval, *params)
- m_desc = "("
- if params && params != [nil]
- params.each do |param|
- m_desc << desc(param)
- end
- end
- m_desc << ")"
- m_desc << desc(retval)
-
- m_desc
- end
-
-
- def desc(retval)
- desc = ""
- case retval
- when :void
- desc << "V"
- when :int
- desc << "I"
- when :float
- desc << "F"
- when :double
- desc << "D"
- else
- if retval.to_s[0..1] == '[L'
- desc << retval
- else
- desc << "L#{cls(retval).gsub('.', '/')};"
- end
- end
-
- desc
- end
-
- def cls(type)
- return imports[type].gsub(".", "/") if imports.include? type
- type.to_s.gsub(".", "/")
- end
-
- def array_cls(type)
- return type if (type.to_s[0] == "[") # if already array, return
- return "[L#{imports[type]};" if imports.include? type
-
- case type
- when :int
- return "[I"
- when :float
- return "[F"
- when :double
- return "[D"
- when :void
- raise ArgumentError, "array of void is illegal"
- else
- # if type passed in is already array, don't re-array it (no nesting array types here)
- if type[0] == "["
- return type
- else
- return "[L#{cls(type).gsub(".", "/")};"
- end
- end
- end
-
- def vis(vis)
- new_vis = 0
-
- case vis
- when Array
- vis.each {|v| new_vis |= eval("Opcodes::ACC_#{v.to_s.upcase}")}
- else
- new_vis = eval("Opcodes::ACC_#{vis.to_s.upcase}")
- end
-
- new_vis
- end
-end
-
-class ClassBuilder
- include Opcodes
- include GenUtils
-
- attr_accessor :class_visitor
- attr_accessor :classname
- attr_accessor :parentname
- attr_accessor :interfaces
- attr_accessor :imports
-
- def initialize
- @imports = {
- :string => "java/lang/String",
- :object => "java/lang/Object",
- :stringbuffer => "java/lang/StringBuffer",
- :exception => "java/lang/Exception",
- :thread => "java/lang/Thread",
- :throwable => "java/lang/Throwable" }
- end
-
- def self.def_class(visiblility, classname, parentname=nil, ifcs=nil, sig=nil, &b)
- cc = ClassBuilder.new()
- parentname ||= cc.cls("java.lang.Object");
- cc.start_class cc.vis(visiblility), cc.cls(classname), cc.cls(parentname), ifcs, sig
-
- yield cc
-
- cc.end_class
-
- cc.class_visitor.to_byte_array
- end
-
- def import(classname, sym)
- @imports[sym] = classname.gsub(".", "/")
- end
-
- def def_constructor(vis, params=nil, excepts=nil, signature=nil, &b)
- def_method(vis, :void, "<init>", params, excepts, signature, &b)
- end
-
- def def_method(vis, retval, name, params=nil, excepts=nil, signature=nil, &b)
- unless excepts.nil?
- excepts_arr = JString[].new(excepts.size)
- excepts = excepts.each_index {|i| excepts_arr[i] = cls(excepts[i])}
- end
-
- mc = MethodBuilder.new(self)
- mc.start_method(vis(vis), name, method_desc(retval, *params), excepts_arr, signature)
-
- yield mc
-
- mc.end_method()
- end
-
- def start_class(vis, classname, parentname, ifcs, signature)
- @classname = cls(classname)
- @parentname = cls(parentname)
- if ifcs then
- str_ifcs = JString[].new(ifcs.size)
- ifcs.each_index {|i| str_ifcs[i] = cls(ifcs[i])}
- @interfaces = str_ifcs
- end
-
- @class_visitor = ClassWriter.new(false)
- @class_visitor.visit(V1_1, vis, classname, signature, parentname, interfaces)
- end
-
- def end_class()
- class_visitor.visitEnd()
- end
-end
-
-class MethodBuilder
- include Opcodes
- include GenUtils
-
- attr_accessor :methodname
- attr_accessor :methoddesc
- attr_accessor :method_visitor
- attr_accessor :class_builder
-
- def initialize(class_builder)
- @class_builder = class_builder
- # need better way to do calculation of stack size
- @stack_size = 10
- end
-
- # defaults to calling super.<methodname>(<methoddesc>)
- def call_super(retval=:void, name=methodname, params=nil)
- call_method(retval, name, params, class_builder.parentname, invoke_type=:super)
- end
-
- def call_this(retval, name, params=nil)
- call_method(retval, name, params, class_builder.classname, invoke_type=:this)
- end
-
- def return_void
- @method_visitor.visitInsn(RETURN)
- end
-
- # this could be smarter, watching the last item put on the stack and only returning void if we're supposed to
- def return_top(type)
- case type
- when :int
- @method_visitor.visitInsn(IRETURN)
- when :ref
- @method_visitor.visitInsn(ARETURN)
- end
- end
-
- def call_method(retval, name, params=nil, cls=class_builder.classname, invoke_type=:virtual)
- if block_given?
- raise ArgumentError, "cannot yield for values with nil params" if params.nil?
- yield self
- end
-
- if invoke_type == :virtual
- invoke_type = INVOKEVIRTUAL
- elsif invoke_type == :interface
- invoke_type = INVOKEINTERFACE
- elsif invoke_type == :super || invoke_type == :this
- invoke_type = INVOKESPECIAL
- # load 'this' if super() or this()
- @method_visitor.visitVarInsn(ALOAD, 0)
- elsif invoke_type == :construct
- invoke_type = INVOKESPECIAL
- else
- raise ArgumentError, "invalue invocation type #{invoke_type}, expected one of :virtual, :interface, :super, :this, or :construct"
- end
-
- @method_visitor.visitMethodInsn(invoke_type, class_builder.cls(cls), name, class_builder.method_desc(retval, *params))
- end
-
- def constant(c)
- @method_visitor.visitLdcInsn(c)
- end
-
- def construct_obj(type, params=nil)
- new_obj type
- dup
- if block_given?
- raise ArgumentError, "cannot yield for values with nil params" if params.nil?
- yield self
- end
- call_constructor(type, params)
- end
-
- def construct_array(type, size)
- constant(size)
- # HACK: Fixnums always come out as long, so convert
- @method_visitor.visitInsn(L2I)
-
- # TODO: add other types
- case type
- when :int
- @method_visitor.visitIntInsn(NEWARRAY, T_INT)
- else
- @method_visitor.visitTypeInsn(ANEWARRAY, class_builder.cls(type))
- end
-
- if block_given?
- for i in 0...size
- array_set(i, type) {|mb| yield i}
- end
- end
- end
-
- def new_obj(type)
- type = cls(type)
-
- @method_visitor.visitTypeInsn(NEW, type)
- end
-
- def dup()
- @method_visitor.visitInsn(DUP)
- end
-
- def swap()
- @method_visitor.visitInsn(SWAP)
- end
-
- def local(index, type=:ref)
- case type
- when :int
- @method_visitor.visitVarInsn(ILOAD, index)
- when :ref
- @method_visitor.visitVarInsn(ALOAD, index)
- end
- end
-
- def field(container, name, type)
- @method_visitor.visitFieldInsn(GETFIELD, class_builder.cls(container), "runtime", class_builder.desc(type))
- end
-
- def call_constructor(type, params, &b)
- call_method(:void, "<init>", params, type, :construct, &b)
- end
-
- # expects array on stack, block to provide value
- def array_set(index, type=:ref)
- dup
- # push index
- @method_visitor.visitLdcInsn(index)
- # hack to get around us always using long
- @method_visitor.visitInsn(L2I)
-
- yield self # yield to client to allow setting up value
-
- # put into array
- @method_visitor.visitInsn(AASTORE)
- end
-
- def start_method(vis, name, desc, excepts, signature)
- @methodname = name
- @methoddesc = desc
- @method_visitor = class_builder.class_visitor.visitMethod(vis, name, desc, signature, excepts)
- end
-
- def end_method
- @method_visitor.visitMaxs(@stack_size, @stack_size)
- @method_visitor.visitEnd()
- end
-end
-
-class ParamBuilder
- include GenUtils
-
- def initialize(method_builder, params)
- @method_builder = method_builder
- @params = params
- end
-
- def constant(const)
- @method_builder.constant(const)
- end
-end
View
57 codegen/src/codegen2_test.rb
@@ -1,57 +0,0 @@
-require 'codegen2'
-
-class_bytes = ClassBuilder.def_class :public, "FooClass" do
- def_constructor :public do
- call_super
- return_void
- end
-
- def_method :public, :string, "myMethod", [:void], [:exception] do
- call_this GenUtils.array_cls(:string), "getStringArr"
- call_this :string, "getMessage"
- return_top :ref
- end
-
- def_method :private, :string, "getMessage", [:void] do
- construct_obj :stringbuffer, [:string] do
- constant "Now I will say: "
- end
-
- call_method :stringbuffer, "append", :string, :stringbuffer do
- constant "Hello CodeGen!"
- end
- call_method :string, "toString", :void, :stringbuffer
- return_top :ref
- end
-
- def_method :public, GenUtils.array_cls(:string), "getStringArr" do
- construct_array :string, 5 do |i|
- constant "string \##{i}"
- end
-
- array_set 2, :string do
- constant "replacement at index 2"
- end
-
- return_top :ref
- end
-end
-
-include_class "java.io.FileOutputStream"
-
-fos = FileOutputStream.new("FooClass.class")
-
-fos.write(class_bytes)
-
-include_class "org.jruby.util.JRubyClassLoader"
-
-jcl = JRubyClassLoader.new
-
-jcl.define_class("FooClass", class_bytes)
-
-include_class "FooClass"
-
-f = FooClass.new
-
-puts f.myMethod
-puts f.getStringArr
View
7 codegen/src/codegen_test.rb
@@ -1,7 +0,0 @@
-require 'codegen'
-
-cc = ClassCreator.new("org.jruby.FooClass")
-mc = cc.new_method("doFoo", MethodUtils.desc(["java.lang.String", "int", "java.lang.Object"], "void"))
-
-mc.ldc("somestring")
-mc.invokevirtual(ClassUtils.cls("java.lang.Object"), "toString", MethodUtils.desc([], "java.lang.String"))
View
37 codegen/src/compiler_support_asm.rb
@@ -1,37 +0,0 @@
-require 'java'
-
-include_class "org.objectweb.asm.ClassWriter"
-include_class "org.objectweb.asm.Opcodes"
-include_class "org.objectweb.asm.Type"
-include_class "org.jruby.util.JRubyClassLoader"
-include_class("java.lang.String") {|p,c| "J#{c}"}
-
-RUBY_TYPE = "org/jruby/IRuby"
-RUNTIME_FIELD = "runtime"
-EVALSTATE_TYPE = "org/jruby/evaluator/EvaluationState"
-THREADCONTEXT_TYPE = "org/jruby/runtime/ThreadContext"
-SCOPENODE_TYPE = "org/jruby/ast/ScopeNode"
-
-Opcodes.constants.each {|c| eval("#{c} = Opcodes::#{c}", TOPLEVEL_BINDING)}
-
-def begin_instruction(name)
- cw = ClassWriter.new(false)
-
- ifcs_array = JString[].new(1)
- ifcs_array[0] = "org/jruby/evaluator/Instruction"
- cw.visit(V1_1, ACC_PUBLIC, name, nil, "java/lang/Object", ifcs_array)
- #cw.visitField(ACC_PRIVATE, RUNTIME_FIELD, "Lorg/jruby/Ruby;", nil, nil)
-
- #ruby_t = Type.getType(RUBY_TYPE)
- #mv = cw.visit_method(ACC_PUBLIC, "<init>", "(L#{RUBY_TYPE};)V", nil, nil)
- mv = cw.visit_method(ACC_PUBLIC, "<init>", "()V", nil, nil)
- mv.visitVarInsn(ALOAD, 0)
- mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V")
- #mv.visitVarInsn(ruby_t.getOpcode(ILOAD), 1)
- #mv.visitFieldInsn(PUTFIELD, name, RUNTIME_FIELD, RUBY_TYPE)
- mv.visitInsn(RETURN)
- mv.visitMaxs(2, 2)
- mv.visitEnd
-
- cw
-end
View
201 codegen/src/instruction_compiler.rb
@@ -1,201 +0,0 @@
-require 'java'
-require 'compiler_support_asm'
-require 'jruby'
-
-include_class "java.io.FileOutputStream"
-
-include_class "org.jruby.evaluator.Instruction"
-include_class "org.jruby.ast.visitor.NodeVisitor"
-include_class "org.jruby.Ruby"
-include_class "org.jruby.evaluator.InstructionBundle"
-include_class "org.jruby.util.JRubyClassLoader"
-include_class("java.lang.Thread") {|p,c| "J#{c}"}
-
-class CompiledBody < Instruction
- def execute(state, context)
- end
-end
-
-class CompilerVisitor < NodeVisitor
- def initialize
- super
- end
-
- def compile(blocknode, name, cl)
- @name = name
- visit(blocknode)
-
- bytecode = @class_writer.to_byte_array();
-
- cl.defineClass(@name, bytecode)
- end
-
- def write_class(file_output)
- file_output.write(@class_writer.to_byte_array())
- end
-
- def visit(node)
- node.accept(self.to_java_object)
- end
-
- def visitArrayNode(node)
- @method_visitor.visitLdcInsn(node.child_nodes.size)
- # hack to get around us always using long
- @method_visitor.visitInsn(L2I)
- @method_visitor.visitTypeInsn(ANEWARRAY, "org/jruby/runtime/builtin/IRubyObject")
-
- for i in 0...node.child_nodes.size do
- # dup array
- @method_visitor.visit_insn(DUP)
- # push index
- @method_visitor.visitLdcInsn(i)
- # hack to get around us always using long
- @method_visitor.visitInsn(L2I)
-
- # visit node at this index
- visit(node.child_nodes.get(i))
-
- # put into array
- @method_visitor.visitInsn(AASTORE)
- end
-
- # push state var back down
- @method_visitor.visitVarInsn(ALOAD, 1)
- @method_visitor.visitFieldInsn(GETFIELD, EVALSTATE_TYPE, "runtime", "L#{RUBY_TYPE};")
- # swap runtime and array to make newArray call
- @method_visitor.visitInsn(SWAP)
- @method_visitor.visitMethodInsn(INVOKEINTERFACE, RUBY_TYPE, "newArray", "([Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyArray;")
- end
-
- def visitDStrNode(iVisited)
- unless @building_string
- @building_string = true
- new_buffer = true
- # create a stringbuffer for str construction
- @method_visitor.visitTypeInsn(NEW, "java/lang/StringBuffer")
- @method_visitor.visitInsn(DUP)
- @method_visitor.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuffer", "<init>", "()V")
- end
-
- # stringbuffer on stack, visit string pieces
- iVisited.child_nodes.each {|n| n.accept(self.to_java_object) unless n.nil?}
-
- if new_buffer
- # replace stringbuffer with string
- @method_visitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuffer", "toString", "()Ljava/lang/String;")
-
- # push state var back down
- @method_visitor.visitVarInsn(ALOAD, 1)
- @method_visitor.visitFieldInsn(GETFIELD, EVALSTATE_TYPE, "runtime", "L#{RUBY_TYPE};")
- # swap runtime and string to make newString call
- @method_visitor.visitInsn(SWAP)
- @method_visitor.visitMethodInsn(INVOKEINTERFACE, RUBY_TYPE, "newString", "(Ljava/lang/String;)Lorg/jruby/RubyString;")
-
- @building_string = false
- end
-
- nil
- end
-
- def visitNewlineNode(iVisited)
- @class_writer = begin_instruction(@name)
-
- @method_visitor = @class_writer.visitMethod(ACC_PUBLIC, "execute", "(Lorg/jruby/evaluator/EvaluationState;Lorg/jruby/evaluator/InstructionContext;)V", nil, nil)
-
- # the below is preferred, but java support has trouble dispatching to it
- #local_names = iVisited.local_names
- #@method_visitor.visitLdcInsn(ILOAD, local_names.length)
- #@method_visitor.visitTypeInsn(ANEWARRAY, "[Ljava/lang/String;")
- # array populating would go here
-
- #@method_visitor.visitVarInsn(ALOAD, 1)
- #@method_visitor.visitMethodInsn(INVOKEVIRTUAL, EVALSTATE_TYPE, "getThreadContext", "()L#{THREADCONTEXT_TYPE};")
- #@method_visitor.visitVarInsn(ALOAD, 2)
- #@method_visitor.visitTypeInsn(CHECKCAST, "org/jruby/ast/ScopeNode")
- #@method_visitor.visitMethodInsn(INVOKEVIRTUAL, SCOPENODE_TYPE, "getLocalNames", "()[Ljava/lang/String;")
- #@method_visitor.visitMethodInsn(INVOKEVIRTUAL, THREADCONTEXT_TYPE, "preScopedBody", "([Ljava/lang/String;)V")
-
- visit(iVisited.next_node)
-
- # don't forget post
- #@method_visitor.visitVarInsn(ALOAD, 1)
- #@method_visitor.visitMethodInsn(INVOKEVIRTUAL, EVALSTATE_TYPE, "getThreadContext", "()Lorg/jruby/runtime/ThreadContext;")
- #@method_visitor.visitMethodInsn(INVOKEVIRTUAL, THREADCONTEXT_TYPE, "postScopedBody", "()V")
-
- # set result
- @method_visitor.visitVarInsn(ALOAD, 1)
- @method_visitor.visitInsn(SWAP)
- @method_visitor.visitMethodInsn(INVOKEVIRTUAL, EVALSTATE_TYPE, "setResult", "(Lorg/jruby/runtime/builtin/IRubyObject;)V")
-
- @method_visitor.visitInsn(RETURN)
- @method_visitor.visitMaxs(10, 10)
- @method_visitor.visitEnd()
-
- @class_writer.visitEnd()
-
- nil
- nil
- end
-
- def visitScopeNode(iVisited)
- end
-
- def visitStrNode(iVisited)
- @method_visitor.visitLdcInsn(iVisited.value)
- @method_visitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuffer", "append", "(Ljava/lang/String;)Ljava/lang/StringBuffer;")
- end
-end
-
-foo_ctx = JRuby.parse("def foo; 'bar'; end;", "x")
-bar_ctx = JRuby.parse("def bar; 'baz'; end;", "xz")
-baz_ctx = JRuby.parse("def baz; end;", "x3")
-
-foo_arr_ctx = JRuby.parse("def foo_arr; ['this', 'is', 'an', 'array', 'of', 'strings']; end", "y")
-bar_arr_ctx = JRuby.parse("def bar_arr; ['this', 'is', 'an', 'array', 'of', 'strings']; end;", "yz")
-
-# compile what we can into Instruction types
-n = JRubyClassLoader.new()
-compiler = CompilerVisitor.new
-foo_class = compiler.compile(foo_ctx.next_node.body_node.body_node, "MyFooClass", n)
-compiler.write_class(FileOutputStream.new("MyFooClass.class"))
-foo_arr_class = compiler.compile(foo_arr_ctx.next_node.body_node.body_node, "MyArrClass", n)
-compiler.write_class(FileOutputStream.new("MyArrClass.class"))
-
-# instantiate the compiled instructions
-foo = foo_class.newInstance()
-foo_arr = foo_arr_class.newInstance()
-
-# store the compiled instructions in the AST
-foo_bndl = InstructionBundle.new(foo, foo_ctx)
-foo_ctx.next_node.body_node.body_node.instruction = foo_bndl
-foo_arr_bndl = InstructionBundle.new(foo_arr, foo_arr_ctx)
-foo_arr_ctx.next_node.body_node.body_node.instruction = foo_arr_bndl
-
-my_ruby = Ruby.getDefaultInstance()
-
-# eval the defs, with embedded compiled instructions
-my_ruby.eval(foo_ctx)
-my_ruby.eval(bar_ctx)
-my_ruby.eval(foo_arr_ctx)
-my_ruby.eval(bar_arr_ctx)
-my_ruby.eval(baz_ctx)
-
-n = Time.now
-my_ruby.evalScript("1_000_000.times {baz}")
-puts "baz time: #{Time.now - n}"
-
-n = Time.now
-my_ruby.evalScript("1_000_000.times {foo}")
-puts "foo time: #{Time.now - n}"
-
-n = Time.now
-my_ruby.evalScript("1_000_000.times {bar}")
-puts "bar time: #{Time.now - n}"
-
-n = Time.now
-my_ruby.evalScript("1_000_000.times {foo_arr}")
-puts "foo_arr time: #{Time.now - n}"
-
-n = Time.now
-my_ruby.evalScript("1_000_000.times {bar_arr}")
-puts "bar_arr time: #{Time.now - n}"
View
187 codegen/src/instruction_compiler2.rb
@@ -1,187 +0,0 @@
-require 'java'
-#require 'compiler_support_asm'
-require 'jruby'
-require 'codegen2'
-
-include_class "java.io.FileOutputStream"
-
-include_class "org.jruby.evaluator.Instruction"
-include_class "org.jruby.ast.visitor.NodeVisitor"
-include_class "org.jruby.Ruby"
-include_class "org.jruby.evaluator.InstructionBundle"
-include_class "org.jruby.util.JRubyClassLoader"
-include_class("java.lang.Thread") {|p,c| "J#{c}"}
-
-class CompiledBody < Instruction
- def execute(state, context)
- end
-end
-
-class CompilerVisitor < NodeVisitor
- def initialize
- super
- end
-
- def compile(blocknode, name, cl)
- @name = name
-
- @bytes = ClassBuilder.def_class :public, @name, :object, ["org.jruby.evaluator.Instruction"] do |c|
- @c = c
-
- @c.import "org.jruby.evaluator.EvaluationState", :evaluationstate
- @c.import "org.jruby.evaluator.InstructionContext", :instructioncontext
- @c.import "org.jruby.evaluator.Instruction", :instruction
- @c.import "org.jruby.IRuby", :iruby
- @c.import "org.jruby.RubyArray", :rubyarray
- @c.import "org.jruby.RubyString", :rubystring
- @c.import "org.jruby.runtime.builtin.IRubyObject", :irubyobject
-
- visit(blocknode)
- end
-
- cl.defineClass(@name, @bytes)
- end
-
- def write_class(file_output)
- file_output.write(@bytes)
- end
-
- def visit(node)
- node.accept(self.to_java_object)
- end
-
- def visitArrayNode(node)
- @m.construct_array :irubyobject, node.child_nodes.size do |i|
- # visit node at this index
- visit(node.child_nodes.get(i))
- end
-
- # push state var back down
- @m.local 1
- @m.field :evaluationstate, "runtime", :iruby
- # swap runtime and array to make newArray call
- @m.swap
- @m.call_method :rubyarray, "newArray", @c.array_cls(:irubyobject), :iruby, :interface
- end
-
- def visitDStrNode(iVisited)
- unless @building_string
- @building_string = true
- new_buffer = true
- @m.construct_obj :stringbuffer, [:string]
- end
-
- # stringbuffer on stack, visit string pieces
- iVisited.child_nodes.each do |n|
- unless n.nil?
- @m.call_method(:stringbuffer, "append", :string, :stringbuffer) do
- n.accept(self.to_java_object)
- @m.call_method(:string, "toString", :void, :object)
- end
- end
- end
-
- if new_buffer
- # replace stringbuffer with string
- @m.call_method :string, "toString", :void, :stringbuffer
-
- # push state var back down
- @m.local 1
- @m.field :evaluationstate, "runtime", :iruby
- # swap runtime and string to make newString call
- @m.swap
- @m.call_method :rubystring, "newString", :string, :iruby
-
- @building_string = false
- end
-
- nil
- end
-
- def visitNewlineNode(iVisited)
- @c.def_constructor :public do |m|
- m.call_super
- m.return_void
- end
-
- @c.def_method :public, :void, "execute", [:evaluationstate, :instructioncontext] do |m|
-
- @m = m
-
- m.local(1)
- m.call_method :void, "setResult", :irubyobject, :evaluationstate do
- visit(iVisited.next_node)
- end
-
- m.return_void
- end
-
- nil
- end
-
- def visitScopeNode(iVisited)
- end
-
- def visitStrNode(iVisited)
- # push state var back down
- @m.local 1
- @m.field :evaluationstate, "runtime", :iruby
- @m.call_method :rubystring, "newString", :string, :iruby, :interface do
- @m.constant(iVisited.value)
- end
- end
-end
-
-foo_ctx = JRuby.parse("def foo; \"bar\"; end;", "x")
-bar_ctx = JRuby.parse("def bar; \"baz\"; end;", "xz")
-baz_ctx = JRuby.parse("def baz; end;", "x3")
-
-foo_arr_ctx = JRuby.parse("def foo_arr; ['this', 'is', 'an', 'array', 'of', 'strings']; end", "y")
-bar_arr_ctx = JRuby.parse("def bar_arr; ['this', 'is', 'an', 'array', 'of', 'strings']; end;", "yz")
-
-# compile what we can into Instruction types
-n = JRubyClassLoader.new()
-compiler = CompilerVisitor.new
-foo_class = compiler.compile(foo_ctx.next_node.body_node.body_node, "MyFooClass", n)
-compiler.write_class(FileOutputStream.new("MyFooClass.class"))
-foo_arr_class = compiler.compile(foo_arr_ctx.next_node.body_node.body_node, "MyArrClass", n)
-compiler.write_class(FileOutputStream.new("MyArrClass.class"))
-
-# instantiate the compiled instructions
-foo = foo_class.newInstance()
-foo_arr = foo_arr_class.newInstance()
-
-# store the compiled instructions in the AST
-foo_bndl = InstructionBundle.new(foo, foo_ctx)
-foo_ctx.next_node.body_node.body_node.instruction = foo_bndl
-foo_arr_bndl = InstructionBundle.new(foo_arr, foo_arr_ctx)
-foo_arr_ctx.next_node.body_node.body_node.instruction = foo_arr_bndl
-
-my_ruby = Ruby.getDefaultInstance()
-
-# eval the defs, with embedded compiled instructions
-my_ruby.eval(foo_ctx)
-my_ruby.eval(bar_ctx)
-my_ruby.eval(foo_arr_ctx)
-my_ruby.eval(bar_arr_ctx)
-my_ruby.eval(baz_ctx)
-
-n = Time.now
-my_ruby.evalScript("1_000_000.times {baz}")
-puts "baz time: #{Time.now - n}"
-
-n = Time.now
-my_ruby.evalScript("1_000_000.times {foo}")
-puts "foo time: #{Time.now - n}"
-
-n = Time.now
-my_ruby.evalScript("1_000_000.times {bar}")
-puts "bar time: #{Time.now - n}"
-
-n = Time.now
-my_ruby.evalScript("1_000_000.times {foo_arr}")
-puts "foo_arr time: #{Time.now - n}"
-
-n = Time.now
-my_ruby.evalScript("1_000_000.times {bar_arr}")
-puts "bar_arr time: #{Time.now - n}"
View
497 codegen/src/nodeprinter.rb
@@ -1,497 +0,0 @@
-require 'java'
-require 'jruby'
-
-include_class "org.jruby.ast.visitor.NodeVisitor"
-
-class MyVisitor < NodeVisitor
- def initialize
- super
- @indent = ""
- end
-
- def indent
- @indent = @indent + " "
- end
-
- def undent
- @indent = @indent[0..-2]
- end
-
- def puts(str)
- Kernel.puts(@indent + str)
- end
-
- def visit(node)
- indent
- node.accept(self.to_java_object) if node
- undent
- nil
- end
-
- def visitAliasNode(iVisited)
- puts iVisited.to_s + " #{iVisited.old_name} #{new_name}"
-
- end
-
- def visitAndNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.first_node)
- visit(iVisited.second_node)
- end
-
- def visitArgsNode(iVisited)
- puts iVisited.to_s
- indent
- iVisited.args.child_nodes.each {|n| puts n.name} unless iVisited.args == nil
- undent
- iVisited.opt_args.child_nodes.each {|n| visit(n)} unless iVisited.opt_args == nil
- visit(iVisited.block_arg_node) unless iVisited.block_arg_node == nil
- end
-
- def visitArgsCatNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.first_node)
- visit(iVisited.second_node)
- end
-
- def visitArrayNode(iVisited)
- puts iVisited.to_s
- iVisited.child_nodes.each {|n| visit(n)}
- nil
- end
-
- def visitBackRefNode(iVisited)
- puts iVisited.to_s + " " + iVisited.type
- end
-
- def visitBeginNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.body_node)
- end
-
- def visitBignumNode(iVisited)
- puts iVisited.to_s + " " + iVisited.value
- end
-
- def visitBlockArgNode(iVisited)
- puts iVisited.to_s + " " + iVisited.count
- end
-
- def visitBlockNode(iVisited)
- puts iVisited.to_s
- iVisited.child_nodes.each {|n| visit(n)}
- nil
- end
-
- def visitBlockPassNode(iVisited)
- puts iVisited.to_s
- end
-
- def visitBreakNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.value_node)
- end
-
- def visitConstDeclNode(iVisited)
- puts iVisited.to_s + " #{iVisited.name}"
- visit(iVisited.value_node)
- end
-
- def visitClassVarAsgnNode(iVisited)
- puts iVisited.to_s + " #{iVisited.name}"
- visit(iVisited.value_node)
- end
-
- def visitClassVarDeclNode(iVisited)
- visitClassVarAsgnNode(iVisited)
- end
-
- def visitClassVarNode(iVisited)
- puts iVisited.to_s + " @@#{iVisited.name}"
- end
-
- def visitCallNode(iVisited)
- puts iVisited.to_s + " #{iVisited.name}"
- visit(iVisited.receiver_node)
- visit(iVisited.args_node)
- end
-
- def visitCaseNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.case_node)
- visit(iVisited.case_body)
- end
-
- def visitClassNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.CPath)
- visit(iVisited.super_node)
- visit(iVisited.body_node)
- end
-
- def visitColon2Node(iVisited)
- puts iVisited.to_s + " #{iVisited.name}"
- visit(iVisited.left_node) unless iVisited.left_node.nil?
- end
-
- def visitColon3Node(iVisited)
- puts iVisited.to_s + " ::#{iVisited.name}"
- end
-
- def visitConstNode(iVisited)
- puts iVisited.to_s + " #{iVisited.name}"
- end
-
- def visitDAsgnNode(iVisited)
- visitClassVarAsgnNode(iVisited)
- end
-
- def visitDRegxNode(iVisited)
- puts iVisited.to_s + " opts = #{iVisited.options}, once = ${iVisited.once}"
- end
-
- def visitDStrNode(iVisited)
- puts iVisited.to_s
- iVisited.child_nodes.each {|n| n.accept(self.to_java_object) unless n.nil?}
- nil
- end
-
- def visitDSymbolNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.node);
- end
-
- def visitDVarNode(iVisited)
- puts iVisited.to_s + " #{iVisited.name}"
- end
-
- def visitDXStrNode(iVisited)
- puts iVisited.to_s
- iVisited.child_nodes.each {|n| visit(n)}
- end
-
- def visitDefinedNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.expression_node)
- end
-
- def visitDefnNode(iVisited)
- puts iVisited.to_s + " #{iVisited.name_node.name}"
- iVisited.args_node.accept(self.to_java_object)
- iVisited.body_node.accept(self.to_java_object)
- end
-
- def visitDefsNode(iVisited)
- puts iVisited.to_s + " #{iVisited.name}"
- visit(iVisited.receiver_node)
- visit(iVisited.args_node)
- visit(iVisited.body_node)
- end
-
- def visitDotNode(iVisited)
- puts iVisited.to_s + " #{iVisited.exclusive ? '..' : '...'}"
- visit(iVisited.begin_node)
- visit(iVisited.end_node)
- end
-
- def visitEnsureNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.ensure_node)
- visit(iVisited.body_node)
- end
-
- def visitEvStrNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.body)
- end
-
- def visitFCallNode(iVisited)
- puts iVisited.to_s + " " + iVisited.name
- visit(iVisited.args_node)
- end
-
- def visitFalseNode(iVisited)
- puts iVisited.to_s
- end
-
- def visitFixnumNode(iVisited)
- puts iVisited.to_s + " " + iVisited.value.to_s
- end
-
- def visitFlipNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.begin_node)
- visit(iVisited.end_node)
- end
-
- def visitFloatNode(iVisited)
- puts iVisited.to_s + " " + iVisited.value.to_s
- end
-
- def visitForNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.var_node)
- visit(iVisited.iter_node)
- visit(iVisited.body_node)
- end
-
- def visitGlobalAsgnNode(iVisited)
- puts iVisited.to_s + " " + iVisited.name
- visit(iVisited.value_node)
- end
-
- def visitGlobalVarNode(iVisited)
- puts iVisited.to_s + " " + iVisited.name
- end
-
- def visitHashNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.list_node)
- end
-
- def visitInstAsgnNode(iVisited)
- visitGlobalAsgnNode(iVisited)
- end
-
- def visitInstVarNode(iVisited)
- visitGlobalVarNode(iVisited)
- end
-
- def visitIfNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.condition)
- visit(iVisited.then_body)
- visit(iVisited.else_body)
- end
-
- def visitIterNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.var_node)
- visit(iVisited.body_node)
- visit(iVisited.iter_node)
- end
-
- def visitLocalAsgnNode(iVisited)
- puts iVisited.to_s + " var name " + iVisited.name + " is var index " + iVisited.count.to_s
- visit(iVisited.value_node)
- end
-
- def visitLocalVarNode(iVisited)
- puts iVisited.to_s + " var index " + iVisited.count.to_s
- end
-
- def visitMultipleAsgnNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.head_node)
- visit(iVisited.args_node)
- end
-
- def visitMatch2Node(iVisited)
- puts iVisited.to_s
- visit(iVisited.receiver_node)
- visit(iVisited.value_node)
- end
-
- def visitMatch3Node(iVisited)
- visitMatch2Node(iVisited)
- end
-
- def visitMatchNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.regexp_node)
- end
-
- def visitModuleNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.CPath)
- visit(iVisited.body_node)
- end
-
- def visitNewlineNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.next_node)
- end
-
- def visitNextNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.value_node)
- end
-
- def visitNilNode(iVisited)
- puts iVisited.to_s
- end
-
- def visitNotNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.condition_node)
- end
-
- def visitNthRefNode(iVisited)
- puts iVisited.to_s + " match number " + iVisited.match_number.to_s
- end
-
- def visitOpElementAsgnNode(iVisited)
- puts iVisited.to_s + " " + iVisited.operator_name
- visit(iVisited.receiver_node)
- visit(iVisited.args_node)
- visit(iVisited.value_node)
- end
-
- def visitOpAsgnNode(iVisited)
- puts iVisited.to_s + " variable = " + iVisited.variable_name + " method = " + iVisited.method_name
- visit(iVisited.receiver_node)
- visit(iVisited.value_node)
- end
-
- def visitOpAsgnAndNode(iVisited)
- visitOpAsgnNode(iVisited)
- end
-
- def visitOpAsgnOrNode(iVisited)
- visitopAsgnOrNode(iVisited)
- end
-
- def visitOptNNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.body_node)
- end
-
- def visitOrNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.first_node)
- visit(iVisited.second_node)
- end
-
- def visitPostExeNode(iVisited)
- puts iVisited.to_s
- end
-
- def visitRedoNode(iVisited)
- puts iVisited.to_s
- end
-
- def visitRegexpNode(iVisited)
- puts iVisited.to_s + " " + iVisited.value + " " + iVisited.options.to_s
- end
-
- def visitRescueBodyNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.exception_nodes)
- visit(iVisited.body_node)
- visit(ivisited.opt_rescue_node)
- end
-
- def visitRescueNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.body_node)
- visit(iVisited.rescue_body_node)
- visit(iVisited.else_node)
- end
-
- def visitRetryNode(iVisited)
- puts iVisited.to_s
- end
-
- def visitReturnNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.value_node)
- end
-
- def visitSClassNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.recv_node)
- visit(iVisted.body_node)
- end
-
- def visitScopeNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.body_node)
- end
-
- def visitSelfNode(iVisited)
- puts iVisited.to_s
- end
-
- def visitSplatNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.value)
- end
-
- def visitStrNode(iVisited)
- puts iVisited.to_s + "\"" + iVisited.value + "\""
- end
-
- def visitSuperNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.args_node)
- end
-
- def visitSValueNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.value)
- end
-
- def visitSymbolNode(iVisited)
- puts iVisited.to_s + " " + iVisited.name
- end
-
- def visitToAryNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.value)
- end
-
- def visitTrueNode(iVisited)
- puts iVisited.to_s
- end
-
- def visitUndefNode(iVisited)
- puts iVisited.to_s + " " + iVisited.name
- end
-
- def visitUntilNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.condition_node)
- visit(iVisited.body_node)
- end
-
- def visitVAliasNode(iVisited)
- puts iVisited.to_s + " aliasing " + iVisited.old_name + " as " + iVisited.new_name
- end
-
- def visitVCallNode(iVisited)
- puts iVisited.to_s + " " + iVisited.method_name
- end
-
- def visitWhenNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.expression_nodes)
- visit(iVisited.body_node)
- visit(iVisited.next_case)
- end
-
- def visitWhileNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.condition_node)
- visit(iVisited.body_node)
- end
-
- def visitXStrNode(iVisited)
- puts iVisited.to_s + " \"" + iVisited.value + "\""
- end
-
- def visitYieldNode(iVisited)
- puts iVisited.to_s
- visit(iVisited.args_node)
- end
-
- def visitZArrayNode(iVisited)
- puts iVisited.to_s
- end
-
- def visitZSuperNode(iVisited)
- puts iVisited.to_s
- end
-end
-
-x = JRuby.parse(File.read(ARGV[0]), ARGV[0])
-x.accept(MyVisitor.new)
View
0 jruby/default.build.properties → default.build.properties
File renamed without changes.
View
0 jruby/docs/.cvsignore → docs/.cvsignore
File renamed without changes.
View
0 jruby/docs/BeanScriptingFramework → docs/BeanScriptingFramework
File renamed without changes.
View
0 jruby/docs/CodeConventions.txt → docs/CodeConventions.txt
File renamed without changes.
View
0 jruby/docs/Compiler.txt → docs/Compiler.txt
File renamed without changes.
View
0 jruby/docs/Differences.txt → docs/Differences.txt
File renamed without changes.
View
0 jruby/docs/FAQ.html → docs/FAQ.html
File renamed without changes.
View
0 jruby/docs/Glossary.txt → docs/Glossary.txt
File renamed without changes.
View
0 jruby/docs/Javasupport-highlevel.txt → docs/Javasupport-highlevel.txt
File renamed without changes.
View
0 jruby/docs/Javasupport-lowlevel.txt → docs/Javasupport-lowlevel.txt
File renamed without changes.
View
0 jruby/docs/Javasupport-overview.txt → docs/Javasupport-overview.txt
File renamed without changes.
View
0 jruby/docs/README.coverage → docs/README.coverage
File renamed without changes.
View
0 jruby/docs/README.rails → docs/README.rails
File renamed without changes.
View
0 jruby/docs/README.test → docs/README.test
File renamed without changes.
View
0 jruby/docs/Readline-HOWTO.txt → docs/Readline-HOWTO.txt
File renamed without changes.
View
0 ...cs/getting_a_working_eclipse_sandbox.html → docs/getting_a_working_eclipse_sandbox.html
File renamed without changes.
View
0 jruby/docs/getting_involved.html → docs/getting_involved.html
File renamed without changes.
View
0 jruby/docs/jvyaml/CREDITS → docs/jvyaml/CREDITS
File renamed without changes.
View
0 jruby/docs/rbyaml/LICENSE → docs/jvyaml/LICENSE
File renamed without changes.
View
0 jruby/docs/rbyaml/README → docs/jvyaml/README
File renamed without changes.
View
0 jruby/docs/limitations.html → docs/limitations.html
File renamed without changes.
View
0 ...hes/rails/rails-1.1.2-blockargs-fix.patch → ...hes/rails/rails-1.1.2-blockargs-fix.patch
File renamed without changes.
View
0 ...8.4_fileutils_fu_windows_designator.patch → ...8.4_fileutils_fu_windows_designator.patch
File renamed without changes.
View
0 jruby/docs/jvyaml/LICENSE → docs/rbyaml/LICENSE
File renamed without changes.
View
0 jruby/docs/jvyaml/README → docs/rbyaml/README
File renamed without changes.
View
0 jruby/docs/release-checklist.txt → docs/release-checklist.txt
File renamed without changes.
View
185 dox.conf
@@ -1,185 +0,0 @@
-# Doxyfile 1.2.13-20020210
-
-#---------------------------------------------------------------------------
-# General configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = jruby2
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = C:/dev/jruby2/dox/
-OUTPUT_LANGUAGE = English
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = YES
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = c:\dev\jruby2 \
- c:/dev/jruby2 \
- C:/dev/jruby2 \
- C:\dev\jruby2
-INTERNAL_DOCS = YES
-STRIP_CODE_COMMENTS = YES
-CASE_SENSE_NAMES = NO
-SHORT_NAMES = NO
-HIDE_SCOPE_NAMES = NO
-VERBATIM_HEADERS = NO
-SHOW_INCLUDE_FILES = NO
-JAVADOC_AUTOBRIEF = YES
-INHERIT_DOCS = YES
-INLINE_INFO = NO
-SORT_MEMBER_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-ALIASES = "fixme=\bug need fixing:"
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-OPTIMIZE_OUTPUT_FOR_C = NO
-SHOW_USED_FILES = YES
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = org
-FILE_PATTERNS = *.java
-RECURSIVE = YES
-EXCLUDE = CVS \
- build
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = YES
-INLINE_SOURCES = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION = NO
-#--------------------