On Tue, Oct 2, 2012 at 1:14 PM, Matthew Mondor <email@example.com> wrote:
I noticed many calls to ecl_to_pointer() expanding to
ecl_foreign_data_pointer_safe() calls even with (optimize (safety 0)).
But interestingly in cmp/sysfun.lsp, I saw the following line:
(def-inline si:foreign-data-p :always (t) :bool "@0;ECL_FOREIGN_DATA_P(#0)")
I also noticed that my DECLAIM to inline the accessor functions do not
appear to work, so there also always are function calls made to
access/set structure fields no matter the SPEED/SAFETY level. This is
not terrible, although if such small functions could be inlined it'd be
nice. Since the inline declamations appeared to work in other contexts
for small functions, I wondered if perhaps it's a limitation of
functions using C-INLINE.
I also thought about perhaps generating small C functions with the inline directive via CLINES instead of using C-INLINE too, which could be another approach (I'd also have to check how to get those to register CL symbols and be ECL friendly then).