Update of /cvsroot/sbcl/sbcl/src/compiler
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11974/src/compiler
188.8.131.52: ALL calls with DX arguments should end their blocks
* Consider this a clarification of 184.108.40.206: MAP-BLOCK-NLXES will
miss calls that don't end their blocks.
If let-conversion happens, as is the case most of the time, this is
not an issue, since the LAMBDA-CALL-LEXENV will hold the lexenv
with the cleanup.
A :LET functional, however, should never appear in
RECOGNIZE-DYNAMIC-EXTENT-LVARS, since let-conversion doesn't happen
until later -- so the conditional was bogus.
So: delete the conditional, and write a comment that points in
the place where we depend on the block-endingness.
* Add a FIXME note to another DX related place where we make nodes
end their blocks, which I don't quite understand.
RCS file: /cvsroot/sbcl/sbcl/src/compiler/locall.lisp,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- locall.lisp 18 Jul 2008 20:07:59 -0000 1.86
+++ locall.lisp 19 Jul 2008 09:48:15 -0000 1.87
@@ -48,6 +48,12 @@
;; Stack analysis wants DX value generators to end their
;; blocks. Uses of mupltiple used LVARs already end their blocks,
;; so we just need to process used-once LVARs.
+ ;; FIXME: Is this true? I cannot trigger any bad behaviour if I nuke this
+ ;; form, and the only assumption regarding block ends I see in in stack
+ ;; analysis is the one made by MAP-BLOCK-NLXES, which assumes that nodes
+ ;; with cleanups in their lexenv end their blocks. If this one is
+ ;; necessary, we should explain why in more detail. --NS 2008-07-19
(when (node-p uses)
;; If this LVAR's USE is good for DX, it is either a CAST, or it
@@ -76,11 +82,9 @@
(not (lvar-dynamic-extent arg)))
append (handle-nested-dynamic-extent-lvars arg) into dx-lvars
finally (when dx-lvars
- ;; A call to non-LET with DX args must end its block,
- ;; otherwise stack analysis will not see the combination and
- ;; the associated cleanup/entry.
- (unless (eq :let (functional-kind fun))
- (node-ends-block call))
+ ;; Stack analysis requires that the CALL ends the block, so
+ ;; that MAP-BLOCK-NLXES sees the cleanup we insert here.
+ (node-ends-block call)
(binding* ((before-ctran (node-prev call))
(nil (ensure-block-start before-ctran))
(block (ctran-block before-ctran))