having trouble with flet in plot.lisp -- stack overflow



>>>>> "Robert" == Robert Dodier  writes:

    Robert> Hello,
    Robert> Trying make a plot such as plot2d (x, [x, 0, 1]),
    Robert> I am getting a stack overflow in DRAW2D (src/plot.lisp)
    Robert> in current cvs Maxima with SBCL and Clisp.
    Robert> The same code is OK with GCL, however.

    Robert> In SBCL a backtrace shows ((FLET FUN) 0.025d0) over and over.
    Robert> I guess that's originating from line 910 in src/plot.lisp,

    Robert>       (flet ((fun (x)
    Robert>            (if log-x-p
    Robert>            (funcall f (exp x))
    Robert>            (funcall f x))))

    Robert> Not sure what's going on here -- could be I'm too tired
    Robert> to consider this rationally ... Any information would be great.

Could it be that f is a special variable?

Anyway, if I change the parameter f in adaptive-plot from f to
plot-fun, and recompile the world from scratch with clisp, the plot
works just fine.  If I recompile the world from scratch without the
change, clisp gets a stack overflow.

And it's important to recompile from scratch.  Recompiling after just
changing plot.lisp doesn't tickle this bug.

In SBCL, can you type (describe 'maxima::f)?  Does it say it's a
special variable?  If not, then I don't know what the issue is.

Ray