mirah 0.0.7-java → 0.0.8-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +181 -0
- data/README.txt +6 -10
- data/Rakefile +86 -9
- data/bin/mirah +2 -0
- data/bin/mirahc +2 -0
- data/bin/mirahp +2 -0
- data/{bin/dubyp → examples/interfaces.mirah} +16 -9
- data/examples/macros/square.mirah +12 -0
- data/examples/macros/square_int.mirah +12 -0
- data/examples/macros/string-each-char.mirah +14 -0
- data/examples/maven/README.txt +2 -0
- data/examples/maven/pom.xml +23 -0
- data/examples/maven/src/main/mirah/hello_mirah.mirah +9 -0
- data/examples/rosettacode/100-doors.mirah +44 -0
- data/examples/rosettacode/99-bottles-of-beer.mirah +13 -0
- data/examples/rosettacode/README.txt +9 -0
- data/examples/rosettacode/boolean-values.mirah +29 -0
- data/examples/rosettacode/comments.mirah +2 -0
- data/examples/rosettacode/copy-a-string.mirah +10 -0
- data/examples/rosettacode/count-occurrences-of-a-substring.mirah +40 -0
- data/examples/rosettacode/create-a-file.mirah +6 -0
- data/examples/rosettacode/empty-string.mirah +9 -0
- data/examples/rosettacode/factorial.mirah +10 -0
- data/examples/rosettacode/fibonacci.mirah +21 -0
- data/examples/rosettacode/file-size.mirah +5 -0
- data/examples/rosettacode/fizz-buzz.mirah +21 -0
- data/examples/rosettacode/flatten-a-list.mirah +24 -0
- data/examples/rosettacode/guess-the-number.mirah +21 -0
- data/examples/rosettacode/is-string-numeric.mirah +127 -0
- data/examples/rosettacode/palindrome.mirah +14 -0
- data/examples/rosettacode/repeat-a-string.mirah +9 -0
- data/examples/rosettacode/reverse-a-string.mirah +6 -0
- data/examples/rosettacode/rot-13.mirah +20 -0
- data/examples/rosettacode/user-input.mirah +4 -0
- data/examples/sort_closure.mirah +1 -1
- data/javalib/dynalink-0.2.jar +0 -0
- data/javalib/mirah-bootstrap.jar +0 -0
- data/lib/mirah.rb +7 -16
- data/lib/mirah/ast.rb +22 -92
- data/lib/mirah/ast/call.rb +41 -9
- data/lib/mirah/ast/class.rb +34 -6
- data/lib/mirah/ast/flow.rb +17 -5
- data/lib/mirah/ast/intrinsics.rb +50 -8
- data/lib/mirah/ast/literal.rb +7 -0
- data/lib/mirah/ast/local.rb +9 -1
- data/lib/mirah/ast/method.rb +21 -8
- data/lib/mirah/ast/scope.rb +1 -1
- data/lib/mirah/ast/structure.rb +81 -15
- data/lib/mirah/ast/type.rb +4 -0
- data/{bin/dubyc → lib/mirah/commands.rb} +4 -11
- data/lib/mirah/commands/base.rb +54 -0
- data/lib/mirah/commands/compile.rb +39 -0
- data/{examples/wiki/Rakefile → lib/mirah/commands/parse.rb} +18 -17
- data/lib/mirah/commands/run.rb +73 -0
- data/lib/mirah/compiler.rb +37 -417
- data/lib/mirah/compiler/call.rb +45 -0
- data/lib/mirah/compiler/class.rb +81 -0
- data/lib/mirah/compiler/flow.rb +109 -0
- data/lib/mirah/compiler/literal.rb +130 -0
- data/lib/mirah/compiler/local.rb +59 -0
- data/lib/mirah/compiler/method.rb +44 -0
- data/lib/mirah/compiler/structure.rb +65 -0
- data/lib/mirah/compiler/type.rb +27 -0
- data/lib/mirah/env.rb +4 -6
- data/lib/mirah/generator.rb +61 -0
- data/lib/mirah/jvm/compiler.rb +8 -867
- data/lib/mirah/jvm/compiler/base.rb +270 -0
- data/lib/mirah/jvm/compiler/java_source.rb +779 -0
- data/lib/mirah/jvm/compiler/jvm_bytecode.rb +851 -0
- data/lib/mirah/jvm/method_lookup.rb +21 -2
- data/lib/mirah/jvm/source_generator/builder.rb +10 -13
- data/lib/mirah/jvm/source_generator/loops.rb +99 -93
- data/lib/mirah/jvm/source_generator/precompile.rb +3 -2
- data/lib/mirah/jvm/typer.rb +3 -3
- data/lib/mirah/jvm/types.rb +10 -426
- data/lib/mirah/jvm/types/array_type.rb +62 -0
- data/lib/mirah/jvm/types/basic_types.rb +1 -0
- data/lib/mirah/jvm/types/dynamic_type.rb +46 -0
- data/lib/mirah/jvm/types/factory.rb +23 -5
- data/lib/mirah/jvm/types/interface_definition.rb +20 -0
- data/lib/mirah/jvm/types/intrinsics.rb +15 -3
- data/lib/mirah/jvm/types/meta_type.rb +45 -0
- data/lib/mirah/jvm/types/methods.rb +12 -5
- data/lib/mirah/jvm/types/null_type.rb +27 -0
- data/lib/mirah/jvm/types/primitive_type.rb +38 -0
- data/lib/mirah/jvm/types/source_mirror.rb +266 -0
- data/lib/mirah/jvm/types/type.rb +173 -0
- data/lib/mirah/jvm/types/type_definition.rb +55 -0
- data/lib/mirah/jvm/types/unreachable_type.rb +27 -0
- data/lib/mirah/jvm/types/void_type.rb +19 -0
- data/lib/mirah/parser.rb +90 -0
- data/lib/mirah/plugin/gwt.rb +5 -5
- data/lib/mirah/plugin/java.rb +1 -1
- data/lib/mirah/transform.rb +4 -321
- data/lib/mirah/transform/ast_ext.rb +63 -0
- data/lib/mirah/transform/error.rb +13 -0
- data/lib/mirah/transform/helper.rb +761 -0
- data/lib/mirah/transform/transformer.rb +255 -0
- data/lib/mirah/typer.rb +2 -383
- data/{bin/duby → lib/mirah/typer/base.rb} +12 -10
- data/lib/mirah/typer/simple.rb +377 -0
- data/lib/mirah/util/argument_processor.rb +114 -0
- data/lib/mirah/util/class_loader.rb +37 -0
- data/lib/mirah/util/compilation_state.rb +51 -0
- data/lib/mirah/util/process_errors.rb +33 -0
- data/lib/mirah/version.rb +1 -1
- data/lib/mirah_task.rb +3 -2
- data/test/{test_ast.rb → core/test_ast.rb} +6 -0
- data/test/{test_compilation.rb → core/test_compilation.rb} +0 -0
- data/test/{test_env.rb → core/test_env.rb} +24 -25
- data/test/{test_macros.rb → core/test_macros.rb} +2 -4
- data/test/{test_typer.rb → core/test_typer.rb} +0 -3
- data/test/jvm/bytecode_test_helper.rb +181 -0
- data/test/{test_javac_compiler.rb → jvm/javac_test_helper.rb} +38 -22
- data/test/jvm/test_enumerable.rb +304 -0
- data/test/{test_java_typer.rb → jvm/test_java_typer.rb} +2 -4
- data/test/{test_jvm_compiler.rb → jvm/test_jvm_compiler.rb} +146 -443
- data/test/jvm/test_macros.rb +147 -0
- data/test/jvm/test_main_method.rb +15 -0
- data/test/{test_gwt.rb → plugins/test_gwt.rb} +0 -2
- metadata +103 -91
- data/bin/jrubyp +0 -52
- data/examples/wiki/src/org/mirah/wiki/MirahWiki.duby +0 -339
- data/examples/wiki/src/org/mirah/wiki/edit.eduby.html +0 -42
- data/examples/wiki/src/org/mirah/wiki/error.eduby.html +0 -2
- data/examples/wiki/src/org/mirah/wiki/layout.eduby.html +0 -69
- data/examples/wiki/src/org/mirah/wiki/parser.eduby.html +0 -7
- data/examples/wiki/src/org/mirah/wiki/view.eduby.html +0 -15
- data/examples/wiki/war/WEB-INF/classes/test/HeredocContext.class +0 -0
- data/examples/wiki/war/WEB-INF/classes/test/MirahParser.class +0 -0
- data/examples/wiki/war/WEB-INF/lib/appengine-api.jar +0 -0
- data/examples/wiki/war/WEB-INF/lib/dubydatastore.jar +0 -0
- data/examples/wiki/war/WEB-INF/lib/jmeta-runtime.jar +0 -0
- data/examples/wiki/war/WEB-INF/lib/pegdown-stubs.jar +0 -0
- data/examples/wiki/war/WEB-INF/pegdown.jar +0 -0
- data/examples/wiki/war/app.yaml +0 -21
- data/examples/wiki/war/public/favicon.ico +0 -0
- data/examples/wiki/war/public/images/appengine_duby.png +0 -0
- data/examples/wiki/war/public/images/back.gif +0 -0
- data/examples/wiki/war/public/images/dir.gif +0 -0
- data/examples/wiki/war/public/images/file.gif +0 -0
- data/examples/wiki/war/public/javascripts/prettify.js +0 -61
- data/examples/wiki/war/public/robots.txt +0 -0
- data/examples/wiki/war/public/stylesheets/main.css +0 -156
- data/examples/wiki/war/public/stylesheets/prettify.css +0 -1
- data/examples/wiki/war/public/stylesheets/sh_style.css +0 -66
- data/examples/wiki/war/public/stylesheets/source.css +0 -21
- data/examples/wiki/war/public/wmd/images/bg-fill.png +0 -0
- data/examples/wiki/war/public/wmd/images/bg.png +0 -0
- data/examples/wiki/war/public/wmd/images/blockquote.png +0 -0
- data/examples/wiki/war/public/wmd/images/bold.png +0 -0
- data/examples/wiki/war/public/wmd/images/code.png +0 -0
- data/examples/wiki/war/public/wmd/images/h1.png +0 -0
- data/examples/wiki/war/public/wmd/images/hr.png +0 -0
- data/examples/wiki/war/public/wmd/images/img.png +0 -0
- data/examples/wiki/war/public/wmd/images/italic.png +0 -0
- data/examples/wiki/war/public/wmd/images/link.png +0 -0
- data/examples/wiki/war/public/wmd/images/ol.png +0 -0
- data/examples/wiki/war/public/wmd/images/redo.png +0 -0
- data/examples/wiki/war/public/wmd/images/separator.png +0 -0
- data/examples/wiki/war/public/wmd/images/ul.png +0 -0
- data/examples/wiki/war/public/wmd/images/undo.png +0 -0
- data/examples/wiki/war/public/wmd/images/wmd-on.png +0 -0
- data/examples/wiki/war/public/wmd/images/wmd.png +0 -0
- data/examples/wiki/war/public/wmd/showdown.js +0 -421
- data/examples/wiki/war/public/wmd/wmd-base.js +0 -1799
- data/examples/wiki/war/public/wmd/wmd-plus.js +0 -311
- data/examples/wiki/war/public/wmd/wmd.js +0 -73
- data/examples/wiki/war/src/org/mirah/wiki/MirahWiki.duby +0 -339
- data/examples/wiki/war/src/org/mirah/wiki/edit.eduby.html +0 -42
- data/examples/wiki/war/src/org/mirah/wiki/error.eduby.html +0 -2
- data/examples/wiki/war/src/org/mirah/wiki/layout.eduby.html +0 -69
- data/examples/wiki/war/src/org/mirah/wiki/parser.eduby.html +0 -7
- data/examples/wiki/war/src/org/mirah/wiki/view.eduby.html +0 -15
- data/javalib/dynalink-0.1.jar +0 -0
- data/javalib/jsr292-mock.jar +0 -0
- data/lib/mirah/class_loader.rb +0 -35
- data/lib/mirah/compilation_state.rb +0 -28
- data/lib/mirah/impl.rb +0 -273
- data/lib/mirah/jvm/base.rb +0 -267
- data/lib/mirah/jvm/source_compiler.rb +0 -760
- data/lib/mirah/transform2.rb +0 -752
data/History.txt
CHANGED
|
@@ -1,3 +1,184 @@
|
|
|
1
|
+
=== 0.0.8 / 2011-08-31
|
|
2
|
+
|
|
3
|
+
af43b77 Merge pull request #132 from hackergarten/master
|
|
4
|
+
416e130 readme file
|
|
5
|
+
fbf6ddc fix #129 call next anyway if there is no block arg
|
|
6
|
+
18cef56 s/duby/mirah/ in a test
|
|
7
|
+
945558b pull enumerable/loop tests into separate file
|
|
8
|
+
585856e s/duby/mirah/ in transformer
|
|
9
|
+
f0cc410 adding a couple method docs
|
|
10
|
+
11dac9a push some code around and do a few s/duby/mirah/ s
|
|
11
|
+
17b0031 wrap the bodies of blocks passed to macros as well
|
|
12
|
+
02e5cbe clean up tests some
|
|
13
|
+
794d61d pull macro tests into separate file
|
|
14
|
+
ae1b942 flatten a list example
|
|
15
|
+
98ccad9 create a file example
|
|
16
|
+
9dc8981 file size example
|
|
17
|
+
fddd3e2 count occurrences of a substring examples
|
|
18
|
+
2297cd7 is string numeric example
|
|
19
|
+
6ccaf02 empty string
|
|
20
|
+
4c58e5a fizz buzz example
|
|
21
|
+
e1e107a empty string example
|
|
22
|
+
643e80a added copy a string sample
|
|
23
|
+
b3c35a5 fibonacci example
|
|
24
|
+
abdf45c factorial example
|
|
25
|
+
cd3eb03 how to do comments
|
|
26
|
+
9af53ee boolean value examples
|
|
27
|
+
973ef14 some macro examples
|
|
28
|
+
121b654 square with strings
|
|
29
|
+
095773d hahahah guess what
|
|
30
|
+
c8c4465 reading user input
|
|
31
|
+
ddf8eda Palindrome
|
|
32
|
+
df01492 reverse a string
|
|
33
|
+
186c333 rot 13 example
|
|
34
|
+
13f4a10 initial version of the 100 doors
|
|
35
|
+
da29d35 removed unneeded parameter
|
|
36
|
+
09ded03 99 bottles of beer
|
|
37
|
+
f1b490c added repeating a string sample
|
|
38
|
+
ba99754 update issues link on readme
|
|
39
|
+
785c6c7 further tets helper factorization
|
|
40
|
+
051854b make javac helper's compile almost the same as bytecode's
|
|
41
|
+
1d9648b refactor javac tests parsing and infering steps
|
|
42
|
+
ba44c0d default args are evaled on call
|
|
43
|
+
3ebe9f3 use some of the helper methods defined in bytecode's helper in javac's
|
|
44
|
+
5c2b47c fix main in files w/ classes of same name contained in them
|
|
45
|
+
3b69287 file name should also be configurable for javac compilation
|
|
46
|
+
e3d2dc7 pulling out a couple assertion definitions into a helper file
|
|
47
|
+
c0112a4 overall task should fail if any tests failed
|
|
48
|
+
2da4ca2 annotate new rake tasks
|
|
49
|
+
5ae27b7 making all tests run even if some fail
|
|
50
|
+
ae6d8e6 fixing up helpers for jvm tests a bit
|
|
51
|
+
66e87d9 tease apart test #compile method for bytecode
|
|
52
|
+
dbbcf8e split bytecode and javac tests
|
|
53
|
+
aa21dc9 split tests into multiple dirs and tasks
|
|
54
|
+
feb8028 Remove unnecessary, broken 'super' call in BlockArgument.
|
|
55
|
+
02101c3 Update the bootstrap JAR to incorporate the new loop macro in builtins.mirah
|
|
56
|
+
de68299 test fallout from top level changes, loop test still fails
|
|
57
|
+
2786cfd sometimes children can be nil
|
|
58
|
+
1b9b018 Merge in loop macro from techomancy.
|
|
59
|
+
fa13c03 Merge pull request #53 from ashee/master
|
|
60
|
+
be84d53 Merge pull request #82 from baroquebobcat/use_bundler
|
|
61
|
+
2ba1932 Merge pull request #85 from rdp/mergeable2
|
|
62
|
+
b4e3106 Merge pull request #88 from baroquebobcat/fix_up_env_tests_and_a_typo
|
|
63
|
+
7212065 Merge pull request #89 from jabr/master
|
|
64
|
+
71c7c3f Merge pull request #90 from baroquebobcat/test_reorg
|
|
65
|
+
50d37d5 Merge pull request #91 from baroquebobcat/fix_syntax_error_not_providing_messages
|
|
66
|
+
e206d90 Merge pull request #92 from baroquebobcat/update_compile_ant_class_from_duby
|
|
67
|
+
4a9d8e2 Merge pull request #93 from szegedi/dynalang-0.2
|
|
68
|
+
688fe7d Update to use dynalink-0.2.
|
|
69
|
+
9f96ab0 mirah-ify ant compile task
|
|
70
|
+
b6b92d6 wrap jmeta syntax errors w/ mirah ones
|
|
71
|
+
2d48ca2 unshift of lib unnecessary as it is put on the path by the test task
|
|
72
|
+
fbae14b modularize assert_include
|
|
73
|
+
b0c05c8 move compile methods out of respective classes and into helper
|
|
74
|
+
a563f4a added test helper for jvm tests
|
|
75
|
+
d4070fe moved jvm tests into subdirectory
|
|
76
|
+
688c18d Call original create_method_builder in default case when patching the JVM compiler in the GWT plugin.
|
|
77
|
+
f3c7a7d Only generate a main function when we really need it (i.e. not when the source only has imports, class definitions, and interface declarations).
|
|
78
|
+
c001130 Add require 'rubygems' to scripts so bitescript gem can be found.
|
|
79
|
+
34c19d3 typo s/seperator/separator/
|
|
80
|
+
0886a72 fix the env tests I broke in ac92625bf76dc00d
|
|
81
|
+
922d5eb Merge pull request #84 from baroquebobcat/use_1_6_bytecode
|
|
82
|
+
57dc505 Merge pull request #78 from sd/master
|
|
83
|
+
10709cd Merge pull request #86 from baroquebobcat/use_file_path_separator_instead_of_rbconfig
|
|
84
|
+
ac92625 use File::PATH_SEPARATOR instead of RbConfig
|
|
85
|
+
23d77ef use java 1.6 bytecode. the recompiled jar didn't work for me with 1.5
|
|
86
|
+
10b2b18 warn users instead of outputting "...done" when nothing actually occurs
|
|
87
|
+
4033268 partial fix for issue #23 don't ICE when parsing after a node verify error
|
|
88
|
+
6ea2da8 remove rescue around dev bitescript require
|
|
89
|
+
d105b97 use bundler to manage dev dependencies
|
|
90
|
+
7a3127e use right date formatting
|
|
91
|
+
7cb39eb try to help them know what is happening better
|
|
92
|
+
0f5287a make it more explicit what compile mode means
|
|
93
|
+
8cb8e41 Fix bootstrapping
|
|
94
|
+
14559d3 Fix method lookup for java.lang.Class objects
|
|
95
|
+
bde76f8 Merge branch 'newast'
|
|
96
|
+
16db63e Fix bugs with interfaces and error types
|
|
97
|
+
778ec51 Fix strange transform error
|
|
98
|
+
7c76776 Merge pull request #80 from baroquebobcat/closure_fix_2
|
|
99
|
+
7f83fb0 fix closure scope issue, javac issue
|
|
100
|
+
0c4ea99 Macro enhancement
|
|
101
|
+
705a907 Macro enhancement
|
|
102
|
+
e395169 Add a class mirror to the NullType
|
|
103
|
+
4cff3f8 nodes
|
|
104
|
+
00d223d Fix block return values
|
|
105
|
+
2fed449 Merge commit '6b3ce537'
|
|
106
|
+
6b3ce53 test for creating anonymous class method that uses no args and returns a value
|
|
107
|
+
489d4aa Updates to current invokedynamic logic.
|
|
108
|
+
af717c6 Add an Unreachable JVM type
|
|
109
|
+
46a1bea Merge branch 'master' of github.com:mirah/mirah
|
|
110
|
+
c4c8afb Fix begin...rescue with no body
|
|
111
|
+
73172c8 Try to ignore assignments to nil during type inference
|
|
112
|
+
e2e5c56 Fix rescue block inference
|
|
113
|
+
a073480 Fix link to issue tracker.
|
|
114
|
+
681c274 Add support for rescue - else. Fix bug with rescue when the body always raises an exception but the rescue clauses return a result.
|
|
115
|
+
d486090 More efficient new_hash macro
|
|
116
|
+
b78e3a8 Macro bugfixes.
|
|
117
|
+
fa40e47 Add missing .java parser
|
|
118
|
+
237f16c Fix line numbers in debug info
|
|
119
|
+
9b163c0 Add support for circular references between java and mirah files
|
|
120
|
+
726ad63 Merge branch 'master' of github.com:mirah/mirah
|
|
121
|
+
d974e04 Fix typo
|
|
122
|
+
8c2bffa Fix #31: mirahc -h regression
|
|
123
|
+
fac6bd5 Fix #44: Failure on 'rake gem'
|
|
124
|
+
ac79807 corrected reference for "jar:bootstrap" in Rakefile
|
|
125
|
+
1d07018 Present an error when using -j/--java with non-compile commands. Fixes #62.
|
|
126
|
+
9dc3345 Ensure the JVM type has been initialized before calling methods on it in JVM::Types::Type. Fixes #65.
|
|
127
|
+
551deac Use catch/throw to terminate the compiler early, since SystemExit bubbles out MirahCommand and makes noise. Fixes #66.
|
|
128
|
+
fb401fa Fix bad call to compile_asts (does not need transformer now).
|
|
129
|
+
961551d Add missing cast to Integer.
|
|
130
|
+
d43cfc7 Fix -V and error processing
|
|
131
|
+
4b67a11 Merge
|
|
132
|
+
cf4f2de Small changes to README feature list.
|
|
133
|
+
1d003c5 clean the pom file
|
|
134
|
+
521bbd9 Add a trivial example Maven project that uses the Maven plugin.
|
|
135
|
+
88838bc add maven release process readme
|
|
136
|
+
8f37529 update pom descriptors to pass maven release requirements
|
|
137
|
+
5c7a690 Fix a couple vars I missed in mirah.bat and mirahc.bat.
|
|
138
|
+
59409a1 Add missing .bat files to dist.
|
|
139
|
+
bb39a69 Put .zip contents into a mirah-VERSION directory (d'oh!).
|
|
140
|
+
e12fbe8 Fix references to duby scripts in gemspec and trim out wiki from examples (for size).
|
|
141
|
+
a395dbf Make zip task depend on jar:complete again.
|
|
142
|
+
4e89a03 Add examples dir to zip distribution.
|
|
143
|
+
7c06633 Oops. Add missing distbin dir with bin scripts for the zip distribution.
|
|
144
|
+
690f82b Add zip, gem, and dist targets to Rakefile, to build a zip'ed distribution, gem file, and everything.
|
|
145
|
+
53d8e16 Restore lost destination when writing compiled output.
|
|
146
|
+
3b181f5 Back off on overzealous trimming of @state; it's still used a few places I can't eliminate.
|
|
147
|
+
b0c6ce8 Remove out-of-date duby and jrubyp-related commands.
|
|
148
|
+
963140c Remove duby.gemspec. We're done with this, yes?
|
|
149
|
+
5b923e5 Move mirah/jvm/base to mirah/jvm/compiler/base
|
|
150
|
+
c89ed22 Move JVMCompilerBase to Base.
|
|
151
|
+
cd1ae11 Move JVM bytecode compiler to appropriate file structure.
|
|
152
|
+
b27a57a Move JVMBytecode and JVMCompilerBase to Mirah::JVM::Compiler namespace.
|
|
153
|
+
ffc2d18 Move Mirah::Compiler::JVM to Mirah::Compiler::JVMBytecode
|
|
154
|
+
3d510fb Move jvm/source_compiler.rb into jvm/compiler/java_source.rb
|
|
155
|
+
a28852a Move Mirah::Compiler::JavaSource to Mirah::JVM::Compiler::JavaSource
|
|
156
|
+
8ff25a5 Move Mirah::Typer::JVM to Mirah::JVM::Typer
|
|
157
|
+
0809140 Refactor jvm/types.rb into jvm/types subdir files.
|
|
158
|
+
898cb63 Refactor transform and transform2 into transform/{ast_ext,error,helper,transformer}.
|
|
159
|
+
e68eb22 Refactor typer.rb into typer/base and typer/simple.
|
|
160
|
+
a05e503 Forcibly nuke randomly-named xform classes generated during test_javac_compiler.
|
|
161
|
+
0da5b73 Missed a few ClassLoader and CompilationState references.
|
|
162
|
+
e357957 Move a few more classes under util and clean up some requires.
|
|
163
|
+
fd2f0bf More OO decomposition of Mirah command-line logic and compiler/generator/parser workflow.
|
|
164
|
+
5762c5d Restructure commands into their own classes and files.
|
|
165
|
+
3075d8e Reorg main three entry points into Mirah command a bit.
|
|
166
|
+
c129e57 Add .DS_Store to .gitignore
|
|
167
|
+
db7aa1e Restructure compiler.rb into mirah/compiler subdir, mirroring mirah/ast subdir.
|
|
168
|
+
330a1c2 Add a simple example of declaring an interface.
|
|
169
|
+
723416f Add covariance for one-dimensional arrays (see #55). Multi-dimensional arrays still need work.
|
|
170
|
+
356d896 Roll versions to 0.0.8{.dev,-SNAPSHOT).
|
|
171
|
+
3b6bb81 Fixed an issue with mirah_task
|
|
172
|
+
ebd0ab2 Add casting support to the Call node.
|
|
173
|
+
|
|
174
|
+
=== 0.0.7 / 2011-03-20
|
|
175
|
+
|
|
176
|
+
248368c Fix assignability of dynamic type; only target of Object should be allowed.
|
|
177
|
+
9734853 Allow abstract interface methods also on Object to use Object impl. Fixes #54.
|
|
178
|
+
13b84d2 Add some simple logging of compiler phases (not for run mode).
|
|
179
|
+
7dad0eb Fix recursive examples, since we now do try to infer both branches of an If.
|
|
180
|
+
27409a0 Reorg mirah.rb into a few additional files under lib/mirah.
|
|
181
|
+
|
|
1
182
|
=== 0.0.6 / 2011-03-20
|
|
2
183
|
|
|
3
184
|
ce9b740 Update dynalink stuff, add JSR292 mock to enable compiling/including invokedynamic logic.
|
data/README.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
= mirah
|
|
2
2
|
|
|
3
3
|
* http://groups.google.com/group/mirah
|
|
4
|
-
* http://
|
|
4
|
+
* http://github.com/mirah/mirah/issues
|
|
5
5
|
|
|
6
6
|
== DESCRIPTION:
|
|
7
7
|
|
|
@@ -10,11 +10,12 @@ local type inference and a heavily Ruby-inspired syntax. Mirah
|
|
|
10
10
|
currently includes a typer/compiler backend for the JVM which can
|
|
11
11
|
output either JVM bytecode or Java source files.
|
|
12
12
|
|
|
13
|
-
== FEATURES
|
|
13
|
+
== FEATURES:
|
|
14
14
|
|
|
15
|
-
* Ruby syntax
|
|
15
|
+
* Ruby-like syntax
|
|
16
16
|
* Compiles to .class or .java
|
|
17
17
|
* Fast as Java
|
|
18
|
+
* No runtime library
|
|
18
19
|
|
|
19
20
|
== SYNOPSIS:
|
|
20
21
|
|
|
@@ -38,16 +39,11 @@ $ gem install mirah
|
|
|
38
39
|
|
|
39
40
|
To build and install from source,
|
|
40
41
|
|
|
41
|
-
$ git clone http://github.com/headius/bitescript.git
|
|
42
42
|
$ git clone http://github.com/mirah/mirah.git
|
|
43
|
-
$ cd bitescript
|
|
44
|
-
$ gem build bitescript.gemspec
|
|
45
|
-
$ gem install bitescript-*
|
|
46
|
-
$ cd -
|
|
47
43
|
$ cd mirah
|
|
44
|
+
$ bundle install
|
|
48
45
|
$ rake gem
|
|
49
|
-
$ gem install pkg/mirah
|
|
50
|
-
$ cd -
|
|
46
|
+
$ gem install pkg/mirah-*.gem
|
|
51
47
|
|
|
52
48
|
== For Java tools:
|
|
53
49
|
|
data/Rakefile
CHANGED
|
@@ -17,9 +17,8 @@ require 'rake'
|
|
|
17
17
|
require 'rake/testtask'
|
|
18
18
|
require 'rubygems'
|
|
19
19
|
require 'rubygems/package_task'
|
|
20
|
+
require 'bundler/setup'
|
|
20
21
|
require 'java'
|
|
21
|
-
$: << './lib'
|
|
22
|
-
require 'mirah'
|
|
23
22
|
require 'jruby/compiler'
|
|
24
23
|
require 'ant'
|
|
25
24
|
|
|
@@ -28,16 +27,69 @@ Gem::PackageTask.new Gem::Specification.load('mirah.gemspec') do |pkg|
|
|
|
28
27
|
pkg.need_tar = true
|
|
29
28
|
end
|
|
30
29
|
|
|
30
|
+
bitescript_lib_dir = File.dirname Gem.find_files('bitescript').first
|
|
31
|
+
|
|
31
32
|
task :gem => 'jar:bootstrap'
|
|
32
33
|
|
|
33
34
|
task :default => :test
|
|
35
|
+
def run_tests tests
|
|
36
|
+
results = tests.map do |name|
|
|
37
|
+
begin
|
|
38
|
+
Rake.application[name].invoke
|
|
39
|
+
rescue Exception
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
tests.zip(results).each do |name, passed|
|
|
44
|
+
unless passed
|
|
45
|
+
puts "Errors in #{name}"
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
fail if results.any?{|passed|!passed}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
desc "run full test suite"
|
|
52
|
+
task :test do
|
|
53
|
+
run_tests [ 'test:core', 'test:plugins', 'test:jvm' ]
|
|
54
|
+
end
|
|
55
|
+
namespace :test do
|
|
34
56
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
57
|
+
desc "run the core tests"
|
|
58
|
+
Rake::TestTask.new :core do |t|
|
|
59
|
+
t.test_files = FileList["test/core/**/test*.rb"]
|
|
60
|
+
java.lang.System.set_property("jruby.duby.enabled", "true")
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
desc "run tests for plugins"
|
|
64
|
+
Rake::TestTask.new :plugins do |t|
|
|
65
|
+
t.libs << 'test'
|
|
66
|
+
t.test_files = FileList["test/plugins/**/test*.rb"]
|
|
67
|
+
java.lang.System.set_property("jruby.duby.enabled", "true")
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
desc "run jvm tests, both bytecode and java source"
|
|
71
|
+
task :jvm do
|
|
72
|
+
run_tests ["test:jvm:bytecode", "test:jvm:javac"]
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
namespace :jvm do
|
|
76
|
+
desc "run jvm tests compiling to bytecode"
|
|
77
|
+
Rake::TestTask.new :bytecode do |t|
|
|
78
|
+
t.libs << 'test/jvm'
|
|
79
|
+
t.ruby_opts.concat ["-r", "bytecode_test_helper"]
|
|
80
|
+
t.test_files = FileList["test/jvm/**/test*.rb"]
|
|
81
|
+
java.lang.System.set_property("jruby.duby.enabled", "true")
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
desc "run jvm tests compiling to java source, then bytecode"
|
|
85
|
+
Rake::TestTask.new :javac do |t|
|
|
86
|
+
t.libs << 'test/jvm'
|
|
87
|
+
t.ruby_opts.concat ["-r", "javac_test_helper"]
|
|
88
|
+
t.test_files = FileList["test/jvm/**/test*.rb"]
|
|
89
|
+
java.lang.System.set_property("jruby.duby.enabled", "true")
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
end
|
|
41
93
|
end
|
|
42
94
|
|
|
43
95
|
task :init do
|
|
@@ -52,6 +104,7 @@ task :clean do
|
|
|
52
104
|
end
|
|
53
105
|
|
|
54
106
|
task :compile => :init do
|
|
107
|
+
require 'mirah'
|
|
55
108
|
# build the Ruby sources
|
|
56
109
|
puts "Compiling Ruby sources"
|
|
57
110
|
JRuby::Compiler.compile_argv([
|
|
@@ -72,6 +125,7 @@ task :compile => :init do
|
|
|
72
125
|
Mirah.compile(
|
|
73
126
|
'-c', classpath,
|
|
74
127
|
'-d', '../build',
|
|
128
|
+
'--jvm', '1.6',
|
|
75
129
|
'org/mirah',
|
|
76
130
|
'duby/lang',
|
|
77
131
|
'mirah'
|
|
@@ -90,7 +144,7 @@ task :jar => :compile do
|
|
|
90
144
|
fileset :dir => 'lib'
|
|
91
145
|
fileset :dir => 'build'
|
|
92
146
|
fileset :dir => '.', :includes => 'bin/*'
|
|
93
|
-
fileset :dir =>
|
|
147
|
+
fileset :dir => bitescript_lib_dir
|
|
94
148
|
manifest do
|
|
95
149
|
attribute :name => 'Main-Class', :value => 'org.mirah.MirahCommand'
|
|
96
150
|
end
|
|
@@ -104,6 +158,7 @@ namespace :jar do
|
|
|
104
158
|
zipfileset :src => 'dist/mirah.jar'
|
|
105
159
|
zipfileset :src => 'javalib/jruby-complete.jar'
|
|
106
160
|
zipfileset :src => 'javalib/mirah-parser.jar'
|
|
161
|
+
zipfileset :src => 'javalib/dynalink-0.2.jar'
|
|
107
162
|
manifest do
|
|
108
163
|
attribute :name => 'Main-Class', :value => 'org.mirah.MirahCommand'
|
|
109
164
|
end
|
|
@@ -117,3 +172,25 @@ namespace :jar do
|
|
|
117
172
|
end
|
|
118
173
|
end
|
|
119
174
|
end
|
|
175
|
+
|
|
176
|
+
desc "Build a distribution zip file"
|
|
177
|
+
task :zip => 'jar:complete' do
|
|
178
|
+
basedir = "tmp/mirah-#{Mirah::VERSION}"
|
|
179
|
+
mkdir_p "#{basedir}/lib"
|
|
180
|
+
mkdir_p "#{basedir}/bin"
|
|
181
|
+
cp 'dist/mirah-complete.jar', "#{basedir}/lib"
|
|
182
|
+
cp 'distbin/mirah.bash', "#{basedir}/bin/mirah"
|
|
183
|
+
cp 'distbin/mirahc.bash', "#{basedir}/bin/mirahc"
|
|
184
|
+
cp Dir['{distbin/*.bat}'], "#{basedir}/bin/"
|
|
185
|
+
cp_r 'examples', "#{basedir}/examples"
|
|
186
|
+
rm_rf "#{basedir}/examples/wiki"
|
|
187
|
+
cp 'README.txt', "#{basedir}"
|
|
188
|
+
cp 'NOTICE', "#{basedir}"
|
|
189
|
+
cp 'LICENSE', "#{basedir}"
|
|
190
|
+
cp 'History.txt', "#{basedir}"
|
|
191
|
+
sh "sh -c 'cd tmp ; zip -r ../dist/mirah-#{Mirah::VERSION}.zip mirah-#{Mirah::VERSION}/*'"
|
|
192
|
+
rm_rf 'tmp'
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
desc "Build all redistributable files"
|
|
196
|
+
task :dist => [:gem, :zip]
|
data/bin/mirah
CHANGED
data/bin/mirahc
CHANGED
data/bin/mirahp
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env jruby
|
|
2
|
-
|
|
3
1
|
# Copyright (c) 2010 The Mirah project authors. All Rights Reserved.
|
|
4
2
|
# All contributing project authors may be found in the NOTICE file.
|
|
5
3
|
#
|
|
@@ -15,12 +13,21 @@
|
|
|
15
13
|
# See the License for the specific language governing permissions and
|
|
16
14
|
# limitations under the License.
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
import java.util.List
|
|
17
|
+
|
|
18
|
+
interface Printer do
|
|
19
|
+
def printAll(a:List)
|
|
20
|
+
returns void
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
class MyPrinter
|
|
25
|
+
implements Printer
|
|
26
|
+
def printAll(a)
|
|
27
|
+
a.each {|element| puts element}
|
|
28
|
+
end
|
|
23
29
|
end
|
|
24
30
|
|
|
25
|
-
|
|
26
|
-
|
|
31
|
+
list = ['foo', 'bar', 'baz']
|
|
32
|
+
p = Printer(MyPrinter.new)
|
|
33
|
+
p.printAll(list)
|