Skip to content
Snippets Groups Projects
Commit 97120e3b authored by ram's avatar ram
Browse files

Rolled back to 1.2, since there seem to be serious problems with the

deleted-contiuation merging.
parent 3eab2e6d
No related branches found
No related tags found
No related merge requests found
...@@ -365,7 +365,7 @@ ...@@ -365,7 +365,7 @@
;;; Joining is easy when the successor's Start continuation is the same from ;;; Joining is easy when the successor's Start continuation is the same from
;;; our Last's Cont. If they differ, then we can still join when the last ;;; our Last's Cont. If they differ, then we can still join when the last
;;; continuation has no next and the next continuation has no uses. In this ;;; continuation has no next and the next continuation has no uses. In this
;;; case, we replace the last continuation with the next before joining the ;;; case, we replace the next continuation with the last before joining the
;;; blocks. ;;; blocks.
;;; ;;;
(defun join-successor-if-possible (block) (defun join-successor-if-possible (block)
...@@ -380,27 +380,24 @@ ...@@ -380,27 +380,24 @@
(lambda (block-lambda block)) (lambda (block-lambda block))
(next-lambda (block-lambda next))) (next-lambda (block-lambda next)))
(cond ((or (rest (block-pred next)) (cond ((or (rest (block-pred next))
(not (eq (continuation-use last-cont) last))
(eq next block) (eq next block)
(not (eq (lambda-home lambda) (lambda-home next-lambda))) (not (eq (lambda-home lambda) (lambda-home next-lambda)))
(not (eq (find-enclosing-cleanup cleanup) (not (eq (find-enclosing-cleanup cleanup)
(find-enclosing-cleanup next-cleanup)))) (find-enclosing-cleanup next-cleanup))))
nil) nil)
((and (eq last-cont next-cont) ((eq last-cont next-cont)
(eq (continuation-use last-cont) last))
(join-blocks block next) (join-blocks block next)
t) t)
((block-start-uses next) ((and (null (block-start-uses next))
nil) (eq (continuation-kind last-cont) :inside-block))
((member (continuation-kind last-cont) '(:deleted :inside-block)) (let ((next-node (continuation-next next-cont)))
(assert (not (continuation-dest next-cont))) (assert (not (continuation-dest next-cont)))
(unless (eq (continuation-kind last-cont) :deleted) (delete-continuation next-cont)
(let ((dest (continuation-dest last-cont))) (setf (node-prev next-node) last-cont)
(when dest (setf (continuation-next last-cont) next-node)
(substitute-continuation next-cont last-cont))) (setf (block-start next) last-cont)
(delete-continuation last-cont)) (join-blocks block next))
(delete-continuation-use last)
(add-continuation-use last next-cont)
(join-blocks block next)
t) t)
(t (t
nil)))))) nil))))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment