X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Flocall.lisp;h=ae4ad080dba81e34272ceb09d17fe891dd6178ad;hb=93c941d86b264637de20aa1b713757b704d4c1a6;hp=0257739250b227ab7c02bede0b3823a22e26c447;hpb=a74b0bdb483504f6faddf8089f848f61ed94b92a;p=sbcl.git diff --git a/src/compiler/locall.lisp b/src/compiler/locall.lisp index 0257739..ae4ad08 100644 --- a/src/compiler/locall.lisp +++ b/src/compiler/locall.lisp @@ -944,12 +944,21 @@ (cond ((not return)) ((or next-block call-return) (unless (block-delete-p (node-block return)) + (when (and (node-tail-p call) + call-return + (not (eq (node-cont call) + (return-result call-return)))) + ;; We do not care to give a meaningful continuation to + ;; a tail combination, but here we need it. + (delete-continuation-use call) + (add-continuation-use call (return-result call-return))) (move-return-uses fun call (or next-block (node-block call-return))))) (t (aver (node-tail-p call)) (setf (lambda-return call-fun) return) - (setf (return-lambda return) call-fun)))) + (setf (return-lambda return) call-fun) + (setf (lambda-return fun) nil)))) (move-let-call-cont fun) (values))