Fix debug.impure.lisp / BUG-310175 for :stack-allocatable-lists targets.
authorAlastair Bridgewater <nyef@arisu.lisphacker.com>
Tue, 25 Oct 2011 14:13:58 +0000 (10:13 -0400)
committerAlastair Bridgewater <nyef@arisu.lisphacker.com>
Tue, 25 Oct 2011 14:13:58 +0000 (10:13 -0400)
  * Not all platforms stack-allocate.  Some platforms (PPC) stack-
allocate some things, but not most things.

  * PPC, in particular, stack allocates for LIST and LIST* (the
:stack-allocatable-lists feature), but doesn't stack allocate for
CONS.  And it turns out that the compiler transforms one-arg-LIST
and two-arg-LIST* to CONS.

  * Use two-arg-LIST to force the :stack-allocatable-lists code
path, and mark the test as failing on non-:stack-allocatable-lists
targets.

tests/debug.impure.lisp

index a4c6114..01ab29a 100644 (file)
     (load (compile-file "bug-414.lisp"))
     (disassemble 'bug-414)))
 
-(with-test (:name :bug-310175)
-  (let ((dx-arg (cons t t)))
+(with-test (:name :bug-310175 :fails-on '(not :stack-allocatable-lists))
+  ;; KLUDGE: Not all DX-enabled platforms DX CONS, and the compiler
+  ;; transforms two-arg-LIST* (and one-arg-LIST) to CONS.  Therefore,
+  ;; use two-arg-LIST, which should get through to VOP LIST, and thus
+  ;; stack-allocate on a predictable set of machines.
+  (let ((dx-arg (list t t)))
     (declare (dynamic-extent dx-arg))
     (flet ((dx-arg-backtrace (x)
              (declare (optimize (debug 2)))