Keisuke Nishida <[EMAIL PROTECTED]> writes:
> It seems the current Guile does not do properly tail-call
> when a procedure is called through map.
I may be wrong, as I'm very out of practice wrt reading the Guile
evaluator code (ouch), but here is what happens:
`map' is implemented as a primitive, so it calls `scm_apply', which in
turn makes a _fresh_ call to the debugging evaluator (because `bar' is
traced). the first procedure call in a fresh evaluator is always
shown as non-tail. this is because the tailness of the current call
is determined by the ENTER_APPLY macro by looking whether the current
frame is traced. right after this check, the very same macro marks
the current frame as traced, so naturally the very _first_ frame is
never marked in time. I don't know if this is a bug or not, we should
ask Mikael (where are you, Mikael?).
so, anyway, what you see is an artifact of the debugging evaluator,
the calls themselves are still tail-calls.
--
You have a tendency to feel you are superior to most computers.
_______________________________________________
Bug-guile mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-guile