At 09:50 AM 6/8/2002 +0200, Jerome Vouillon wrote: >Alternatively, I think you can just replace the definition of yield >by: > > inline op yield (in INT) { > struct Parrot_Sub * sub = > (struct Parrot_Sub*)interpreter->pmc_reg.registers[0]->data; > sub->init = OFFSET($1); > stack_pop(interpreter, interpreter->control_stack, > &dest, STACK_ENTRY_DESTINATION); > goto ADDRESS(dest); > }
What would that accomplish? If yield is to suspend the current coroutine and return back to the controlling context, you don't need an argument to yield, unless you wish to yield and jump to a different address than you were called from, but is that the semantics of a co-routine yielding? -Melvin