Re: Stackless compilers? (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
Wed, 02 Jul 2008 12:35:35 +0200

          From comp.compilers

Related articles
Stackless compilers? (neptundancer) (2008-07-01)
Re: Stackless compilers? (Rafael Sevilla) (2008-07-02)
Re: Stackless compilers? (2008-07-02)
Re: Stackless compilers? (Matthias Blume) (2008-07-03)
| List of all articles for this month |

From: (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
Newsgroups: comp.compilers
Date: Wed, 02 Jul 2008 12:35:35 +0200
Organization: Department of Computer Science, University of Copenhagen
References: 08-07-003
Keywords: storage, design
Posted-Date: 03 Jul 2008 08:27:56 EDT

neptundancer <> writes:

> Could you recommend me some papers on constructing a stackless
> compilers? I can only find lots of links about Stackless Python, but I
> am more interested in combination of PI calculus and lambda calculus.
> I know about CubeVM, but that's just pure PI calculus, and it directly
> evaluates AST. I would like to read something about compiler design
> for stackless language, but could not find anything.

It is not clear whether you want the compiler itself to not use a
stack or the generated code to not use a stack? In the latter case,
are you limited to static memory allocation or can you allocate on a

SML of New Jersey doesn't use a stack but places everything on the
heap -- closures, activation records, data structures etc. The
motivation was that by using a single shared area, you are more
flexible and that by using a good GC, heap management isn't
(considerably) more expensive than stack management. Since the
compiler is bootstrapped, both compiler and target code are stackless.

Many Scheme compilers use a similar strategy, as they have to support
call/cc, which makes simple stacks unsuitable.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.