On Oct 22, 2010, at 2:19 AM, Rémi Forax wrote:

> And also:
> 
>   CallSite myBSM(MethodHandles.Lookup look, String name, MethodType type);
>   CallSite myBSM(MethodHandles.Lookup look, String name, MethodType type, 
> Object arg);
>   CallSite myBSM(MethodHandles.Lookup look, String name, MethodType type, 
> Object... args);
> 
> 
> A bootstrap method can return a call site (CallSite) or a method handle 
> (MethodHandle).
> The idea is to return a CallSite if the target method can change and a 
> MethodHandle
> if the target of an invokedynamic never change.

Yes.

In fact, since the BSM is called by invokeGeneric, myBSM can also return 
Object, and dynamically choose whether to bind finally with a MH or mutably 
with a CS.

-- John

_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to