|Iterator email@example.com (2002-05-23)|
|Re: Iterator firstname.lastname@example.org (2002-05-27)|
|Re: Iterator email@example.com (Randall Hyde) (2002-05-27)|
|Re: Iterator firstname.lastname@example.org (Joachim Durchholz) (2002-05-27)|
|Re: Iterator email@example.com (Hans Aberg) (2002-05-27)|
|Re: Iterator bobduff@shell01.TheWorld.com (Robert A Duff) (2002-05-31)|
|From:||firstname.lastname@example.org (Neelakantan Krishnaswami)|
|Date:||27 May 2002 01:15:43 -0400|
|Posted-Date:||27 May 2002 01:15:43 EDT|
Takuya Murata <email@example.com> 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.
Return to the
Search the comp.compilers archives again.