Loop handle?

Charles Oliver Nutter headius at headius.com
Thu Apr 8 23:46:55 PDT 2010


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


More information about the mlvm-dev mailing list