At 08:14 PM 8/12/2002 -0700, Sean O'Rourke wrote:
>On Mon, 12 Aug 2002, Melvin Smith wrote:
> > >4) Parrot_Coroutine's 'init' is not longer used and can go away, I guess
> > >I could remove it in a future patch ... ok so that's not a question
> >
> > I wish this wouldn't go away. I think passing the constructor argument
> > for any PMC is a good optimization. How to do it flexibly is another thing.
>
>It's not the constructor argument, I think.  Coroutines used to have two
>different code pointers, one for the first call, and one for their yield

Eek, sorry. Its embarrassing to forget my own code. I remember now
and I did read your patch. I liked the "feel" of the yield op, but who cares
since its machine generated anyway?

>point.  When I removed those ops awhile back, I also simplified coroutines
>to only use one code pointer.  The first time a coroutine's called, it
>points to wherever that coro starts.  Afterwards, it points to the last
>yield point.  This seems to give us the old semantics without the extra
>pointer (not a big deal).

You are correct. My first implementation was meant to be easy to understand
and lead the way for more hackers to improve. Mission accomplished. :)

-Melvin


Reply via email to