[cffi-devel] more compiler macro optimizations

Hoehle, Joerg-Cyril Joerg-Cyril.Hoehle at t-systems.com
Thu Dec 22 16:19:56 UTC 2005


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Joerg2.patch
Type: application/octet-stream
Size: 8397 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20051222/70a687ec/attachment.obj>


More information about the cffi-devel mailing list