mirah 0.1.3-java → 0.1.4-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c43543a6d373e0cc8f1dbc80ba79635dbe8ac93
4
- data.tar.gz: b26f831bf81940b7268657bd1d8839e17dae25b6
3
+ metadata.gz: 1af0c232deb319793169771869237071abe16677
4
+ data.tar.gz: 59f8f8f68b83436eb954eb357d0dadcf78ac9dbe
5
5
  SHA512:
6
- metadata.gz: bb72ed358c9b843a5dfcc10f0f452f434fa332c35771e725822ef973a622862a75b8b501f7e325e51832e92aad0dd5edf15df71b3d4350b9db6c911013cbf61e
7
- data.tar.gz: 8ad01e2fcb6ebdebb56bc1c1d6e8d30fb4b78fe5e4fcf0273ed62a0f7eb5f8020379a63637ee5e8c6d43b72c4fd7ef7f820bb647e4e2bfa681a9d244a93ad070
6
+ metadata.gz: 0045ae4be5b4c916096ce797f8f6b2db53f3aa5f499d8cee50882555593729905a06fd7d4001d6911de45bc807286273c38cd1026af09fb940fe8c5e32e3b03f
7
+ data.tar.gz: 04edb6509392c2cb73c92872e26c25a3402d88c2785dc2d08555e7a0a98bbe5d0a18d5f698ad0034fa620e6f933c1c3b5b503e8d033d727d166f25cfc77543db
@@ -1,6 +1,102 @@
1
+ === 0.1.4 November Chill / 2014-11-13
1
2
 
2
- === 0.1.3 Metacircularity: Achieved / 2014-08-06
3
+ d73e6d4 ignore ruby version management / test temp files
4
+ 4090b8d add a number of new block tests
5
+ b29a845 some work in progress wrt new closure impl.
6
+ aa92d0f add some whitespace to scopes.mirah
7
+ 010e16a add a few things to TODO, rm return error message todo
8
+ 140cd96 catch another explicit cast that could be implicit in a block
9
+ 78122d6 change type incompat error on returns to use be clearer
10
+ 71d9ea3 add declared_binding_type= definitions to BetterScope
11
+ 5fad461 update TODO w/ some more issue numbers
12
+ c6bbd73 reformat method_lookup_test
13
+ 266889f add add_import to Scope interface for java interop
14
+ 2e0b0de rm old scope impl
15
+ 8e15cd0 pass new closure flag through to typers
16
+ 6067583 mark differing type sig test as pending
17
+ 2ecbea4 add flag for enabling new closures, default to off
18
+ a6d6e54 add a couple TODOs, make issues for most warnings related todos
19
+ c68c5a1 rm local return in mirror_type_system.mirah
20
+ c2cdd2d clean should rm generated test files
21
+ 0f9b6ce bytecode generation should blow up if it encounters a call with a block
22
+ bc4f351 reenable better closures, now that some bugs are fixed
23
+ 2e7118b attempt to fix test fixtures
24
+ 8ee1764 reformat long line in typer
25
+ 0fc0cb2 add some things to better closures
26
+ c33f4f8 fix build by moving back to old closure impl + fixing ProxyNode clone
27
+ 56c528f if a node doesn't have a position, still have a good error
28
+ 2c23611 rm usage of import sorter
29
+ f40f2e5 update java bits to 1.6 from 1.5 in Rakefile, to get rid of warnings
30
+ 2d983ff only compile test fixtures if needed
31
+ 7946057 rm unused file from previous closure rewrite attempt
32
+ 1f8590f rm unused assert method
33
+ 5210e2f clean up better closures a bit
34
+ 54fe717 rm finest logging call in test
35
+ d94068e only drop stacktraces when fine logging enabled
36
+ 25efb58 fix interface problem. It was a problem w/ a closure w/o a binding having its class def inserted incorrectly
37
+ 508fb5a rm puts in test
38
+ 4d9363d do a proxy cleanup before adjusting bindings
39
+ f054ae6 WIP I
40
+ f91eec0 better asm download link in Rakefile
41
+ 104082e fix import sorter so that nested packages don't cause it to blow up
42
+ bdf29f9 use https for maven
43
+ dbc36ea fix import sorter by using NodeScanner
44
+ 7eecc9d add new closure impl, but off
45
+ 006622e bump copyright
46
+ 6b9439e rm nlr from old closure builder
47
+ 73f9866 add call to finish closures to mirah_compiler.mirah
48
+ 6e8ce48 if we're about to create a loop in scope, just continue
49
+ 4cc0841 dump stack trace on internal typer errors when running in verbose mode
50
+ 1249e63 do something slightly more reasonable when a lambda's type arg is no good
51
+ 80a7151 add expln at top of better_scope.mirah
52
+ 2f3606d add new args tests
53
+ 9fe02d0 update maven instructions w/ dist/mirahc.jar
54
+ 993135c roughly sort asts before performing type inference.
55
+ 32e2189 add building mirah w/ mirah to ci
56
+ 8adf80b adding some fine logging to closure building / commentary
57
+ 69ffe75 complain in a better way if generic inference has a problem
58
+ 5ef8965 add some tests for lambdas in the blocks test
59
+ 245badf clean up block test for param to not use threads
60
+ 16c4071 rm commented puts from async_type_builder
61
+ 7717d61 fix up better scope to act like JVMScope
62
+ 9c4cf81 fix blocks in rescues
63
+ 6d5e408 add interface for closure building to make it easier to defer it later
64
+ 8e538e7 format org/mirah/macros/builder.mirah / move inference of annotation to after ast attachment
65
+ b4876e4 bump copyright on mirah_compiler.mirah
66
+ 5d41f16 format src/org/mirah/typer/assignable_type_future.mirah
67
+ eae844d flesh out remaining better scope bits, use better scope
68
+ 0526803 break up import test a bit
69
+ bfbeaae rm unneeded semi colon in test
70
+ b7079fd add more information to default error message
71
+ aa84912 start putting together a MirrorScope interface
72
+ 28a6a15 update ant task, update ant example
73
+ c8b4930 make tmp script names for tests shorter
74
+ b367886 move binding creation to class building
75
+ e0344c4 formatting jvm_scope + base_type_future, w/ better logging in base_type_future
76
+ a373f3b format array_compiler.mirah
77
+ 829e85a move scope related typer methods together
78
+ 676394d name closure inner classes w/ good names
79
+ 6ffe551 add ant classes to mirahc.jar
80
+ 52f0acd add pending test for bad nested closure binding generation
81
+ fd3d1cb update versions in readme
82
+ 7a47048 start converting to implicit casting in block arg defs
83
+ 6a814e6 add whitespace, rm unneeded manual boxing
84
+ ba7ef3e rm unneeded ruby files
85
+ aec965b add constant support
86
+ 0fcf899 rm unnecessary test logging
87
+ 4a080d4 Merge branch 'shannah-parser_issue_14_fix2'
88
+ 89b56fc Merge branch 'parser_issue_14_fix2' of git://github.com/shannah/mirah into shannah-parser_issue_14_fix2
89
+ b377e66 fix version test
90
+ 40cd50f bump version
91
+ 839416d use released mirah for builds
92
+ 60aa9be Updated parser to include support for including whitespace and comment tokens in the lexer. https://github.com/mirah/mirah-parser/issues/14
3
93
 
