[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: issue COMPILED-FUNCTION-REQUIREMENTS, version 4
- To: masinter.pa@xerox.com
- Subject: Re: issue COMPILED-FUNCTION-REQUIREMENTS, version 4
- From: Barry Margolin <barmar@FAFNIR.THINK.COM>
- Date: Thu, 16 Mar 89 12:31 EST
- Cc: cl-compiler@sail.stanford.edu, X3J13@sail.stanford.edu
- In-reply-to: <890316-062330-3633@Xerox>
I'll just reiterate something I said at one of the meetings. One
portable use I can think of for the COMPILED-FUNCTION type is as a
declaration to allow compiler optimization. If a function knows (or
requires) that a parameter is a compiled function it can declare that
and the implementation may be able to optimize the FUNCALL better.
Another thing I just thought of is something like:
(when (typep f '(and function (not compiled-function)))
(setq f (compile nil f)))
This doesn't actually work because COMPILE isn't required to accept
lexical closures (well, at least it doesn't accept them in Genera 7.2),
but they satisfy the type specifier, but it would be nice if there were
a standard set of primitives that would allow one to write something
that does what the above tries to do.
barmar