* module/system/base/language.scm (<language>): Remove the `version'
field from languages. It just wasn't useful.
* module/language/assembly/spec.scm:
* module/language/brainfuck/spec.scm:
* module/language/bytecode/spec.scm:
* module/language/ecmascript/spec.scm:
* module/language/elisp/spec.scm:
* module/language/glil/spec.scm:
* module/language/objcode/spec.scm:
* module/language/scheme/spec.scm:
* module/language/tree-il/spec.scm:
* module/language/value/spec.scm: Remove #:version from all language
definitions. Shorten some language names (e.g. "Guile Scheme" ->
"Scheme").
* module/language/assembly/spec.scm:
* module/language/brainfuck/spec.scm:
* module/language/bytecode/spec.scm:
* module/language/ecmascript/spec.scm:
* module/language/glil/spec.scm:
* module/language/scheme/spec.scm:
* module/language/tree-il/spec.scm: Language-readers now take two
arguments: the port and the environment. This should allow for
compile-environment-specific reader behavior.
* module/system/base/compile.scm (read-and-compile):
* module/system/repl/common.scm (repl-read): Pass the environment to the
language-reader.
* module/system/repl/repl.scm (meta-reader, prompting-meta-read):
* module/system/repl/command.scm (define-meta-command): Use the second
argument to repl-reader, so we avoid frobbing current-reader.
* module/system/base/compile.scm: Expect compile passes to produce three
values, not two. The third is the "continuation environment", the
environment that can be used to compile a subsequent expression from
the same source language. For example, expansion-time side effects can
set the current module, which would be reflected appropriately in the
continuation environment.
* module/language/assembly/compile-bytecode.scm:
* module/language/bytecode/spec.scm:
* module/language/ecmascript/compile-ghil.scm:
* module/language/ghil/compile-glil.scm:
* module/language/glil/spec.scm:
* module/language/objcode/spec.scm:
* module/language/scheme/compile-ghil.scm:
* module/system/base/compile.scm: Update compile passes to return a
continuation environment.
* module/system/vm/Makefile.am:
* module/system/vm/conv.scm:
* module/system/vm/disasm.scm: Remove these modules, as their
functionality is now in (language ...).
* libguile/objcodes.h:
* libguile/objcodes.c:
* module/system/vm/objcode.scm: Rename objcode->u8vector to
objcode->bytecode.
* module/system/vm/frame.scm:
* module/language/bytecode/spec.scm: Fix for objcode->bytecode.
* scripts/disassemble:
* testsuite/run-vm-tests.scm: Fix for (system vm disasm) removal.
* module/system/repl/command.scm: Use the right disassembler.
* module/language/assembly/Makefile.am:
* module/language/assembly/spec.scm:
* module/language/assembly/decompile-bytecode.scm: Add a bytecode
decompiler. Neat!
* module/language/bytecode/spec.scm (decompile-objcode):
* module/language/objcode/spec.scm (decompile-value): Add some
"decompilers" here too.
* module/system/base/compile.scm (current-language): Since we can refer
to languages by name, do so here -- removes the previous
anti-circularity hack.
(compile-file, compile): Refer to target languages by name.
(decompile): New public function. Neat!
* module/system/base/language.scm (lookup-decompilation-order): Fix so we
look for decompilers with the high-level language definition.
* module/system/base/language.scm (lookup-decompilation-order): New
function, like its compiling cousin, but backwards.
(compute-translation-order): Rework so that languages can be specified
either by name or by identity. Return a list of language - procedure
pairs, without the "to" language in the list, instead of a list of
languages.
(invalidate-compilation-cache!): Invalidate the decompilation cache
too.
(<language>): Add a decompiler field.
* module/system/base/compile.scm (compile-passes): Much simpler now that
lookup-compilation-order gives us the procedures directly.
* module/language/*/spec.scm: Specify compilers by name, so that we can
avoid unnecessary module loads, and so that when we specify
decompilers, we can avoid cycles.
* module/language/bytecode/Makefile.am:
* module/language/bytecode/spec.scm: Add another language to the stack,
bytecode. Bytecode is the u8vector form of object code..
* configure.in:
* module/language/Makefile.am:
* module/language/assembly/Makefile.am:
* test-suite/tests/asm-to-bytecode.test:
* module/language/assembly/spec.scm:
* module/language/assembly/compile-bytecode.scm: Update to include the
new pass.