Reorganize the Scheme loader to simplify it so that I can understand
authorChris Hanson <org/chris-hanson/cph>
Wed, 6 Jun 2007 19:42:43 +0000 (19:42 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 6 Jun 2007 19:42:43 +0000 (19:42 +0000)
commitcc397d6ffdf6a4ebac3a3669c40e0ffeb59e8306
treec527617ba78e9b92a8fd44763b10e8baced9a99c
parent3ec0740b1ba312d4b2a5e7dc34d50fd69813bcf7
Reorganize the Scheme loader to simplify it so that I can understand
what it's doing.  In the process, the LOAD-NOISILY and LOAD-NEWEST
_features_ have been eliminated, although the procedures remain as
aliases for LOAD.

New procedures FILE-LOADABLE? and FILE-FASLOADABLE? test whether a
particular file is one that LOAD or FASLOAD (respectively) knows how
to handle.  New procedures SYSTEM-URI, SYSTEM-LIBRARY-URI, and
WITH-LOADER-BASE-URI provide a standard mechanism to refer to files in
the system library directory.

Eliminate DECLARE-SHARED-LIBRARY; register every .so file that's
loaded, and reload it on disk-restore.

Change the dynamic-loader interface to support unloading object files.
Make sure that all loaded object files are unloaded on DISK-RESTORE.
Implement low-level interface to the dynamic loader in
"runtime/io.scm" and use that in "runtime/load.scm".  Implement new
primitive LIARC-COMPILED-BLOCKS, to simplify examination of the
compiled_blocks table.

Change registration of .so files to use URIs rather than ad-hoc
abbreviations.  Standard URIs refer to parts of the system, and are
independent of the file-system details; file URIs refer to .so files
stored in particular locations.

Add an 8-byte random nonce to each .c file generated by liarc, so that
the loader can tell if it's the same file as a previously loaded one.
Write new program gen-nonce for use by c-bundle.sh.

Move makefile creation from Setup.sh to configure, so that it can
depend on the architecture.

Rewrite parts of "Makefile.in" and "etc/compile.scm" to support
compiling a native-code system using liarc.  Change
"etc/utilities.scm" to support liarc when it is installed as well as
when it is being built.

Write new program extract-liarc-decls for c-bundle.sh to use, in place
of of grep.  This program rewrites each declaration to specialize it
for bundling.
48 files changed:
v7/src/Makefile.in
v7/src/Setup.sh
v7/src/compiler/choose-machine.sh [new file with mode: 0755]
v7/src/compiler/configure
v7/src/compiler/machines/C/compiler.pkg
v7/src/compiler/machines/C/cout.scm
v7/src/compiler/machines/C/ctop.scm
v7/src/compiler/machines/C/make.scm
v7/src/configure.ac
v7/src/cref/make.scm
v7/src/edwin/make.scm
v7/src/etc/build-bands.sh
v7/src/etc/build-boot-compiler.sh [moved from v7/src/etc/c-boot-compiler-2.sh with 73% similarity]
v7/src/etc/c-bundle.sh
v7/src/etc/c-prepare.sh
v7/src/etc/compile-boot-compiler.sh [moved from v7/src/etc/c-boot-compiler.sh with 67% similarity]
v7/src/etc/compile.scm
v7/src/etc/create-makefiles.sh [new file with mode: 0755]
v7/src/etc/native-prepare.sh [new file with mode: 0755]
v7/src/etc/optiondb.scm
v7/src/etc/std-makefile-prefix
v7/src/etc/utilities.scm
v7/src/imail/load.scm
v7/src/microcode/cmpauxmd/c.c
v7/src/microcode/cmpintmd/c.h
v7/src/microcode/comutl.c
v7/src/microcode/configure.ac
v7/src/microcode/extract-liarc-decls.c [new file with mode: 0644]
v7/src/microcode/fasload.c
v7/src/microcode/liarc.h
v7/src/microcode/makegen/Makefile.in.in
v7/src/microcode/makegen/liarc-base-rules
v7/src/microcode/pruxdld.c
v7/src/runtime/input.scm
v7/src/runtime/io.scm
v7/src/runtime/load.scm
v7/src/runtime/make.scm
v7/src/runtime/option.scm
v7/src/runtime/packag.scm
v7/src/runtime/pathnm.scm
v7/src/runtime/runtime.pkg
v7/src/runtime/utabs.scm
v7/src/sf/make.scm
v7/src/sos/load.scm
v7/src/ssp/load.scm
v7/src/star-parser/load.scm
v7/src/xdoc/load.scm
v7/src/xml/load.scm