1.0.14.17: treat (NAMED-LAMBDA NIL ...) like (LAMBDA ...)
authorNikodemus Siivola <nikodemus@random-state.net>
Mon, 4 Feb 2008 20:49:27 +0000 (20:49 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Mon, 4 Feb 2008 20:49:27 +0000 (20:49 +0000)
 * Getting NIL as the source-name of a functional is pretty bogus, and
   getting it as the debug-name messes with our careful debug-name
   sanity checks. So don't do it then.

src/compiler/ir1-translators.lisp
src/compiler/ir1tran-lambda.lisp
version.lisp-expr

index affa00f..d68a632 100644 (file)
@@ -475,7 +475,8 @@ Return VALUE without evaluating it."
 (defun name-lambdalike (thing)
   (ecase (car thing)
     ((named-lambda)
-     (second thing))
+     (or (second thing)
+         `(lambda ,(third thing))))
     ((lambda instance-lambda)
      `(lambda ,(second thing)))
     ((lambda-with-lexenv)
index bd8f75a..6fd0661 100644 (file)
     ((named-lambda)
      (let ((name (cadr thing))
            (lambda-expression `(lambda ,@(cddr thing))))
-       (if (legal-fun-name-p name)
+       (if (and name (legal-fun-name-p name))
            (let ((defined-fun-res (get-defined-fun name))
                  (res (ir1-convert-lambda lambda-expression
                                           :maybe-add-debug-catch t
              res)
            (ir1-convert-lambda lambda-expression
                                :maybe-add-debug-catch t
-                               :debug-name name))))
+                               :debug-name
+                               (or name (name-lambdalike thing))))))
     ((lambda-with-lexenv)
      (ir1-convert-inline-lambda thing
                                 :source-name source-name
index cc445fd..bc97d87 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.14.16"
+"1.0.14.17"