And today, I committed revision 100. Some revisions are only 1 or 2 line bug fixes, others are dozens of added lines.
Major achievements since I last posted are:
- exporting of meta data in the form of java annotations (for the Prelude with its many classes, types and instances some 8000 lines of annotations are written, which causes the compiler to spend 1 or 2 CPU seconds in the pretty printer alone)
- import of the java compiled meta data from class files. This takes only a few milliseconds.
- Type checker infers and validates class constraints more or less correct.
Incidentally, with revision 100 the compiler can parse and type check its own grammar, which is currently 35798 lines or 225832 tokens. This takes 90 seconds, which is quite long compared to 80 seconds with the old compiler especially when one takes into account that we have no strictness checking and code generation yet.
Apparently, the unoptimized monadic style has its costs. No wonder, as it is essentially a series of tail calls, which are currently implemented with two runtime functions tcLoop and tcGoto that throw and catch TailCallExceptions. It looks like the JIT can't do a very good job in the presence of exceptions.
Hopefully, the new code and runtime will be better suited for tail call intensive code.