Yeah, this is pretty crazy stuff. But crazy fun stuff!
1. Anyway I think that I could just do away with two table lookups to reach both
c-function pointers and the goto gosub stuff generated from assembler.
2. A think more work is needed of the extra layer to allow for correct continuation
properties.
3. Would be good if we could just pass a pointer to the rtl-vm local data in stead of copying
them into a third vm.
4. Good register handling is needed, right now this is the most simplest approach you can have
towards native / JIT compiling e.g. take the rtl code and transform it directly to rtl code. you do get
faster code but it would be nice to actually take advantage of hardware regiosters. And for that
we would need ideally to compile from something else than rtl bytecode. Anyway I could imagine an
intrmediate state of guile where we took this simplistic approach to compiling - it should at least
be very fast to compile the code and if we look at it as some speedier VM it's actually not a bad idea
appart from beeing hard to maintain with respect to hardware architecture.
5. To simplify further we could design most of the meaty stuff in C-code and restrict the target registers
for this code and hook everything together with some basic assembler. Then I don't expect the assembler
work to be that hefty.
6. As Noha later on in the list point out, there is already JIT engines out there that can work with this without the
extra overhead. But I'm so in love with assembler in scheme that I couldn't resist hacking this together.
Regards
Stefan