Port of maxima to ECL



> >>>>> "Goffioul" == Goffioul Michael  writes:
> 
>     Goffioul> I finally got a working version of Maxima (from CVS)
>     Goffioul> under ECL (from CVS as well), see the patch
>     Goffioul> attached. This has been tested under Win32/MSVC and the
>     Goffioul> tests suite runs fine.
> 
> I looked at this patch.  Most of it seems straightforward.  But a few
> questions:
> 
> o You've changed some of the regex's in cl-info.lisp to include \r.
>   Is that intended to support Windows?  Will they break Unix?  I
>   suspect not, but I haven't tested it.

Yes, it's to support Windows (I'm using ECL under Win32 with the MSVC
compiler). I don't think it would affect Unix because the \r is always
optional ( typically "\r?" or "[\r\n]+").

> o You've renamed a lot of variables like ".return" to just "return".
>   Shouldn't ECL be fixed so that ".return" is valid?

For reasons I couldn't still figure out, ECL fails to expand macros whose
arg names start with a dot. But this only happen when compiling Maxima.
The easy fix was just to change the argument name.

> o In maxima-build.lisp, why do you need to say
>   :load-source-instead-of-binary t?

I modified the compilation system such that it compiles Maxima into a single
FAS file (in ECL context, it's a shared library/DLL) instead of a myriad of
single FAS files. It loads much faster and is the ECL equivalent of dumping
a mem file in CLISP. In that context, each LISP file is first compiled into
an object file and finally all object files are linked to form the library.
However, each object file by itself is not an ECL-loadable module (the final
FAS file is). Hence, in the compilation process, I load the source instead
of the binary.

> o Similarly, in maxima.system, you removed the :load-only t from a few
>   modules.  Why is that needed?

Because I want to embed Maxima in a single FAS file, so all files must be
compiled.

> o Modifying the slatec lisp files is not a good idea.  I think that is
>   probably a bug in f2cl.

Indeed, I already had the problem when porting MatLISP. However, when ECL
compiles the file, it only keeps the first type declaration for FUNJY, which
makes the generated C code wrong (type mismatch).

Bye.
Michael.