[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Re: SWIG stuff again
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] Re: SWIG stuff again |
Date: |
Mon, 18 Oct 2004 11:19:33 +0200 |
On Mon, 18 Oct 2004 12:40:43 +0400, Sergey Khorev
<address@hidden> wrote:
> > the stack-frames. This is the method used to implement continuations
> > and tail-calls. I recommend reading Henry Baker's paper
> > "Cheney on the MTA" for a better description of the compilation
> > scheme used in Chicken.
>
> BTW does Chicken implementation share the same restriction as in
> paper, i.e. only _local_ tail-recursion?
>
Tail-recursion is fully global. Tail-calls do allocate storage, but do not
_retain_ it, unless it's needed (i.e. unless it's a non-tail call). So
tail-calls
will not run out of memory, which is the important point in this context.
Chicken does detect certain tight, non-allocating local loops and
generates true C loops for those.
cheers,
felix