RFR: 8163373: Rewrite GenerateJLIClassesPlugin to avoid reflective calls into java.lang.invoke
Mandy Chung
mandy.chung at oracle.com
Wed Aug 10 00:02:41 UTC 2016
> On Aug 9, 2016, at 8:34 AM, Claes Redestad <claes.redestad at oracle.com> wrote:
>
> Hi,
>
> please review this patch to replace reflection calls into java.lang.invoke from GenerateJLIClassesPlugin with an internal API exported to jdk.jlink via JavaLangInvokeAccess/SharedSecrets.
>
> Webrev: http://cr.openjdk.java.net/~redestad/8163373/webrev.01/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8163373
MemberName.java
Since JavaLangInvokeAccess is now extended for other purpose, MemberName doesn’t seem the most appropriate place to set JavaLangInvokeAccess. Maybe Vladimir or other can recommend another class to setJavaLangInvokeAccess. If it stays in MemberName, can you move line 1156-1157 to JavaLangInvokeAccess interface.
GenerateJLIClassesHelper
I actually think it’s better to keep the generate* methods in BoundMethodHandle and DirectMethodHandle is better, closer to the relevant context/impl. This helper class doesn’t seem necessary.
GenerateJLIClassesPlugin.java
Would be good to make JLIA final.
Otherwise looks okay.
Mandy
More information about the core-libs-dev
mailing list