[Openmcl-devel] Series compilation question.
gb at clozure.com
Thu Nov 14 20:13:46 EST 2002
On Thu, 14 Nov 2002, Barry Perryman wrote:
> I thought I'd take a look at series. I downloaded the package off
> sourceforge and compiled it up, as per the instructions. It compiles with
> the error messages at the end of this email. The odd thing is that if you
> run the test suite it's seems to pass with flying colours.
It's important to remember that the messages below are warnings, not
SERIES seems to generate lots of code of the form:
(flet ((<SOME-UNINTERNED-SYMBOL> (args) (do-something-with args)))
(funcall #'<SOME-UNINTERNED-SYMBOL> an-arg-or-two))
The compiler seems unable to see that the call to the local function
occurs within the scope of a local definition of that function (and
warns that the function name is unknown), but compiles the funcall as
a local function call.
I haven't been yet able to construct a simple test case to get a
better idea of what's going on; the use of the long-gone-but-still-there
COMPILER-LET may or may not be a complicating factor.
> As I'm still early in the investigation stage I'd like to know if these are
> real problems or if I can ignore them.
If the warnings are legitimate, they're only legitimate in a fairly bizarre
sense (having to do with what lexical environment the body of COMPILER-LET
is processed in. That sort of question is a major reason why COMPILER-LET
was removed from CL a long time ago ...).
It is also possible that the warnings are entirely spurious; I haven't
been able to think of a reason for the warnings to have been generated
in the first place other than the bizarre use of COMPILER-LET.
I don't know whether other implementations treat:
(funcall (function foo) ...)
essentially the same way as they treat
when checking for references to undefined functions.
Whether the warnings are spurious or not, they're pretty much
meaningless and can be safely ignored; all of the functions that're
allegedly undefined are in fact defined and calls to those functions
seem to have compiled correctly.
> Any clues?
I don't have easy access to OpenMCL sources at the moment, but I'd
almost be willing to bet that COMPILER-LET processes its body in
the null lexical environment and that the use of
(funcall #'foo ...)
may have been an attempt to suppress warnings in this case.
> ? (compile-file "s-code")
> ;Compiler warnings for "/Users/barry/src/series/s-code.lisp" :
> ; Undefined function #:COLLECT-MIN-4278, in SERIES:COLLECT-MIN.
> ; Undefined function #:COLLECT-MAX-4227, in SERIES:COLLECT-MAX.
> ; Undefined function #:COLLECT-PRODUCT-4206, in SERIES:COLLECT-PRODUCT.
> ; Undefined function #:COLLECT-SUM-4185, in SERIES:COLLECT-SUM.
> ; Undefined function #:COLLECT-LENGTH-4167, in SERIES:COLLECT-LENGTH.
> ; Undefined function #:COLLECT-OR-4149, in SERIES:COLLECT-OR.
> ; Undefined function #:COLLECT-AND-4131, in SERIES:COLLECT-AND.
> ; Undefined function #:COLLECT-NTH-4104, in SERIES:COLLECT-NTH.
> ; Undefined function #:COLLECT-FIRST-4083, in SERIES:COLLECT-FIRST.
> ; Undefined function #:COLLECT-LAST-4062, in SERIES:COLLECT-LAST.
> ; Undefined function #:COLLECT-PLIST-4035, in SERIES:COLLECT-PLIST.
> ; Undefined function #:COLLECT-ALIST-4008, in SERIES:COLLECT-ALIST.
> ; Undefined function #:COLLECT-STREAM-3972, in SERIES:COLLECT-STREAM.
> ; Undefined function #:COLLECT-FILE-3927, in SERIES:COLLECT-FILE.
> ; Undefined function #:COLLECT-HASH-3897, in SERIES:COLLECT-HASH.
> ; Undefined function #:COLLECT-APPEND-3837, in SERIES:COLLECT-APPEND.
> ; Undefined function #:ALTER-2497, in SERIES:ALTER.
> ; Undefined function #:COLLECT-IGNORE-2257, in SERIES::COLLECT-IGNORE.
> ; Undefined function #:COLLECT-FN-2138, in SERIES:COLLECT-FN.
> ; Undefined function #:COLLECT-1660, in SERIES:COLLECT.
> Add photos to your messages with MSN 8. Get 2 months FREE*.
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
Openmcl-devel mailing list
Openmcl-devel at clozure.com
More information about the Openmcl-devel