From: Larry V. <re...@us...> - 2008-12-18 19:45:31
|
Nikodemus Siivola skrev: > On Thu, Dec 18, 2008 at 10:01 PM, Larry Valkama > <re...@us...> wrote: > >> Thanks for the quick answer. Great stuff, I thought it was provoking a >> bug, but not. It was ok on x86, but there we use allocate-on-heap instead. > > That's funky. For me it stack allocated happily on x86 as well (and of > course lands in the debugger with a bogus object when trying to print > the return value.) > > I'm guessing you either have an older SBCL on x86 (where stack > allocation doesn't happen in default compilation policy), stack > allocation explicitly turned off, or possibly the full evaluator > turned off so the function was never compiled. > > Cheers, > > -- Nikodemus > Oh, it was a while since I compiled on x86, its 1.0.18: shrek@gudrun:~$ sbcl This is SBCL 1.0.18, an implementation of ANSI Common Lisp. More information about SBCL is available at <http://www.sbcl.org/>. SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information. * (defun a () (let ((v (make-array '(42) :element-type 'single-float))) (declare (dynamic-extent v)) v)) A * (a) #(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0) * |