Skip to content
Felix S. Klock II edited this page Jul 28, 2013 · 1 revision

(See PetitLarceny also.)

This is a build of Larceny that produces C code.
It then relies on a C compiler to turn the C code into machine code for the target architecture.

This strategy gives Larceny less room for performing optimizations than NativeLarceny (since it has to target portable C which is inherently unable to directly express certain kinds of computational tricks that you can do in assembly code).

The advantage of this strategy is that you can run PetitLarceny on any architecture that has a C compiler. Which effectively means that you can run PetitLarceny on any architecture.

((Also, one might argue that targetting C is good since it means that we don't have to reimplement all the optimizations that have already been done in your typical C compiler like gcc. However, C is not a ideal target language for a number of reasons e.g. it does not support proper tail recursion except as a compiler optimization, which means you're at the mercy of the compiler to realize that it could apply the optimization.))

Clone this wiki locally