X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fstack.lisp;h=4ac4c7af2d82b5651b800da1dd2fd33a1b5b315c;hb=fe5d3fcb66a417311359101a77da4a691e649622;hp=fccf4f8a8db902d340cf0acfa4b94b0cb097d5ce;hpb=8902b8b6bd2e9285749dd39d313b33b6c69c5213;p=sbcl.git diff --git a/src/compiler/stack.lisp b/src/compiler/stack.lisp index fccf4f8..4ac4c7a 100644 --- a/src/compiler/stack.lisp +++ b/src/compiler/stack.lisp @@ -22,17 +22,17 @@ ;;; invariant that all pushes come after the last pop. (defun find-pushed-lvars (block) (let* ((2block (block-info block)) - (popped (ir2-block-popped 2block)) - (last-pop (if popped - (lvar-dest (car (last popped))) - nil))) + (popped (ir2-block-popped 2block)) + (last-pop (if popped + (lvar-dest (car (last popped))) + nil))) (collect ((pushed)) (let ((saw-last nil)) - (do-nodes (node lvar block) - (when (eq node last-pop) - (setq saw-last t)) + (do-nodes (node lvar block) + (when (eq node last-pop) + (setq saw-last t)) - (when (and lvar + (when (and lvar (or (lvar-dynamic-extent lvar) (let ((dest (lvar-dest lvar)) (2lvar (lvar-info lvar))) @@ -96,7 +96,6 @@ (let* ((generator (lvar-use lvar)) (block (node-block generator)) (2block (block-info block))) - (aver (eq generator (block-last block))) ;; DX objects, living in the LVAR, are ;; alive in the environment, protected by ;; the CLEANUP. We also cannot move them @@ -278,9 +277,9 @@ (collect ((res nil adjoin)) (dolist (rec receivers) (dolist (pop (ir2-block-popped (block-info rec))) - (do-uses (use pop) - (unless (exit-p use) - (res (node-block use)))))) + (do-uses (use pop) + (unless (exit-p use) + (res (node-block use)))))) (dolist (dx-lvar dx-lvars) (do-uses (use dx-lvar) (res (node-block use)))) @@ -294,8 +293,8 @@ (defun stack-analyze (component) (declare (type component component)) (let* ((2comp (component-info component)) - (receivers (ir2-component-values-receivers 2comp)) - (generators (find-pushing-blocks receivers + (receivers (ir2-component-values-receivers 2comp)) + (generators (find-pushing-blocks receivers (component-dx-lvars component)))) (dolist (block generators) @@ -312,10 +311,10 @@ (do-blocks (block component) (let ((top (ir2-block-end-stack (block-info block)))) - (dolist (succ (block-succ block)) - (when (and (block-start succ) - (not (eq (ir2-block-start-stack (block-info succ)) - top))) - (discard-unused-values block succ)))))) + (dolist (succ (block-succ block)) + (when (and (block-start succ) + (not (eq (ir2-block-start-stack (block-info succ)) + top))) + (discard-unused-values block succ)))))) (values))