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
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).
/s
Probably an artifact of my failed experiments. :)
Originally Dan said subs would need their own stacks. Either way,
they should be part of Parrot_Context now anyway.
>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.
-Melvin
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