On Wed, Feb 8, 2012 at 6:59 AM, Raymond Toy <toy.raymond@gmail.com> wrote:
Does ecl have the equivalent of cmucl's (and sbcl's)

Not yet. This can be implemented using SI::TRAP-FPE

(defmacro with-float-traps-masked (&body body)
   `(let ((%trap-bits (si::trap-fpe 'cl:last t)))
       (progn (si::trap-fpe %trap-bits nil) ,@body)
      (si::trap-fpe %trap-bits t))))
and vector-sap?

Hmm, is this for the CFFI? Because it is going to depend very much on what VECTOR-SAP has to return. For UFFI you have SI::MAKE-FOREIGN-DATA-FROM-ARRAY which takes an array and returns an UFFI pointer. Alternatively, C-INLINE may be easily used to retrieve the pointer in a C format.

Oh, I also need the equivalent of without-gcing.

You only need them to keep the arrays from gc, but this can be ensured by simply storing the arrays in special or local variables. ECL never moves data around: it relies on conservative garbage collectors.
I'm looking at trying to get matlisp to run with ecl, and now that
someone has contributed an ffi using cffi, I thought getting matlisp
working with ecl would be nice.

That would indeed be very nice.


Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)