foreign-slot access gets inlined now (tested on clisp).
fix foreign-struct-value-form thus enable foreign-slot-value optimization clisp: inline %mem-ref when given constant type fix foreign-struct-set-form & enable foreign-slot-set optimization
Regarding darcs send -uo Joerg2.patch becoming larger than 40KB and not getting through to the mailing list: I just hand edited the bottom of the file and removed lots of this context information. I hope it can nevertheless be applied without problems!?!
As an afterthought, it appears the low-level API would better not rely on SETF, and e.g. define %MEM-SET for writing. All these define-setf-expanders just to avoid piling up LET-rebindings to ensure correct order of evaluation yet still be able to optimize are not enjoyable. E.g. (setf MEM-REF) is still not optimized away in CLISP. I presume it does with cmucl, because cffi-cmucl has a suitable setf-expander. Some day I'll write the same for CLISP.
All these compiler macros & ASDF-tests make that one should also asdf:load-source-op the testsuite so as to test code without compilation (i.e. the functional interface).
Regards, Jörg Höhle.