CPSCM improvements
Alessandro Colomba (of SISCweb fame) played with CPSCM and noted that he had trouble compiling the SRFI-1 reference implementation (you need a self-contained SRFI-1 to check). After investigating the problem, I found out that the culprit was the η-reduction code in simplify-sexp, which wasn’t designed carefully and exhibited exponential behavior on certain inputs (in practice, I’ve only seen that happen on CPS-ed code). After refactoring simplify-sexp, SRFI-1 compiles in just a few seconds.
The fixes are up in SVN (I’ve tagged the current version as rel-0.9.2). Other improvements:
- Most of the code can be compiled under Chicken, with remarkable speed gains. Just type make in the scm directory. csi (which is still needed for the REPL) uses the compiled libraries automatically.
- By popular demand I have added a
file->lispprocedure for compiling a Scheme source file. - Programs are no longer wrapped in a giant
letrec, but generate a sequence of top-level definitions and evaluation calls. This means you can compile libraries (such as SRFI-1 above) to separate files, and then load those compiled files independently in the back-end.
