Improving Lush<->C interaction

Ralf Juengling <[email protected]> Sun, 6 Jan 2008 18:05:25 -0800 (PST)
Newsgroups gmane.lisp.lush.devel
Message-ID <[email protected]>
On Sun, 30 Dec 2007, Leon Bottou wrote:

> [...]
>
> If I had one year to kill, I would redesign the runtime to
> let generic objects be either allocated on the stack or managed
> with a modern garbage collector. Then I would generate the pieces
> of a new interpreter as compiled code, and finally get rid of
> the old interpreter. People would complain because of the partial
> loss of backward compatibility of course ...
>

Why not build on existing work and go forward in a more
evolutionary way? We could use the freely available Boehm-
Weiser (BW) garbage collector that other language runtimes
also build on. http://www.hpl.hp.com/personal/Hans_Boehm/gc/

A major overhaul of the Lush2C compiler could be done in a
few steps:

1. Switch to automatic memory management (using BW)
    for both, the interpreter and compiled code.
    This would allow some simplifications in the compiler,
    in particular, we could eliminate the "hidden arguments
    problem".

2. Unify lisp and C representation of Lush objects. (I.e.,
    getting rid of the complicated lisp<->C mapping).

3. Rewrite the compiler.


Together we should be able to do 1. and 2. in less than
a year and this would already be a major improvement.
Finally, step 3. would be easier to do than presently.

Ralf



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/