[Openmcl-devel] tail calls in 1.3 IDE?

Gail Zacharias gz at clozure.com
Thu Aug 13 13:55:37 PDT 2009


At 8/13/2009 04:35 PM, Brian Hayes wrote:

>As far as I can tell, tail-call optimization has stopped working in
>1.3 versions of CCL when running under the IDE. Are others seeing this
>same change in behavior? Was the change deliberate? Is there some
>setting that controls it?

It's controlled by optimization declarations.  There was a bug that 
caused the IDE to start up with non-standard settings, I believe it's 
fixed in the trunk but maybe not in 1.3. Anyway doing (declaim 
(optimize (safety 1) (debug 1) (speed 1))) should fix it.


>Details:
>
>(defun tail-test (n)
>   (if (zerop n)
>     'succeed
>     (tail-test (1- n))))
>
>(tail-test 1000000)
>
>This succeeds under CCL 1.2 in the IDE (I've tested PPC and x8664
>versions). It also succeeds in 1.3 when running in the terminal. But
>it fails with a stack overflow in 1.3 under the IDE. The backtrace
>shows some 60,000 stack frames. (I've tested fresh downloads of the
>prepackaged .dmg for PPC and x8664 as well as a newly svn-updated 1.3-
>r12575M  (DarwinX8664). )
>
>It looks as if a tracing or debugging facility may have been turned on
>by default in the IDE. If so, can someone show me the magic switch
>that turns it off?
>
>Thanks.
>
>Brian Hayes
>
>_______________________________________________
>Openmcl-devel mailing list
>Openmcl-devel at clozure.com
>http://clozure.com/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list