Michael Sperber [Mr. Preprocessor] writes:
Robert> I thought Kyle's plan was to write out a C
_representation_ of the
Robert> parsed lisp, not to actually compile the lisp code to C? (I may be
Robert> misremembering here).
This also has serious drawbacks, namely that you'd have to create a
giant data structure initializer. Most current C compilers seem to
have at least quadratic run-time in the size of initializers, which
will force you to chop up the heap data structure into a gazillion
separate objects. Richard Kelsey and Brian Carlstrom did that once
for Scheme 48. It works, but creating and compiling an image takes
forever.
I've implemented this before and you're right, I did have to
break up the initializers into blocks of 500 or so to avoid
blowing up the compiler (the compiler at the time was Berkeley
pcc). I've since done builds using GCC 2, dumping about 185K of
data and the dump-compile-relink took less than thirty seconds (on
an old 80486 at that). On modern hardware, dumping 800K or so
like XEmacs-nomule typically does, I expect the time to remain
in the minute range.