-
Notifications
You must be signed in to change notification settings - Fork 32
CompileOnEval
On SparcNativeLarceny and [wiki:IAssassinLarceny], every single expression you type at the ReadEvalPrintLoop is first compiled to machine code, and then the system jumps into the generated code. Code that you load
is similarly compiled. Pretty cool, eh?
This is controlled by the evaluator
parameter; the boot strap system starts with evaluator
set to the interpret
procedure, but source:trunk/larceny_src/Build/sparc-larceny-heap.sch (or source:trunk/larceny_src/Build/iasn-larceny-heap.sch) does the sleight-of-hand necessary to replace the evaluator
with a compiling evaluator, as well as sealing off the global variables of the compiler itself from the user code, to keep them from inadvertantly replacing the objects that the compiler relies on with new ones that don't satisfy the compiler's invariants.
By default, Common Larceny does not CompileOnEval or CompileOnLoad.
If Common Larceny is invoked with Larceny.fasl
as a command-line argument, however,
then Common Larceny will CompileOnLoad but will not CompileOnEval. That could change, however.