Commit c1bb7193 authored by ram's avatar ram
Browse files

Added DELETE-COMPONENT and fixed DELETE-REF to do the right thing for

escape and cleanup lambdas.
parent 24894c42
......@@ -7,7 +7,7 @@
;;; Scott Fahlman or
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1util.lisp,v 1.34 1991/04/02 11:06:18 wlott Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1util.lisp,v 1.35 1991/04/03 12:45:37 ram Exp $")
;;; **********************************************************************
......@@ -749,7 +749,8 @@ inlines
(ecase (functional-kind leaf)
((nil :let :mv-let :escape :cleanup)
(assert (not (functional-entry-function leaf))))
(assert (not (functional-entry-function leaf)))
(delete-lambda leaf))
(delete-lambda leaf))
((:deleted :optional))))
......@@ -1139,6 +1140,24 @@ inlines
(let ((block (continuation-block prev)))
(and (block-component block)
(not (block-delete-p block))))))))
;;; DELETE-COMPONENT -- Interface
;;; Delete all the blocks and functions in Component. We scan first marking
;;; the blocks as delete-p to prevent weird stuff from being triggered by
;;; deletion.
(defun delete-component (component)
(declare (type component component))
(do-blocks (block component)
(setf (block-delete-p block) t))
(dolist (fun (component-lambdas component))
(setf (leaf-refs fun) nil)
(delete-lambda fun))
(do-blocks (block component)
(delete-block block))
;;;; Leaf hackery:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment