RFR: 8163370: Reduce number of classes loaded by common usage of java.lang.invoke
Paul Sandoz
paul.sandoz at oracle.com
Tue Aug 9 14:27:42 UTC 2016
> On 9 Aug 2016, at 05:04, Claes Redestad <claes.redestad at oracle.com> wrote:
>
> Hi,
>
> please review this set of small changes to reduce the number of classes defined and pulled in when initializing java.lang.invoke
>
> Webrev: http://cr.openjdk.java.net/~redestad/8163370/webrev/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8163370
>
> - Using an EnumMap<Wrapper, MethodHandle> in sun.misc.invoke.ValueConversions pulls in 5 EnumMap-related classes, and
> - Using result.addAll(Arrays.asList(buf).subList(0, bufCount)) rather than a simple for-loop pulls in 5 classes
> - A few private enum classes can profitably be replaced with alternative logic, removing 4 classes
>
I browsed this quite quickly, looks good.
Glad you added the assert in Wrapper.java.
Paul.
More information about the core-libs-dev
mailing list