cmucl issueshttps://gitlab.common-lisp.net/cmucl/cmucl/-/issues2017-07-08T07:17:48Zhttps://gitlab.common-lisp.net/cmucl/cmucl/-/issues/23Function with declared result type NIL returned.2017-07-08T07:17:48ZMark CoxFunction with declared result type NIL returned.I think there may be an issue with the way CMUCL handles return values.
I'm having trouble developing a reduced test case so I have attached the code I encountered the issue with. The code relies on an external library titled externa...I think there may be an issue with the way CMUCL handles return values.
I'm having trouble developing a reduced test case so I have attached the code I encountered the issue with. The code relies on an external library titled external-program.
I'm using cumcl-2016-06-x86-darwin.
I can't find any proclamations, declamations, declarations or THE forms associated with the generic function external-program:start.
Thanks
[issue.lisp](/uploads/b44453deac900d2a48bc482e8f29dc9e/issue.lisp)https://gitlab.common-lisp.net/cmucl/cmucl/-/issues/2Coercing lambda forms to functions and compilation.2017-07-08T07:17:48ZMark CoxCoercing lambda forms to functions and compilation.Compile time and coercing lambda forms to functions.
The CMUCL compiler signals an error when compiling code that coerces a
lambda form to a function. The compiler appears to perform the
coercion at compile time and then fails to du...Compile time and coercing lambda forms to functions.
The CMUCL compiler signals an error when compiling code that coerces a
lambda form to a function. The compiler appears to perform the
coercion at compile time and then fails to dump the resulting function
in to the fasl file.
The code below illustrates the issue.
;; /tmp/cmucl.lisp
;; $ cmucl -noinit -eval '(compile-file "/tmp/cmucl.lisp")'
(defun my-funcall (a)
(print a))
(my-funcall (coerce '(lambda () (print "hello'"))
'function))
;; Output
; Python version 1.1, VM version Intel x86/sse2 on 2015-03-21 08:58:17.
; Compiling: /private/tmp/cmucl.lisp 2015-03-21 08:58:11
; Converted MY-FUNCALL.
; Compiling DEFUN MY-FUNCALL:
; Byte Compiling Top-Level Form:
;
;
; File: /private/tmp/cmucl.lisp
; In: MY-FUNCALL (COERCE '(LAMBDA # #) 'FUNCTION)
; (COERCE '(LAMBDA # #) 'FUNCTION)
; --> VALUES PROG1 LET
; ==>
; '#<Interpreted Function (LAMBDA # #) {480513E9}>
; Error: Cannot dump objects of type EVAL:INTERPRETED-FUNCTION into fasl files.
;
; (MY-FUNCALL (COERCE '# 'FUNCTION))
; Note: Deleting unreachable code.
;
; Compilation unit finished.
; 1 error
; 1 note
; /tmp/cmucl.sse2f written.
; Compilation finished in 0:00:00.
CMU Common Lisp snapshot-2014-12 (20F Unicode), running on me.local
With core: /home/me/local/lib/cmucl/lib/lisp-sse2.core
Dumped on: Sat, 2015-01-03 21:50:20+10:00 on me.local
See <http://www.cmucl.org/> for support information.
Loaded subsystems:
Unicode 1.29 with Unicode version 6.2.0
Python 1.1, target Intel x86/sse2
CLOS based on Gerd's PCL 2010/03/19 15:19:03
*
Thanks
Mark