* module/system/il/inline.scm: New module, implements generic inlining of
scheme functions. It even does the right thing regarding (define
arity:nopt caddr) and such. So now there are many more inlines: the
arithmetics, `apply', the caddr family, etc. This makes the benchmarks
*much* faster.
* module/language/scheme/translate.scm (trans): Remove the
%scheme-primitives code in favor of the generic (scheme il inline)
code. Adds inlining for +, -, =, etc.
* src/vm.c (vm_puts): Fix to work.
* module/system/base/compile.scm (system): Export load/compile also.
* module/system/il/compile.scm (optimize): Further debitrotting, but I
haven't tried this function yet. It seems that <ghil-inst> was what
<ghil-inline> is.
* module/system/il/ghil.scm (*core-primitives*, *macro-module*)
(ghil-primitive-macro?, ghil-macro-expander, ghil-primitive?): Remove
these unused things.
* module/system/il/macros.scm: Removed, replaced with inline.scm.
* module/system/vm/assemble.scm (stack->bytes): Before, the final
serialization code did an (apply u8vector (apply append (map
u8vector->list ...))). Aside from the misspelling of append-map, this
ends up pushing all elements of the u8vector on the stack -- assuredly
not what you want. But besides even that, I think that pushing more
than 32k arguments on the stack brings out some other bug that I think
was hidden before, because now we actually use the `apply' VM
instruction. Further testing is needed here, I think. Fixed the code to
be more efficient, which fixes the manifestation of this particular
bug: a failure to self-compile after inlining was enabled.
* module/system/vm/bootstrap.scm: New module, serves to bootstrap
boot-9's `load-compiled'. That way when we load (system vm core), we're
loading compiled code already.
* module/system/vm/core.scm: Use (system vm bootstrap).
* src/guilec.in: Use the bootstrap code, so that we really are compiling
with an entirely compiled compiler.
* module/system/repl/repl.scm (default-catch-handler): An attempt at
making the repl print a backtrace; more work needed here.
* module/system/vm/frame.scm (make-frame-chain): Fix some misspellings --
I think, anyway.
* module/language/scheme/translate.scm (*the-compile-toplevel-symbol*):
Reset to compile-toplevel, which requires a patch to guile.
* module/system/base/compile.scm (compile-file): Some foo so that we load
up the scheme language before call-with-output-file. Fixes compilation
of (language scheme) modules.
* module/system/base/language.scm (define-language): Don't unquote in
make-language; refer to it by name instead, and export it.
* module/system/repl/Makefile.am (vm_DATA): Don't compile describe.scm,
because we really can't deal with goops yet.
* module/system/repl/repl.scm (compile-toplevel): If we're compiling, put
in a stub definition of start-stack, which is closely tied to the
interpreter.
* src/vm_loader.c (load-program): Fix a very tricky corruption bug!
* module/system/repl/repl.scm (default-pre-unwind-handler)
(default-catch-handler): New procedures, to do some error handling in
the repl.
(start-repl): Catch errors in the repl loop.
* module/system/base/compile.scm (<cenv>): No more cenv, it was a useless
data structure.
* module/system/repl/command.scm (*command-table*): Remove `use', it's
the same as `import'. Otherwise in this file, adapt to the repl having
direct pointers to the vm and the language, and to the module being in
the current-module fluid.
* module/system/repl/repl.scm (prompting-meta-read):
* module/system/repl/common.scm (<repl>): The repl now has a direct
pointer to the vm and language. Adapt accordingly.
* module/system/repl/common.scm (repl-prompt): Return a string instead of
outputting to the port, for better readline integration.
* module/system/repl/repl.scm (meta-reader, prompting-meta-read)
(start-repl): Integrate with (ice-9 readline) via the current-reader
fluid and the repl-reader function, both from boot-9.scm.
* module/system/repl/command.scm (system): Declare exports in the module
declaration.
* module/system/repl/repl.scm (start-repl): If the evaluation returns
multiple values, print them separately.