CMUCL commit: intl-branch src/compiler (main.lisp)
Raymond Toy
rtoy at common-lisp.net
Mon Feb 15 16:14:00 CET 2010
Date: Monday, February 15, 2010 @ 10:14:00
Author: rtoy
Path: /project/cmucl/cvsroot/src/compiler
Tag: intl-branch
Modified: main.lisp
Fix from Helmut Eller for a bug mentioned by Madhu on cmucl-imp,
2010/02/14:
$ echo '(compile nil (lambda (x) x))' > foo.lisp
$ lisp -noinit
* (compile-file "foo.lisp")
* (load *)
causes an error.
-----------+
main.lisp | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
Index: src/compiler/main.lisp
diff -u src/compiler/main.lisp:1.148.2.3 src/compiler/main.lisp:1.148.2.4
--- src/compiler/main.lisp:1.148.2.3 Wed Feb 10 21:19:58 2010
+++ src/compiler/main.lisp Mon Feb 15 10:14:00 2010
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
- "$Header: /project/cmucl/cvsroot/src/compiler/main.lisp,v 1.148.2.3 2010-02-11 02:19:58 rtoy Exp $")
+ "$Header: /project/cmucl/cvsroot/src/compiler/main.lisp,v 1.148.2.4 2010-02-15 15:14:00 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
@@ -1948,7 +1948,17 @@
(start-warnings *compiler-warning-count*)
(start-notes *compiler-note-count*)
(*lexical-environment* (make-null-environment))
- (form `#',(get-lambda-to-compile definition))
+ ;; From Helmut Eller: ... we don't need the
+ ;; lambda-expression. To quote the CLHS entry for
+ ;; compile:
+ ;;
+ ;; If the definition is already a compiled function,
+ ;; compile either produces that function itself (i.e.,
+ ;; is an identity operation) or an equivalent function.
+ (form (etypecase definition
+ ((or cons eval:interpreted-function)
+ `#',(get-lambda-to-compile definition))
+ (function `',definition)))
(*source-info* (make-lisp-source-info form))
(*top-level-lambdas* ())
(*converting-for-interpreter* nil)
More information about the cmucl-commit
mailing list