94
+ === 0.1.3 Metacircularity: Achieved / 2014-08-08
95
+
96
+ 0a17b30 doh, java 7 parser
97
+ 607f9ae update to fixed parser
98
+ 4f78f2b reverting mirah-parser while trying to fix things
99
+ 394fd95 add history for 0.1.3
4
100
  5b1454c bump parser w/ java 7 jar
5
101
  8c0be9d de-SNAPSHOT/dev ify versions
6
102
  0bb1553 update parser
data/README.md CHANGED
@@ -33,8 +33,7 @@ SYNOPSIS
33
33
  REQUIREMENTS
34
34
  -----------------
35
35
 
36
- * JRuby 1.6.0 or higher.
37
- * BiteScript 0.0.8 or higher
36
+ * Java 1.7 or higher.
38
37
 
39
38
  INSTALL
40
39
  -----------------
@@ -56,7 +55,7 @@ Extract it, and add `bin` to your `$PATH` to be able to use `mirah`, `mirahc`, e
56
55
  SOURCE
57
56
  -----------------
58
57
 
59
- To build and install from source, you'll need jruby 1.7.0 or
58
+ To build and install from source, you'll need jruby 1.7.12 or
60
59
  higher. Then just follow these commands.
61
60
 
62
61
  $ git clone http://github.com/mirah/mirah.git
data/Rakefile CHANGED
@@ -41,7 +41,7 @@ end
41
41
  task :default => :new_ci
42
42
 
43
43
  desc "run new backend ci"
44
- task :new_ci => [:'test:core', :'test:jvm', :'test:artifacts']
44
+ task :new_ci => [:'test:core', :'test:jvm', :'test:artifacts', 'dist/mirahc3.jar']
45
45
 
46
46
  def run_tests tests
47
47
  results = tests.map do |name|
@@ -91,7 +91,7 @@ namespace :test do
91
91
  task :jvm => 'test:jvm:all'
92
92
 
93
93
  namespace :jvm do
94
- task :test_setup => [:clean_tmp_test_directory, :build_test_fixtures]
94
+ task :test_setup => [:clean_tmp_test_classes, :build_test_fixtures]
95
95
 
96
96
  desc "run jvm tests using the new self hosted backend"
97
97
  task :all do
@@ -112,14 +112,17 @@ namespace :test do
112
112
  end
113
113
  end
114
114
 
115
- task :clean_tmp_test_directory do
116
- FileUtils.rm_rf "tmp_test"
117
- FileUtils.mkdir_p "tmp_test"
115
+ task :clean_tmp_test_classes do
116
+ FileUtils.rm_rf "tmp_test/test_classes"
118
117
  FileUtils.mkdir_p "tmp_test/test_classes"
119
- FileUtils.mkdir_p "tmp_test/fixtures"
120
118
  end
121
119
 
122
- task :build_test_fixtures do
120
+
121
+
122
+ task :build_test_fixtures => 'tmp_test/fixtures/fixtures_built.txt'
123
+ directory 'tmp_test/fixtures'
124
+ file 'tmp_test/fixtures/fixtures_built.txt' => ['tmp_test/fixtures'] + Dir['test/fixtures/**/*.java'] do
125
+ `touch tmp_test/fixtures/fixtures_built.txt`
123
126
  ant.javac 'destdir' => "tmp_test/fixtures",
124
127
  'srcdir' => 'test/fixtures',
125
128
  'includeantruntime' => false,
@@ -138,6 +141,7 @@ task :clean do
138
141
  ant.delete 'quiet' => true, 'dir' => 'dist'
139
142
  rm_f 'dist/mirahc.jar'
140
143
  rm_rf 'tmp'
144
+ rm_rf 'tmp_test'
141
145
  end
142
146
 
143
147
  desc "clean downloaded dependencies"
@@ -203,7 +207,8 @@ task :dist => [:gem, :zip]
203
207
  file_create 'javalib/asm-5.jar' do
204
208
  require 'open-uri'
205
209
  puts "Downloading asm-5.jar"
206
- open('http://central.maven.org/maven2/org/ow2/asm/asm-all/5.0.3/asm-all-5.0.3.jar', 'rb') do |src|
210
+ url = 'https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-all/5.0.3/asm-all-5.0.3.jar'
211
+ open(url, 'rb') do |src|
207
212
  open('javalib/asm-5.jar', 'wb') do |dest|
208
213
  dest.write(src.read)
209
214
  end
@@ -212,9 +217,7 @@ end
212
217
 
213
218
  file_create 'javalib/mirahc-prev.jar' do
214
219
  require 'open-uri'
215
- # get latest snapshot from XML description.
216
- xml = open('https://oss.sonatype.org/service/local/repositories/snapshots/content/org/mirah/mirah/0.1.3-SNAPSHOT/').read
217
- url = xml.scan(%r{<resourceURI>(https:.*\.jar)</resourceURI>}).map(&:first).sort.last
220
+ url = 'https://search.maven.org/remotecontent?filepath=org/mirah/mirah/0.1.3/mirah-0.1.3.jar'
218
221
 
219
222
  puts "Downloading mirahc-prev.jar from #{url}"
220
223
 
@@ -227,18 +230,108 @@ end
227
230
 
228
231
 
229
232
  def bootstrap_mirah_from(old_jar, new_jar)
