> bnm@indica.bbt.com says...> A compiler can target either a CPU or a VM. Either can be> defined by an ISA (instruction set architecture).

> [I believe the counter-argument to the first point is that> in many cases the choice would be between cumbersome code> and no code at all. -John]

In an article I remember reading but didn't save, Anselm Baird-Smith
<Anselm.BairdSmith@inria.fr> said that to compile Scheme into Java-VM
would be difficult because of continuations. Anselm does know well the
subject, since he designed and implemented OScheme -a Scheme dialect,
with prototype based objects, ftp to koala.inria.fr:/pub/OScheme) as
an efficient virtual machine.

Explicit continuations (such as those provided by Scheme's
call-with-current-continuation primitive), when implemented on a stack
based (virtual or real) machine, nearly requires machine support,
since the stack (or segments in it) have to be copied elsewhere. An
alternative is to allocate all activation frames on the heap, hence
without using any stack. This is actually doable, and work efficiently
(see the SML/NJ implementation). In that case, dead activation frames
are not popped but became garbage (and their memory is reused by a
garbage collector).