The development system contains the Twobit compiler and the selected target assembler (currently only a SPARC assembler is operational). A Scheme-based "make" utility is also available.
For the novice, the most important command in the development environment is
(help)which is a simple, interactive help system for the developer.
(make-sparc-heap)recompiles any changed files in the Lib, Repl, and Eval subdirectories, and rebuilds "sparc.heap" from the resulting object files. You need to rebuild the heap every time you change any files in these subdirectories, since loading them into the interactive system will not have any effect on their use in the procedures compiled into the heap.
(compiler-switches)lists all the compiler switches. See the online help for more information about how to set and reset switches.
(compiler-switches flag)sets groups of compiler switches according to the value of the symbol flag. The flags are slow, standard, fast-safe, fast-unsafe, and factory-settings. See the online help for more information about the flags and their effects.
If you are willing to compromise safety a little, you should turn off catch-undefined-globals. Normally, compiled code checks every global access to see whether the value fetched was the special value #!undefined, triggering an error if it was. This check adds a test to every read from a global variable.
If you use (compiler-switches 'fast-unsafe), most type checking
in the compiled code will then be disabled. Type checking will still be
performed by library procedures, however. The truly needy may feel free
to recompile the heap image with safety turned off. Be warned that
Larceny does not currently catch SIGSEGV or SIGBUS, so any wrong step on
your part will likely crash the system.
6. The "make" facility
UTSL (specifically, Util/make.sch).
7. Developing under Chez Scheme
A facility is available in the Chez Scheme based development
environment that makes starting the environment much faster. When in
the development environment, the command
will compile most of the Scheme files used by the development environment
into Chez Scheme object modules (.so type) in their respective
The next time you enter the development environment, the object files will
be loaded in preference of the Scheme files. However, if a Scheme file
has been modified since its object file was created, the Scheme file is loaded
8. Developing under Larceny
If you're using the installed Larceny for development, you can cut down
the time it takes to load the compiler by precompiling the development
environment to .fasl files. When in the
development environment, execute
to compile all the pertinent files. Then run build to
run Larceny with the compiled development environment. As for the Chez
Scheme environment, if a Scheme file is modified after it has been
compiled, the source file will be loaded rather than the compiled file.
Here's how I do it.
$Id: developing.html,v 1.6 1999/11/02 16:38:38 lth Exp $