On Fri, Nov 16, 2012 at 10:24:44PM +0100, Axel Svensson wrote: > Perhaps the interpreter could push the call to the global variable? > That way, the global variable would hold a list of the calls currently > on stack. > ... > Would it be a contained change of the C code, or spread out > everywhere? Also, would this imply severe performance costs?
I feel so. The only reason why PicoLisp didn't support a more extensive backtrace (until now) was the cost involved, compared to its relatively unimportant gain. In normal runtime operation, the backtrace information isn't needed, and each and every call to a Lisp function triggers otherwise unnecessary stack operations. But these operations involve just a push and a pop. Using a list instead of the stack would explode that cost, causing periodic runs of the garbage collector. This is surely not worth the gain. Then it would be much more efficient to extend the C stack binding structures. Still I don't think it is worth the effort. Cheers, - Alex -- UNSUBSCRIBE: mailto:email@example.com?subject=Unsubscribe