0.9.2.9: thread objects
[sbcl.git] / src / compiler / entry.lisp
index 6fdd25e..5f955ee 100644 (file)
   (declare (type clambda fun) (type entry-info info))
   (let ((bind (lambda-bind fun))
        (internal-fun (functional-entry-fun fun)))
-    (setf (entry-info-closure-p info)
-         (not (null (physenv-closure (lambda-physenv fun)))))
+    (setf (entry-info-closure-tn info)
+          (if (physenv-closure (lambda-physenv fun))
+              (make-normal-tn *backend-t-primitive-type*)
+              nil))
     (setf (entry-info-offset info) (gen-label))
     (setf (entry-info-name info)
          (leaf-debug-name internal-fun))
@@ -87,7 +89,9 @@
                        (setq res t))
                       (t
                        (setf (ref-leaf ref) new)
-                       (push ref (leaf-refs new)))))))))
+                       (push ref (leaf-refs new))
+                        (setf (leaf-refs lambda)
+                              (delq ref (leaf-refs lambda))))))))))
        (:toplevel
         (setq res t))))
     res))