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.
On 2005-dec-22, at 16:19, Hoehle, Joerg-Cyril wrote:
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!?!
Hmmm, no. darcs didn't quite like that. Either James should remove that 40KB restriction, or you could publish your darcs tree somewhere?
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).
Good point.
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
James Bielman jamesjb@jamesjb.com writes:
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?
I've tested it in all lisps but Corman and ECL, no new failures. It's less code and less sources of possible bugs.
On Fri, 2005-12-23 at 09:35 +0000, Luís Oliveira wrote:
James Bielman jamesjb@jamesjb.com writes:
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?
I've tested it in all lisps but Corman and ECL, no new failures. It's less code and less sources of possible bugs.
Okay, thanks---pushed!
James