From: Nikodemus Siivola Date: Sat, 19 Jul 2008 09:48:14 +0000 (+0000) Subject: 1.0.18.23: ALL calls with DX arguments should end their blocks X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=d0ee01da90c7fee75475bd6cce9d1737f2604772;p=sbcl.git 1.0.18.23: ALL calls with DX arguments should end their blocks * Consider this a clarification of 1.0.18.22: 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. --- diff --git a/src/compiler/locall.lisp b/src/compiler/locall.lisp index d6235cd..0a463c3 100644 --- a/src/compiler/locall.lisp +++ b/src/compiler/locall.lisp @@ -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) (node-ends-block 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)) diff --git a/version.lisp-expr b/version.lisp-expr index 05cf14a..07f3a23 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".) -"1.0.18.22" +"1.0.18.23"