0.pre7.110:
[sbcl.git] / src / compiler / ltn.lisp
index 2f06e0d..a728e2e 100644 (file)
@@ -78,7 +78,7 @@
 ;;; values cannot, since we must preserve EQLness.
 (defun legal-immediate-constant-p (leaf)
   (declare (type constant leaf))
-  (or (null (leaf-name leaf))
+  (or (not (leaf-has-source-name-p leaf))
       (typecase (constant-value leaf)
        ((or number character) t)
        (symbol (symbol-package (constant-value leaf)))
     (node-ends-block call)
     (let ((block (node-block call)))
       (unlink-blocks block (first (block-succ block)))
-      (link-blocks block (node-block (lambda-bind callee)))))
+      (link-blocks block (lambda-block callee))))
   (values))
 
 ;;; Annotate the value continuation.
                   (valid (valid-function-use call type))
                   (strict-valid (valid-function-use call type
                                                     :strict-result t)))
-             (frob "unable to do ~A (cost ~D) because:"
+             (frob "unable to do ~A (cost ~W) because:"
                    (or (template-note loser) (template-name loser))
                    (template-cost loser))
              (cond
        (let ((*compiler-error-context* call))
          (compiler-note "~{~?~^~&~6T~}"
                         (if template
-                            `("forced to do ~A (cost ~D)"
+                            `("forced to do ~A (cost ~W)"
                               (,(or (template-note template)
                                     (template-name template))
                                ,(template-cost template))
       ;; to implement an out-of-line version in terms of inline
       ;; transforms or VOPs or whatever.
       (unless template
-       (when (and (eq (continuation-fun-name (combination-fun call))
-                      (leaf-name
-                       (physenv-function
-                        (node-physenv call))))
-                  (let ((info (basic-combination-kind call)))
-                    (not (or (function-info-ir2-convert info)
-                             (ir1-attributep (function-info-attributes info)
-                                             recursive)))))
+       (when (let ((funleaf (physenv-lambda (node-physenv call))))
+               (and (leaf-has-source-name-p funleaf)
+                    (eq (continuation-fun-name (combination-fun call))
+                        (leaf-source-name funleaf))
+                    (let ((info (basic-combination-kind call)))
+                      (not (or (function-info-ir2-convert info)
+                               (ir1-attributep (function-info-attributes info)
+                                               recursive))))))
          (let ((*compiler-error-context* call))
            (compiler-warning "~@<recursion in known function definition~2I ~
                                ~_policy=~S ~_arg types=~S~:>"