Jens Rieks <[EMAIL PROTECTED]> wrote: > On Wednesday 07 April 2004 17:42, Leopold Toetsch wrote: >> >> Further, in C<rawRead> P1 is stored away (and invoked later), which >> isn't allowed. But cloning it doesn't help because the continuation >> context is still wrong.
I've this now running. $ ../parrot -t --gc-debug examples/streams/SubHello.imc 2>/dev/null read:[hello] read:[world!] read:[parrot] read:[is cool] Where a return continuation is reused the code should look like: $P1 = clone P1 # store $P1 The "clone" for return continuation resets the recycle flag (on both sides) so that e.g. a Sub can exit through this P1 multiple times. The code is quite hackish and I'm still not sure, if we can keep this optimization, we'll see. leo