[cmucl-imp] Error coercing functions at compile time.

Mark Cox markcox80 at gmail.com
Fri Mar 20 23:02:25 UTC 2015


G'day,

Compiling the following example produces an error.

;; /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


More information about the cmucl-imp mailing list