233
+
234
+ #typer_srcs = Dir['src/org/mirah/typer/**/*.mirah'].sort
235
+ #typer_classes = typer_srcs.map {|s| s.sub 'src', build_dir }
236
+ if false
237
+ name = new_jar.sub /[.\/]/, '_'
238
+
239
+
240
+ java_build_dir = "build/#{name}-java"
241
+ java_jar = "#{java_build_dir}.jar"
242
+ file java_jar => Dir["src/**/*.java"].sort do
243
+ rm_rf java_build_dir
244
+ mkdir_p java_build_dir
245
+
246
+ # Compile Java sources
247
+ ant.javac 'source' => '1.6',
248
+ 'target' => '1.6',
249
+ 'destdir' => java_build_dir,
250
+ 'srcdir' => 'src',
251
+ 'includeantruntime' => false,
252
+ 'debug' => true,
253
+ 'listfiles' => true
254
+ ant.jar 'jarfile' => java_jar do
255
+ fileset 'dir' => java_build_dir
256
+ end
257
+ end
258
+
259
+ bootstrap_build_dir = "build/#{name}-bootstrap"
260
+ bootstrap_jar = "#{bootstrap_build_dir}.jar"
261
+ bootstrap_srcs = Dir['src/org/mirah/{builtins,jvm/types,macros,util,}/*.mirah'].sort
262
+ file bootstrap_jar => bootstrap_srcs do
263
+ build_mirah_stuff old_jar, bootstrap_build_dir, bootstrap_srcs
264
+ ant.jar 'jarfile' => bootstrap_jar do
265
+ fileset 'dir' => bootstrap_build_dir
266
+ end
267
+ end
268
+
269
+ typer_build_dir = "build/#{name}-typer"
270
+ typer_jar = "#{typer_build_dir}.jar"
271
+ file typer_jar => Dir['src/org/mirah/typer/**/*.mirah'].sort do
272
+ build_mirah_stuff old_jar, typer_build_dir, typer_srcs
273
+ ant.jar 'jarfile' => typer_jar do
274
+ fileset 'dir' => typer_build_dir
275
+ end
276
+ end
277
+
278
+ compiler_build_dir = "build/#{name}-compiler"
279
+ compiler_jar = "#{compiler_build_dir}.jar"
280
+ file compiler_jar => Dir['src/org/mirah/jvm/{compiler,mirrors,model}/**/*.mirah'].sort do
281
+ build_mirah_stuff old_jar, compiler_build_dir, compiler_srcs
282
+ ant.jar 'jarfile' => compiler_jar do
283
+ fileset 'dir' => compiler_build_dir
284
+ end
285
+ end
286
+
287
+ tool_build_dir = "build/#{name}-tool"
288
+ tool_jar = "#{tool_build_dir}.jar"
289
+ file tool_jar => Dir['src/org/mirah/tool/**/*.mirah'].sort do
290
+ build_mirah_stuff old_jar, tool_build_dir, tool_srcs
291
+ ant.jar 'jarfile' => tool_jar do
292
+ fileset 'dir' => tool_build_dir
293
+ end
294
+ end
295
+
296
+ ant_build_dir = "build/#{name}-ant"
297
+ ant_jar = "#{ant_build_dir}.jar"
298
+ file ant_jar => Dir['src/org/mirah/ant/**/*.mirah'].sort do
299
+ build_mirah_stuff old_jar, ant_build_dir, ant_srcs
300
+ ant.jar 'jarfile' => ant_jar do
301
+ fileset 'dir' => ant_build_dir
302
+ end
303
+ end
304
+ jars = [java_jar, bootstrap_jar, typer_jar, compiler_jar, tool_jar, ant_jar]
305
+ file new_jar => jars +
306
+ [old_jar, 'javalib/asm-5.jar', 'javalib/mirah-parser.jar'] do
307
+ ant.jar 'jarfile' => new_jar do
308
+ jars.each {|j| zipfileset 'src' => j }
309
+ zipfileset 'src' => 'javalib/asm-5.jar', 'includes' => 'org/objectweb/**/*'
310
+ zipfileset 'src' => 'javalib/mirah-parser.jar'
311
+ metainf 'dir' => File.dirname(__FILE__), 'includes' => 'LICENSE,COPYING,NOTICE'
312
+ manifest do
313
+ attribute 'name' => 'Main-Class', 'value' => 'org.mirah.MirahCommand'
314
+ end
315
+ end
316
+
317
+ end
318
+
319
+ else # original
320
+
321
+
230
322
  mirah_srcs = Dir['src/org/mirah/{builtins,jvm/types,macros,util,}/*.mirah'].sort +
231
323
  Dir['src/org/mirah/typer/**/*.mirah'].sort +
232
324
  Dir['src/org/mirah/jvm/{compiler,mirrors,model}/**/*.mirah'].sort +
233
325
  Dir['src/org/mirah/tool/*.mirah'].sort
234
- file new_jar => mirah_srcs + [old_jar, 'javalib/asm-5.jar', 'javalib/mirah-parser.jar'] do
326
+
327
+ file new_jar => mirah_srcs + ['src/org/mirah/ant/compile.mirah'] + [old_jar, 'javalib/asm-5.jar', 'javalib/mirah-parser.jar'] do
235
328
  build_dir = 'build/bootstrap'
