Subject: [clisp-list] b->C... ->o

From: Stefan Kain <[email-masked]>
Date: Sun Apr 14 17:09:11 2002

Hello fellows,

I have talked a couple of times with Bruno about this
issue. (We started reasoning about this a couple of years
ago already)

Here is my plan.
1. In the future I would like to concentrate a little less on
   comment translations. (Not such a big sparetime pleasure
   as it may seem at the first glance... :-)

2.  I will add a function in compiler.lisp that emits C-code
     instead of byte-code vectors. The clou is to have
     interprete_bytecode_ (a C function) in mind, interprete the
     bytecode abstractly (abstract interpretation) and instead
     of in-place-executing the C-code of each case-statement,
     adding it to a C-code-vector. In a second pass the C-code
     table will be instrumented with the jump-labels. Then,
     the code is serialized to a file. (I know three passes...
     how unelaborate... but this is my first guess. I first want
     to see reasonable C-output. Only then we can talk about efficient
     code-generation...)

I am serious about this.

Please do not get me into an efficiency discussion... (Will the C code
be more efficient than byteode...)

I think, the speed gain will be comparatively low.
Due to instruction-cache limitations, we might even become slower...
(the resulting object-code from b->C->o - compilation will be
significantly
larger)

The compilation process will also be much longer.

So I definitely do not expect any miracles to happen.
I just want to have fun solving (trying to solve) this interesting
problem.

Good night! :-)

Bye,
Stefan K.