Charles Oliver Nutter
headius at headius.com
Fri Nov 13 09:48:55 PST 2009
On Fri, Nov 13, 2009 at 11:27 AM, Jochen Theodorou <blackdrag at gmx.org> wrote:
> Charles Oliver Nutter schrieb:
>> This is basically what all the bytecode-weaving coroutine/continuation
>> libraries do. Jython also does this for their
>> lambda/generator/coroutine stuff so they can jump in and out. The
>> primary issue is that you can only jump in and out of the methods you
>> have performed this transformation on. That means you can't call
>> through any untransformed code and expect to be able to resume it.
> but isn't here yield responsible for that? Does this means the coroutine
> support here will allow calling yield from outside or from deep down the
> stack? It will it mean the stack will be kept? This was not clear from
> the first post. Since only one Thread is used I assumed it might not be
> the case.
Here's the Java stack leading up to the yield call in my previous example:
at ruby.__dash_e__BlockCallback$block_0$RUBY$__block__xx1.call(Unknown Source)
All of this would have to be instrumented to be resumable. Basically
an impossible task.
Here's another way to explain it that: what if your calls require
reflection, as most in Groovy do? You can't make a reflective call
resumable, so you're stuck.
More information about the mlvm-dev