[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue CONSTANT-COMPILABLE-TYPES, version 7



The problem with not having a predicate to test functions that meet
the requirements is that there's no predicate for testing whether a
function is closed over any variables.  See CLtL p. 89.

A further technical problem with dumping functions is that for
Lisp-callable functions that are written in microcode, machine
language, C, or whatever, it's hard to define how they should be
dumped.  This applies not only to functions that the user loads with a
foreign-function interface, but to built-in functions provided as part
of the Lisp kernel.  For example, suppose the kernel provides some
Lisp-callable C functions to interface to the file system, math
library, or whatever.  These might be represented just as a stub that
jumps off to the address that the C linker/loader just happened to
relocate the C function at (which may differ from one invocation of
the Lisp image to the next).  There's no way to determine the size of
a C function from within C, and even if you did you may not be able to
dump and reload it because maybe the C compiler didn't generate
relocatable code. 

I suppose one alternative would be to say that such functions are not
FUNCTIONP but to extend APPLY, FUNCALL, etc. to accept them.  Is it
legal for functions defined in the standard not to be FUNCTIONP?

-Sandra
-------