[cffi-devel] more compiler macro optimizations

James Bielman jamesjb at jamesjb.com
Fri Dec 23 01:43:02 UTC 2005


On Thu, 2005-12-22 at 17:19 +0100, Hoehle, Joerg-Cyril wrote:

> 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.

You're right---the interface sort of evolved from an early
implementation without compiler macros and I never realized that I
wasn't gaining anything by continuing to use SETF (since this is an
internal interface after all).

Here's a patch that does this---I've tested it on SBCL and CMUCL, would
anyone else like to give it a spin before merging?

James

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mem-set.diff
Type: text/x-patch
Size: 13196 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20051222/d21bef28/attachment.bin>


More information about the cffi-devel mailing list