From: Alexey Dejneka Date: Fri, 2 Jan 2004 05:58:35 +0000 (+0000) Subject: 0.8.7.4: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=f73c1f391342c797b8daebe4e8c27e5923341b6d;p=sbcl.git 0.8.7.4: * Fix PFD's MISC.249: when deleting LET, also delete all references to its variables. --- diff --git a/TLA b/TLA index 6f0b6a7..5a410fc 100644 --- a/TLA +++ b/TLA @@ -24,6 +24,7 @@ making them more consistent. N new: number, as in e.g. N-PASSES or N-WORD-BITS old: conventional prefix for temporary variables used to implement evaluate-only-once semantics in macros + NLE non-local entry NLX non-local exit (in compiler IR2) SB storage base (in compiler IR2) SC storage class (in compiler IR2) diff --git a/src/compiler/ir1util.lisp b/src/compiler/ir1util.lisp index 5d228d5..9483c78 100644 --- a/src/compiler/ir1util.lisp +++ b/src/compiler/ir1util.lisp @@ -814,7 +814,16 @@ (let ((bind-block (node-block bind))) (mark-for-deletion bind-block)) (let ((home (lambda-home clambda))) - (setf (lambda-lets home) (delete clambda (lambda-lets home))))) + (setf (lambda-lets home) (delete clambda (lambda-lets home)))) + ;; KLUDGE: In presence of NLEs we cannot always understand that + ;; LET's BIND dominates its body [for a LET "its" body is not + ;; quite its]; let's delete too dangerous for IR2 stuff. -- + ;; APD, 2004-01-01 + (dolist (var (lambda-vars clambda)) + (flet ((delete-node (node) + (mark-for-deletion (node-block node)))) + (mapc #'delete-node (leaf-refs var)) + (mapc #'delete-node (lambda-var-sets var))))) (t ;; Function has no reachable references. (dolist (ref (lambda-refs clambda)) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 124ffd3..96e1c8f 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -1003,3 +1003,19 @@ 0)))) 0))) 3040851270 1664281 -1340106197))) + +;;; MISC.249 +(assert (zerop + (funcall + (compile + nil + '(lambda (a b) + (declare (notinline <=)) + (declare (optimize (speed 2) (space 3) (safety 0) + (debug 1) (compilation-speed 3))) + (if (if (<= 0) nil nil) + (labels ((%f9 (f9-1 f9-2 f9-3) + (ignore-errors 0))) + (dotimes (iv4 5 a) (%f9 0 0 b))) + 0))) + 1 2))) diff --git a/version.lisp-expr b/version.lisp-expr index 8f60ab7..146721d 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.7.3" +"0.8.7.4"