[cffi-devel] Crashes on X86-64 CLISP

Hoehle, Joerg-Cyril Joerg-Cyril.Hoehle at t-systems.com
Fri Feb 3 16:51:35 UTC 2006


James Bielman wrote:
>By the way, I was looking into writing a regression test for this and
>had problems since we also use FOREIGN-ADDRESS-UNSIGNED to implement
>POINTER-EQ.  Could we be using EQUALP instead for comparing pointers
>(or is the fact that seems to work just a coincidence?)

BTW, w.r.t. useage of FFI by CFFI, other optimizations seem worthwhile, e.g. INC-POINTER.

However my opinion is that CFFI should globally (across all platforms) attempt to optimize nested slot access, to come close to C.

C's foo.bar.zot should become a single MEM-READ with OFFSET, not
(mem-read (inc-pointer (inc-pointer foo (offset-of bar)) (offset-of zot)))

Some time ago, I thought a compiler macro on mem-read (or what was it) could help, but the pattern to recognize is hairy.

Regards,
	Jorg Hohle.



More information about the cffi-devel mailing list