I needed a CL interpreter which would host the compiler (which I wrote in Common Lisp) which calls the LLVM-IR library to generate llvm::Module objects which contains llvm::Function objects that are Just-In-Time compiled into machine code and called via C function pointers from the Common Lisp or C++ code.
I did not want to write a Common Lisp compiler in C++ (shudder).This project started as an archaic Sexp walking Lisp interpreter that grew into a very slow Common Lisp Sexp walking interpreter within which I wrote a reasonably fast self-hosting Common Lisp compiler that generates LLVM-IR.
I didn't know that when I started. I know that now - the bridge doesn't require the compiler and LLVM backend- the CL/C++ bridge is all C++ template programming, lots and lots of template programming.It's styled after the boost::python library if you are familiar with it.Once I started writing the compiler and exposing and using the LLVM backend I just kept going.Although, having intimate familiarity with the Common Lisp implementation I wrote has greatly facilitated the development of the bridge.
We could get it to work with ECL as well if you want it - although it's going to take some work.
Then we could incorporate the LLVM-IR generating compiler into ECL.
1) C++ classes behave like CL structures.
3) Memory management is currently handled using reference counted C++ shared_ptr/weak_ptr. I plan to add mark-and-sweep GC later.