I've now coded two version of native compilers for x86-64 linux compiling either the old guile-2.0 VM language or guile-2.2 RTL VM language.
I've coded all but the halt rtl instructions and tested most of them by handwriting rtl instructions.
The guile-2.0 VM is mostly covered and is in a playable state There will be more to do especially to test and be able to run call/cc and prompts in this newly created language.
I've tested the code and it looks like RTL code has faster function dispatch then old VM and that
the native one is on par with RTL function dispatch. On the other hand the meat inside the functions will run maybe 3x faster than RTL VM code. I added in inline assembler VM instruction that communicates to the native compiler to output pure assembler code which means that some parts can be as fast as ity possibly
can. and you will gain maybe another 5x because of using machine registers and machine data-structures like int and doubles.
How to play with these You may download https://gitorious.org/aschm
There is a RTL branch targeting guile-2.2 wip-rtl And the master if for guile-2.0
Go the C code parts and make sure that you can compile them. Look in the guile directory there are some files that needs to be merged to the same file in the main guile repo
or wip-rtl repo. then compile the pathced guile.
look for test directories to see how to compile, for the rtl branch look in rtl.scm
Play and have fun.
I feel that I would like to wait for other people to make sure scheme programs can be compiled to the rtl vm
and also discuss how to proceed and how to solve some technical issues that may remains before continuing this work.
A crazy idea I had was to allow for people to code inline C-code in stead of inline assembly or maybe some schemier
version of C code in order to be more productive for these tasks. But I really don't know yet how to approach this.