Sun Jan 10 12:11:55 CET 2010

Practical bootstrapping with embedded VM

Back to the original plan: to bootstrap the incrementally defined
Scheme library by feeding a VM with code and asking it to compile some
of the macro forms.

This might actually not be so simple: the problem is that this
requires another interface.  Maybe it is more straightforward to
compile the whole library on top of R5RS Scheme.

Some trade-offs:

  - Run the macro transformers on the target VM and provide an
    interface to transfer the data from/to the host compiler.

  - Emulate the VM + primitives.  This is not just the VM (composite
    code) but also the primitives need to be implemented.

  - Don't emulate the VM: compile all macros and their supporting code
    on the host, and use the hosts's language features.

It seems the latter is a more robust approach.  However, I have the
interface for free if I can run the compiler on the old VM.

Maybe it's time to separate the old VM code from the rest of the C
code that's re-used by the old VM.