236
329
  rm_rf build_dir
237
330
  mkdir_p build_dir
238
331
 
239
332
  # Compile Java sources
240
- ant.javac 'source' => '1.5',
241
- 'target' => '1.5',
333
+ ant.javac 'source' => '1.6',
334
+ 'target' => '1.6',
242
335
  'destdir' => build_dir,
243
336
  'srcdir' => 'src',
244
337
  'includeantruntime' => false,
@@ -250,14 +343,29 @@ def bootstrap_mirah_from(old_jar, new_jar)
250
343
  if build_version.to_f > 1.7
251
344
  build_version = '1.7'
252
345
  end
346
+
347
+ default_class_path = ["javalib/mirah-parser.jar", build_dir,"javalib/asm-5.jar"].join(File::PATH_SEPARATOR)
348
+
253
349
  # Compile Mirah sources
254
350
  runjava('-Xmx512m',
255
351
  old_jar,
256
352
  '-d', build_dir,
257
- '-classpath', "javalib/mirah-parser.jar:#{build_dir}:javalib/asm-5.jar",
353
+ '-classpath', default_class_path,
258
354
  '--jvm', build_version,
355
+
356
+ #'--verbose',
357
+
259
358
  *mirah_srcs)
260
359
 
360
+ # compile ant stuff
361
+ ant_classpath = $CLASSPATH.grep(/ant/).map{|x| x.sub(/^file:/,'')}.join(File::PATH_SEPARATOR)
362
+ runjava '-Xmx512m',
363
+ old_jar,
364
+ '-d', build_dir,
365
+ '-classpath', [default_class_path, ant_classpath].join(File::PATH_SEPARATOR),
366
+ '--jvm', build_version,
367
+ 'src/org/mirah/ant'
368
+
261
369
  # Build the jar
262
370
  ant.jar 'jarfile' => new_jar do
263
371
  fileset 'dir' => build_dir
@@ -269,6 +377,55 @@ def bootstrap_mirah_from(old_jar, new_jar)
269
377
  end
270
378
  end
271
379
  end
380
+ end # feature flag
381
+ end
382
+
383
+ def build_mirah_stuff old_jar, build_dir, mirah_srcs
384
+
385
+ rm_rf build_dir
386
+ mkdir_p build_dir
387
+
388
+
389
+ # mirahc needs to be 1.7 or lower
390
+ build_version = java.lang.System.getProperty('java.specification.version')
391
+ if build_version.to_f > 1.7
392
+ build_version = '1.7'
393
+ end
394
+
395
+ default_class_path = ["javalib/mirah-parser.jar", build_dir,"javalib/asm-5.jar"].join(File::PATH_SEPARATOR)
396
+
397
+ # Compile Mirah sources
398
+ runjava('-Xmx512m',
399
+ old_jar,
400
+ '-d', build_dir,
401
+ '-classpath', default_class_path,
402
+ '--jvm', build_version,
403
+ *mirah_srcs)
404
+
405
+
406
+
407
+ # compile ant stuff
408
+ # ant_classpath = $CLASSPATH.grep(/ant/).map{|x| x.sub(/^file:/,'')}.join(File::PATH_SEPARATOR)
409
+ # runjava '-Xmx512m',
410
+ # old_jar,
411
+ # '-d', build_dir,
412
+ # '-classpath', [default_class_path, ant_classpath].join(File::PATH_SEPARATOR),
413
+ # '--jvm', build_version,
414
+ # 'src/org/mirah/ant'
415
+
416
+ # Build the jar
417
+ ant.jar 'jarfile' => new_jar do
418
+ fileset 'dir' => build_dir
419
+ zipfileset 'src' => 'javalib/asm-5.jar', 'includes' => 'org/objectweb/**/*'
420
+ zipfileset 'src' => 'javalib/mirah-parser.jar'
421
+ metainf 'dir' => File.dirname(__FILE__), 'includes' => 'LICENSE,COPYING,NOTICE'
422
+ manifest do
423
+ attribute 'name' => 'Main-Class', 'value' => 'org.mirah.MirahCommand'
424
+ end
425
+ end
426
+
427
+
428
+
272
429
  end
273
430
 
274
431
  bootstrap_mirah_from('javalib/mirahc-prev.jar', 'dist/mirahc.jar')
data/TODO.md CHANGED
@@ -1,60 +1,207 @@
1
1
 
2
- 0.1.3 checklist
3
- =============
4
2
 
