Hi,

here are more patches:
- (too) few tests to verify left-to-right evaluation (side-effects)
  I remember UFFI/Corman once had a bug in this area.
- with-foreign-object always inlines constant types
- clisp %mem-set (thanks for all the patch) optimizer

Now disassembly of some of the foreign-value tests look great: CFFI is almost 
completely compiled away!
Still there's more work to do w.r.t. optimizations, but I'll talk about that 
next year (struct access, strings ...).


NB You may wish not to apply the second %mem-set patch (where I introduce 
ffi::write-memory-as). It appears that, as a side effect of %MEM-SET only 
getting called from the MEM-REF setf-expander, that all values have already 
been saved in local variables, thus the low-level function cannot disturb order 
of evaluation (all it sees is (%MEM-SET #:G1000 #:G1001 #:1002 ...)). But 
relying on that is not proper engineering. It's just good to know.


I didn't review compiler-macro forms in *.lisp for possibly breaking the left 
to right evaluation rule.  Never mind a review, some tests should be added. 
Reviews happen once, tests remain.

Regards,
        Jörg Höhle

Attachment: Joerg5.patch.gz
Description: Binary data

_______________________________________________
cffi-devel mailing list
cffi-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel

Reply via email to