Loop handle?

Charles Oliver Nutter headius at headius.com
Fri Apr 9 00:58:48 PDT 2010


Yes, that thought crossed my mind. If tail calling were there, the
only missing piece would be allowing a downstream handle (toward the
target) to be able to be rebound to an upstream handle. Currently
handles are a one-way street.

On Fri, Apr 9, 2010 at 2:20 AM, Emmanuel Castro
<emmanuel.castro at laposte.net> wrote:
> Maybe there is no need to have a special handle for loops if there is an
> (hidden?) support for tail call in method handles ;-)
> I remind me a blog page from John Rose:
> http://blogs.sun.com/jrose/entry/tailcalls_meet_invokedynamic
>
> There is questioning about putting coroutine in Java7. Will Java7 include
> the tail-call patch? I am not sure that it is compatible with the indy
> patch. Is there a plan to make it compatible?
> - Emmanuel
> 2010/4/9 Charles Oliver Nutter <headius at headius.com>
>>
>>
>> It occurred to me today I may have never asked about this, but why is
>> there no looping handle? (or have I missed something?)
>>
>> loopHandle(MethodHandle condition, MethodHandle body)
>>
>> In the current set of handles, I don't believe there's a way to
>> construct a loop, since you can only link handles upwards from a
>> target (i.e. there's no way to construct a handle to jump back to the
>> condition again).
>>
>> Have I missed an obvious detail, or is this a gap in the set of handles?
>>
>> I ask because I still have a perverse desire to follow up on an idea
>> John Rose gave me to implement JRuby's interpreter entirely with
>> MethodHandles...with the obvious result being that by simply composing
>> a set of handles they'll already be compiled to native code for me :)
>>
>> - Charlie
>> _______________________________________________
>> mlvm-dev mailing list
>> mlvm-dev at openjdk.java.net
>> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>>
>>
>
>
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>
>


More information about the mlvm-dev mailing list