Update of /cvsroot/sbcl/sbcl
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17428
22.214.171.124: correct nested DX handling
* RECHECK-DYNAMIC-EXTENT-LVARS must deal with nested lvars as well:
LVAR-GOOD-FOR-DX-P may return true because a nested call is actually
good for DX, not because the lvar itself _is_ automatically DX.
So, if the compiler has rearranged things a bit, we
RECHECK-DYNAMIC-EXTENT-LVARS may believe that something is DX without
the LVAR of the actual value producer being marked as such: compiler
confusion and miscompilation follows. (And no stack-allocation
failure note even though the value is actually heap allocated.)
Fixing this is just a matter of using
HANDLE-NESTED-DYNAMIC-EXTENT-LVARS in during the rechecking as well.
* ...however, doing _that_ also makes us stack allocate values from
non-DX single-use variables substituted into DX expressions (the
"otherwise inaccessible" vs "otherwise inaccessed" distinction) --
which is not good, so disable single-use variable substitution when
the target is DX unless the source is as well. One ASSERT-NO-CONSING
test case needs to be removed because of this:
(let* ((a (list 1 2 3))
(b (the list a)))
(declare (dynamic-extent b))
should not stack allocate A!
* It's not all whack-a-mole: this takes care of many previous cases
where the compiler refused to stack allocate in the presence of
non-trivial nested inline expansions, _and_ allows us the get rid of
MAYBE-PROPAGATE-DYNAMIC-EXTENT, since the recheck pass now catches
all the cases that was needed for.
RCS file: /cvsroot/sbcl/sbcl/NEWS,v
retrieving revision 1.1568
retrieving revision 1.1569
diff -u -d -r1.1568 -r1.1569
--- NEWS 17 Jul 2009 21:20:31 -0000 1.1568
+++ NEWS 18 Jul 2009 16:58:37 -0000 1.1569
@@ -1,4 +1,16 @@
;;;; -*- coding: utf-8; fill-column: 78 -*-
+changes relative to sbcl-1.0.30:
+ * improvement: stack allocation is should now be possible in all nested
+ inlining cases: failure to stack allocate when equivalent code is manually
+ open coded is now considered a bug.
+ * bug fix: moderately complex combinations of inline expansions could
+ be miscompiled if the result was declared to be dynamic extent.
+ * bug fix: in some cases no compiler note about failure to stack allocate
+ was emitted, even if the objects were in fact heap allocated.
+ * bug fix: minor violation of "otherwise inaccessible" rule for stack
+ allocation could cause objects users might reasonably expect to
+ be heap allocated to be stack allocated.
changes in sbcl-1.0.30 relative to sbcl-1.0.29:
* minor incompatible change: SB-THREAD:JOIN-THREAD-ERROR-THREAD and
SB-THREAD:INTERRUPT-THREAD-ERROR-THREAD have been deprecated in favor
RCS file: /cvsroot/sbcl/sbcl/version.lisp-expr,v
retrieving revision 1.4553
retrieving revision 1.4554
diff -u -d -r1.4553 -r1.4554
--- version.lisp-expr 17 Jul 2009 21:20:32 -0000 1.4553
+++ version.lisp-expr 18 Jul 2009 16:58:37 -0000 1.4554
@@ -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".)