|
[Sbcl-commits] CVS: sbcl/tests dynamic-extent.impure.lisp, 1.28,
1.29
From: Nikodemus Siivola <demoss@us...> - 2008-07-20 07:52
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25999/tests Modified Files: dynamic-extent.impure.lisp Log Message: 1.0.18.26: explain why DX value generators must end their blocks * Explanation and test-case from Alexey Dejneka -- mistakes are mine in the transcription. * Note about REFs to DX closures violating the rule -- which is why we cannot assert it right now. * Use DO-USES instead of DOLIST in UPDATE-UVL-LIVE-SETS. * Fix a stray typo in comment in USE-GOOD-FOR-DX-P. Index: dynamic-extent.impure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/dynamic-extent.impure.lisp,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- dynamic-extent.impure.lisp 18 Jul 2008 20:07:59 -0000 1.28 +++ dynamic-extent.impure.lisp 20 Jul 2008 07:52:09 -0000 1.29 @@ -563,4 +563,21 @@ (def 0 (list :one) (list :two) (list :three)) (def 1 (make-array 128) (list 1 2 3 4 5 6 7 8) (list 'list)) (def 2 (list 1) (list 2 3) (list 4 5 6 7))) + +;;; Test that unknown-values coming after a DX value won't mess up the stack analysis +(defun test-update-uvl-live-sets (x y z) + (declare (optimize speed (safety 0))) + (flet ((bar (a b) + (declare (dynamic-extent a)) + (eval `(list (length ',a) ',b)))) + (list (bar x y) + (bar (list x y z) ; dx push + (list + (multiple-value-call 'list + (eval '(values 1 2 3)) ; uv push + (max y z) + ) ; uv pop + 14) + )))) +(assert (equal '((0 4) (3 ((1 2 3 5) 14))) (test-update-uvl-live-sets #() 4 5))) |
| Thread | Author | Date |
|---|---|---|
| [Sbcl-commits] CVS: sbcl/tests dynamic-extent.impure.lisp, 1.28, 1.29 | Nikodemus Siivola <demoss@us...> |