Dan Sugalski wrote: [ update continuation PMC at call time ]
Here are some possibilities to achieve this:
- invokecc (this is slow)
- a new opcode e.g. C<updatecc> (update continuation ctx)
- toss invokecc's current functionality and use this opcode to update the context and call the sub.
I like option 2.
Fine.
... I'd also like to be able to manipulate the stacks in a context, pushing things on them, changing values on them, and generally messing about with the things, so I'm all for it.
Do you have some examples for a usage of such manipulations? I thought that a return continuations should exactly match the state of the caller, so that the C<updatecc> op would do the work.
But there are for sure some hacks, that might need some:
updatecc <.stack> <.action> item
leo