0.8.1.29:
[sbcl.git] / src / compiler / dfo.lisp
index ca91eab..7739e60 100644 (file)
@@ -32,7 +32,7 @@
          (setf (block-number block) (incf num))
          (setf (block-delete-p block) t)))
     (do-blocks (block component)
-      (unless (block-flag block)
+      (when (block-delete-p block)
        (delete-block block))))
   (values))
 
@@ -59,7 +59,7 @@
       (unless (eq old-next old-tail)
        (setf (block-next head) old-next)
        (setf (block-prev old-next) head)
-       
+
        (setf (block-prev next) old-last)
        (setf (block-next old-last) next))
 
     (setf (component-lambdas new)
          (nconc (component-lambdas old) (component-lambdas new)))
     (setf (component-lambdas old) nil)
-    (setf (component-new-funs new) (nconc (component-new-funs old)
-                                         (component-new-funs new))
-         (component-new-funs old) nil)
+    (setf (component-new-functionals new)
+         (nconc (component-new-functionals old)
+                (component-new-functionals new)))
+    (setf (component-new-functionals old) nil)
 
     (dolist (xp (block-pred old-tail))
       (unlink-blocks xp old-tail)
          (res home))))
     (res)))
 
-;;; If CLAMBDA is not already in COMPONENT, just return that
+;;; If CLAMBDA is already in COMPONENT, just return that
 ;;; component. Otherwise, move the code for CLAMBDA and all lambdas it
 ;;; physically depends on (either because of calls or because of
 ;;; closure relationships) into COMPONENT, or possibly into another
 
     (values (real) (top) (real-top))))
 
-;; COMPONENTs want strings for names, LEAF-DEBUG-NAMEs mightn't be
-;; strings..
+;;; COMPONENTs want strings for names, LEAF-DEBUG-NAMEs mightn't be
+;;; strings...
 (defun component-name-from-functional-debug-name (functional)
   (declare (type functional functional))
   (let ((leaf-debug-name (leaf-debug-name functional)))
     ;; an existing component if we find that there are references
     ;; between them. Any code that is left in an initial component
     ;; must be unreachable, so we can delete it. Stray links to the
-    ;; initial component tail (due NIL function terminated blocks)
+    ;; initial component tail (due to NIL function terminated blocks)
     ;; are moved to the appropriate new component tail.
     (dolist (toplevel-lambda toplevel-lambdas)
       (let* ((old-component (lambda-component toplevel-lambda))
     ;; is always a preceding REF NIL node in top level lambdas.
     (let ((return (lambda-return lambda)))
       (when return
-       (let ((return-block (node-block return))
-             (result (return-result return)))
-         (setf (block-last return-block) (continuation-use result))
-         (flush-dest result)
-         (delete-continuation result)
-         (link-blocks return-block result-return-block))))))
+       (link-blocks (node-block return) result-return-block)
+        (flush-dest (return-result return))
+        (unlink-node return)))))
 
 ;;; Given a non-empty list of top level LAMBDAs, smash them into a
 ;;; top level lambda and component, returning these as values. We use