Converting MethodHandle into reflective Method instance
Eric Bodden
eric.bodden at ec-spride.de
Fri Jan 11 06:16:46 PST 2013
Thanks Duncan, for the fast response.
To clarify, when you say...
> The call site created by a bootstrap method will normally
> change its own target during execution into a a guardWithTest chain which
> would dispatch to several targets, and when it gets too big for that may
> start fetching and directly invoking other method handles or passing them
> back to an exact invoker.
... do you mean that this is implemented with in the java.lang.invoke
API or do you mean that client implementations using that API will
normally generate such a guardWithTest chain?
> I think your only real option is intercept the calls that get the method
> handles in the first place, so you'd need to transform most calls to
> Lookup objects and unreflect(). That shouldn't be too hard a bit of code
> transformation to do.
That's a good idea which we can try. Unfortunately it will require
modifications to the JDK. That's something I was trying to avoid.
Cheers,
Eric
More information about the mlvm-dev
mailing list