On 10/01/2018 11:42 AM, Marc Feeley wrote:
Here is a list of the primitives that are inlined by the native backend. If you use other primitives, they will be actual calls to the runtime library compiled with the C backend (i.e. slow). Remember that this is work in progress and that some things are not yet optimized and some things are unimplemented or broken.
##not ##identity
##fixnum? ##pair? ##null? ##char? ##special? ##mem-allocated?
##fx+ ##fx+? ##fx- ##fx-? ##fx< ##fx<= ##fx> ##fx>= ##fx=
##cons ##car ##cdr ##set-car! ##set-cdr!
##vector-ref ##vector-set! ##vector-length
So at this point the native backend is more a “proof of concept” and there is still lots of work to be done before this is a practical alternative to the C backend.
And here's roughly how many "primitives" there are in a backend:
heine:~/programs/gambit/gambit/gsc> grep '("##' _prims.scm | wc 459 3230 34354
Many of the remaining vector primitives (##u8vector-ref, ...) can be modeled on the currently implemented primitives, but there are many others that will require some thought. And perhaps many can remain accessed in the existing C versions through the new "bridge" put together by Marc and Laurent.
Once complex routines (beyond ack, fib, tak, ...) are tested, issues about register allocation, etc. (all the things that are big issues in any compiler) will become more important.
Brad