guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where is the backtrace?


From: Mark H Weaver
Subject: Re: Where is the backtrace?
Date: Fri, 03 Jan 2014 13:03:46 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Panicz Maciej Godek <address@hidden> writes:

> I've checked this with other implementations. Racket, Gambit and Biwa
> Scheme were equally uninformative. Kawa's backtrace was a nightmare to
> me, but perhaps someone with more knowledge would be able to infer the
> actual location of the error. Actually, the only implementation that
> exposed the exact location was Chicken. It proves that there must be a
> way to track this information in spite of TCO.

I suspect the reason Chicken kept the information is that in Chicken,
IIUC, tail calls are just normal C function calls, so the stack fills
until it reaches a certain size and then is garbage collected.

The solution I favor is that of MIT Scheme, which records the backtrace
as a chain of rings.  Each time a tail call is done, an entry is
recorded in the topmost ring, so between every two non-tail calls, up to
N tail calls are preserved.  If more than N tail calls are done in a
row, then the older ones are forgotten.

Hopefully we'll have this for Guile some day.

     Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]