RFR 8199875: Require first parameter type of a condy bootstrap to be Lookup

Paul Sandoz paul.sandoz at oracle.com
Sat Apr 7 00:15:54 UTC 2018


Please review this patch to constrain constant dynamic bootstrap methods to methods whose first parameter type is MethodHandles.Lookup.

  http://cr.openjdk.java.net/~psandoz/jdk/JDK-8199875-condy-bsm-lookup/webrev/ <http://cr.openjdk.java.net/~psandoz/jdk/JDK-8199875-condy-bsm-lookup/webrev/>

We are conservatively diverging from invoke dynamic bootstrap method invocation behaviour to possibly diverge further in the future and allow for constant dynamic bootstrap methods that are invoked without the lookup/name/type arguments. The change enables further divergence in a future release without breaking compatibility.

This would make it easier to use existing methods as bootstrap methods rather than invoking via a level of indirection for explicit wrappers or using ConstantBootstraps.invoke. The experience garnered from prototyping language and low-level library features informs us this is useful.

CSR is here:

  https://bugs.openjdk.java.net/browse/JDK-8201268 <https://bugs.openjdk.java.net/browse/JDK-8201268>


More information about the core-libs-dev mailing list