5
- - check jar CLI
6
- org.mirah:mirah doesn't work w/o JRuby currently
7
- org.mirah:mirah-complete jar is also broken in 0.1.2, 0.1.1
8
- :/
9
- otoh, probably no one is using them since they don't work
3
+ The TODO list of DOOM
4
+ =======================
5
+ 100 char or less per feature, points included
6
+ syntax
10
7
 
11
- - check jruby gem
12
- 0.1.2 is the broken :(
8
+ - (points) description
13
9
 
14
- - done: silence run compiler logging
15
- - done: make sure in run mode we don't drop things on the filesystem
16
- - silence logging by default in RunCommand, w/ options overriding it.
10
+ points logrithmicy difficulty 0-3
11
+ - 0 know what to do, how to do it, and it's trivial < 15 min
12
+ - 1 know what to do, how to do it, but not trivial < 1/2 day, > 1 hour
13
+ - 2 know what to do, but not how to do it, < 1 day, > 1/2 day
14
+ - 3 don't know exactly what to do, or how to do it, est is undefined
17
15
 
18
16
 
19
- - Java 8
20
- -- make asm new d/l dependency
21
- -- find usages of org.jruby...asm & change them
22
- -- rm jruby-complete asa d/l dep
23
- -- add asm license file to dist bundle
17
+ Dist
18
+ ===========
19
+ - mirah-parser maven artifact https://github.com/mirah/mirah-parser/issues/16
20
+ - Java 8 ...
21
+ - look at java 9 features we could use
22
+ - update mvn compiler plugin
23
+ - add regression test for ant task example!
24
+ - rm implicit ant dependency... break out ant support as separate maven artifact
25
+ - mvn artifacts:
26
+ -- mirah-core
27
+ -- mirah-parser
28
+ -- mirah-ant
29
+ -- mirah
30
+
24
31
 
25
- - mirah-parser CI (ish)
32
+ Compiler Internals Improvements
33
+ ======================
34
+ - make Mirror type systems addDefaultImports more obvious
35
+ - faster mirah compiler build: src => class is tricky, I could make src => jar, jar => jar tho
36
+ - switch to minitest
37
+ - tests for imports at different scopes
38
+ - shade asm lib for dev happiness
39
+ - keep version in fewer places whew. Current is
40
+ version.rb
41
+ various pom.xmls
42
+ some random mirah file in src
26
43
  - automated tests for distribution artifacts
27
- - CI passing
44
+ - verify bytecode version of compiler
45
+ should have dist jar check that does this as part of acceptance suite
28
46
 
47
+ - silence logging from JRuby interfaces, unless overridden.
29
48
 
30
- ------------------
49
+ - get rid of all outputs that escape from tests
50
+ - move build artifacts to javalib for gem so that we don't depend on dist directory
51
+ - clean up javalib dir
52
+ - don't use 1.5 as java compile target
53
+ - make it obvious when ASTs have been dropped during macro expansion
31
54
 
55
+ - break compiler into phases
56
+ ---------------
57
+ # parse
58
+ # typer prep
32
59
 
60
+ - sort files by import graph (could cache this)
61
+ - load macros
62
+ - load type systems
63
+ - load types for System, & predefs maybe?
64
+ - load scoped macros / extensions
65
+ # typer
66
+ - visit script body / class bodies, skipping method bodies
67
+ - compile macros
68
+ - visit method bodies
69
+ # finishs resolving typer wip
70
+ - resolve proxies
71
+ - change captured locals into binding fields
72
+ # clean up / compiler prep
73
+ - clean ast up
74
+ # compile
33
75
 
76
+ - maybe after parse, check built files to see if they need to be rebuilt, and ignore them otherwise
77
+ - investigate using Java 8 Lambda impl hooks for closures.
34
78
 
79
+ Warnings / Logging
80
+ ============
81
+ - fix import not found so that it says can't find com.blah for import com.blah, or at least both package scoped & absolute packages. mirah#267
82
+ - warn about unused imports mirah#268
83
+ - initial not found should not be error in fine logging mirah#269
84
+ - log bindings as they are created
85
+ - don't warn on self.initialize mirah#270
86
+ - can't find method error could list nearly matching methods mirah#271
87
+ - error on not all methods implemented for interfaces mirah#272
35
88
 
36
- - Check mvn compile plugin
37
- - move build artifacts to javalib for gem
89
+ - improve duplicate name/sig error when multiple method defs w/ same sig mirah#273
90
+ - code sources from macro expansion should know both the macro location and the invoke location and report both on errors so that users know where to look to debug
38
91
 
39
- - verify bytecode version of compiler
40
- - silence logging from JRuby interfaces, unless overridden.
92
+ Parser
93
+ ======
94
+ - variables w/ name package are not allowed :/ mirah-parser#18
95
+ - case expressions mirah-parser#17
96
+ - lambda literals mirah-parser#19
41
97
 
42
- Misc
43
- ===========
44
- - mirah-parser maven artifact
98
+ Features
99
+ ==========
100
+ - Reflection Macros
101
+ - AST formatter that converts back to something the parser can parse
102
+ - default toString?
103
+ - default hashCode / equals
104
+ - change == to use equals
105
+ - default val/no type that defers to indy
106
+
107
+ eg
108
+ def foo(x: int, y=1)
109
+ end
110
+ should work
111
+
112
+ - attr_reader/et al as varargs instead of just Hash. It would mean that the type info would have to come from somewhere else
113
+ - goto: headius wants it
114
+ - synchronize intrinsic ala java's
115
+ - file scoped macros / extensions
116
+ - extension syntax
117
+ - move macro / mirahc anno to separate class dir to improve javac interop
118
+ - public / private / protected / package scope helpers
119
+ - subclass access to super protected fields w/ @syntax
120
+ - (0) add a gets function like Ruby
121
+ - (2) a more "batteries included" set of imports
122
+ - (3) generics generics generics
123
+ - (???) ARGV
124
+ - (???) field access from closures, synthesize synthetic accessors
125
+ - (???) self in closures should be lexical self
126
+ - covariant interface impl overrides
127
+ - macro helpers for inserting things into initializers
128
+ - macro helpers for add method if not already there
129
+ - reverse macro on collections
130
+ - inner classes don't get nested names
131
+ class A
132
+ class B
133
+ end
134
+ end
135
+ # => pkg.A, pkg.B
136
+ - understand Java 8 default methods
137
+ - default args on non-last position params. eg when a method takes a block(read: functional interface), it should be allowed to have default args before the block arg.
138
+ - do jruby style method lookup
139
+
140
+ Bugs
141
+ ==========
45
142
 
46
- - java 9
143
+ - "foo: #{x || y} acts weird", my guess is that interpolation doesn't generate the right code sometimes
144
+ - lambda's can't exist in methods! !! by which I mean that they can't close over things in methods. You can have them there, they just don't close. >:[]
145
+ - parser can't deal w/ unquotes in hash literals when key is unquote
146
+ quote { puts `key`: 1 }
47
147
  - implicit void methods w/ explicit return generate incorrect bytecode. Let's see if that's true of explicit. nope.
48
- - get rid of all outputs that escape from tests
49
- - default toString?
148
+ - import * doesn't always work correctly
149
+ - Inner class issues. Two inner classes w/ the same name will confuse the type system
150
+ class A
151
+ class B
152
+ def b
153
+ @b = 1
154
+ end
155
+ end
156
+ end
157
+ class C
158
+ class B
159
+ def b
160
+ @b = 1
161
+ end
162
+ end
163
+ end
164
+
165
+ - if with no else has type of the bool expression not type of the body. It should return nil w/ the body type, or just be an error
166
+ This might be just a error reporting issue
167
+ ERROR: Invalid return type org.mirah.typer.Scope, expected org.mirah.typer.ResolvedType
168
+ if parent
169
+ ^^^^^^^^^
170
+
171
+
172
+ Libraries
173
+ ===============
174
+ - delegation macro library
175
+ - (???) testing framework
176
+ - (???) fix up shatner
177
+ - (???) fix dubious
178
+
179
+
180
+ Compiled Code Usability
181
+ =======================
182
+ - name extension / macro classes after method name
183
+ - break annotations / macro build path to make javac happier
184
+ currently macros are compiled to same tree as runtime code. We should make it so you can compile them to a different dir. Additionally, the annotations used for macros are unfriendly to javac, so we should put them in the macro dir
50
185
 
51
186
  etc
52
187
  =========
53
188
 
54
- - Reflection Macros
55
- - AST formatter that converts back to something the parser can parse
189
+ - overriding interface req type atm :( apparently. -- nope wrong method name
190
+ interface Bar
191
+ def bar(i: int):void;end
192
+ end
193
+ class Foo; implements Bar
194
+ def bar(i) puts i; end
195
+ end
196
+
197
+ - ArrayList.new(list) should do generic inference, perhaps, so T of list -> T of the resulting object
198
+
199
+ - when dealing in generics, error messages should highlight generic types somehow
200
+
201
+
202
+ blocks don't introduce new scopes when they are part of a macro currently :/
203
+
56
204
 
57
- - switch to minitest
58
205
 
59
206
  from notes, uncategorized
60
207
  ============================
@@ -74,27 +221,124 @@ puts e # e is LUB(X, Y)
74
221
  list o example code + what the compiler says when you give it to the compiler
75
222
  things like errors, & behavior
76
223
 
77
- feature requests
78
- ----------------
79
- - goto: headius wants it
80
- - synchronize intrinsic ala java's
81
- - file scoped macros
82
- - move macro / mirahc anno to separate class dir to improve javac interop
83
224
 
84
- parser
85
- -------
225
+ fix maven plugins
86
226
 
87
- foo {|a| !a || ''.equals(a) }
88
- doesn't parse
89
227
 
90
- does now :)
91
228
 
92
229
 
93
- blocks don't introduce new scopes when they are part of a macro currently :/
230
+ what I want is to be able to say
231
+ this might be a field access,
232
+ if a field w/ that name exists on the class, then use it
233
+ if it's a constant that's in scope that's not on the current class target, use it
234
+
235
+ def a
236
+ CONST
237
+ end
238
+
239
+ CONST=1
240
+
241
+
242
+
243
+ fixing closures
244
+
245
+ add block scope
246
+ block scope
247
+ "self" is captured self
248
+ if in closure self may also be closure type, for method lookup.
249
+ I think this means that the proxy node for calls might need another elem
250
+
251
+ what's happening is
252
+ hit 1st block
253
+ look for parent binding, none
254
+ create binding for 'm' scope
255
+ resolve block type, build closure
256
+ hit 2nd block
257
+ look for parent binding, walks up to 'm'
258
+ but in m's scope y is not captured, so not added to binding
259
+
260
+
261
+ def m # b = Binding1.new()
262
+ r do # Closure1.new b; b2 = Binding2.new
263
+ y = 1 # b2.y = 1
264
+ r do # Closure2.new b2
265
+ y += 4 # b2.y += 4
266
+ end
267
+ puts y
268
+ end
269
+ end
270
+
271
+ update binding/closure generation
272
+
273
+ one top level binding, 2 closures
274
+ def m # b = Binding1.new()
275
+ x = 1 # b.x = 1
276
+ r do # Closure1.new b
277
+ x += 1 # b.x += 1
278
+ r do # Closure2.new b
279
+ x += 4 # b.x += 4
280
+ end
281
+ end
282
+ puts x # puts b.x
283
+ end
284
+
285
+ one tl binding, one closure binding
286
+ def m # b = Binding1.new()
287
+ x = 1 # b.x = 1
288
+ r do # Closure1.new b; b2 = Binding2.new
289
+ y = 1 # b2.y = 1
290
+ r do # Closure2.new b2
291
+ y += 4 # b2.y += 4
292
+ end
293
+ x += y # b.x += b2.y
294
+ end
295
+ puts x # puts b.x
296
+ end
297
+
298
+ binding shared across closures
299
+ either pull binding construction above 1st ref, or
300
+ copy binding back after.
301
+ Not sure if I like that
302
+ it's probably better to pull binding up, because you don't know when things are run
303
+ def m
304
+ x = 1
305
+ r { x += 1 }
306
+ r { x += 2 }
307
+ puts x
308
+ end
309
+
310
+
311
+ def m
312
+ x = 1
313
+ l { x += 1 }
314
+ l { x += 2 }
315
+ puts x # => 1
316
+ run_ls
317
+ puts x # => 4
318
+ end
319
+
320
+
321
+ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
322
+
323
+ SimpleNodeVisitor sucks. It doesn't seem to work unless you define all the things to visit :(
324
+
325
+ sometimes implicit nil in return screws everything up, and you get a stack error from the jvm
326
+
327
+
328
+ Hash (things w/ init_list) needs a position, or they blow up w/ NPE somewhere
329
+
330
+
331
+ can't have block args w/ name interface
332
+
333
+
334
+ wierd error for VV
335
+ def foo: int
336
+ if a < b
337
+ end
338
+ end
339
+
94
340
 
95
341
 
96
- Release management
97
- ------------------
98
342
 
99
- keep version in fewer places
100
- whew
343
+ compile rake task doesn't fail, if it doesn't work for some things, it goes on anyway
344
+ in generics. hmm