A few months ago I did a one for one translation of the current compiler into ASM and found that this was a straightforward (if a bit tedious) task. This translated compiler lives in the svn branch asm_compiler. The asm_compiler branch's build.xml uses jarjar to bundle the asm libraries together into a jython-complete.jar. I called it jython-complete mirroring the jruby project's jruby-complete.jar vs a jruby.jar that requires dependencies. I think Jython will eventually follow suit with one jar that bundles everything together and another that does not. asm_compiler currently passes all but four of the regression tests that trunk passes on my machine.
Since I did not try to go beyond the current functionality of 2.3, this is just a proof of concept step. The next steps will be to start re-writing the "newcompiler" work in Java. The newcompiler work which sits in the svn trunk and sandbox prototypes an improved compiler that implements 2.5. newcompiler is the impressive outcome of a Google Summer of Code project by Tobias Ivarsson mentored by Jim Baker. Having said that I'd still like to see if I can make asm_compiler the compiler of Jython's trunk -- it may work better to incrementally move to newcompiler compared to trying to replace the current strategy all at once.
View comments