CMUCL commit: src/compiler (main.lisp)
Raymond Toy
rtoy at common-lisp.net
Sun Mar 14 15:51:21 CET 2010
Date: Sunday, March 14, 2010 @ 10:51:21
Author: rtoy
Path: /project/cmucl/cvsroot/src/compiler
Modified: main.lisp
For a compiled function, recompile from sources if the
function-lambda-expression is available and is in a null lexical
environment. This is the quite useful previous behavior.
-----------+
main.lisp | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
Index: src/compiler/main.lisp
diff -u src/compiler/main.lisp:1.149 src/compiler/main.lisp:1.150
--- src/compiler/main.lisp:1.149 Mon Feb 15 11:34:42 2010
+++ src/compiler/main.lisp Sun Mar 14 10:51:21 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.149 2010-02-15 16:34:42 rtoy Exp $")
+ "$Header: /project/cmucl/cvsroot/src/compiler/main.lisp,v 1.150 2010-03-14 14:51:21 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
@@ -1952,10 +1952,20 @@
;; If the definition is already a compiled function,
;; compile either produces that function itself (i.e.,
;; is an identity operation) or an equivalent function.
+ ;;
+ ;; But if the function lambda expression is available,
+ ;; and if the expression is defined in a null lexical
+ ;; environment, recompile from sources. (This was the
+ ;; old behavior, which is quite useful.)
(form (etypecase definition
((or cons eval:interpreted-function)
`#',(get-lambda-to-compile definition))
- (function `',definition)))
+ (function
+ (multiple-value-bind (exp lexenv)
+ (function-lambda-expression definition)
+ (if (and exp (not lexenv))
+ `#',exp
+ `',definition)))))
(*source-info* (make-lisp-source-info form))
(*top-level-lambdas* ())
(*converting-for-interpreter* nil)
More information about the cmucl-commit
mailing list