Re: Iterator (Neelakantan Krishnaswami)
27 May 2002 01:15:43 -0400

          From comp.compilers

Related articles
Iterator (2002-05-23)
Re: Iterator (2002-05-27)
Re: Iterator (Randall Hyde) (2002-05-27)
Re: Iterator (Joachim Durchholz) (2002-05-27)
Re: Iterator (Hans Aberg) (2002-05-27)
Re: Iterator (Robert A Duff) (2002-05-31)
| List of all articles for this month |

From: (Neelakantan Krishnaswami)
Newsgroups: comp.compilers
Date: 27 May 2002 01:15:43 -0400
Organization: ATT Broadband
References: 02-05-125
Keywords: design
Posted-Date: 27 May 2002 01:15:43 EDT

Takuya Murata <> wrote:
> Now, I'm making a compiler. I want to support a loop feature as
> iterators like Sather.
> The problem is as if two stacks exists concurrently. I couldn't find
> a compiler construction book about how to implement iterator
> mechanism. Anyone suggestion?

Sure. At the conceptual level you want to understand what
continuations are, and how you can use them to implement coroutines.
Then to use them to implement Sather-style iterators you can look at:

  Featherweight Concurrency in a Portable Assembly Language. Ramsey and

"Concurrency" in this paper refers to coroutine-style user threads,
which are basically the same as Sather/CLU-style iterators.

Neel Krishnaswami

Post a followup to this message

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