RFR: 8163878: Remove unnecessary bridge methods, allocations in java.lang.invoke

Claes Redestad claes.redestad at oracle.com
Thu Aug 11 17:55:38 UTC 2016


while further untangling the bootstrap of java.lang.invoke I found a 
number of trivial/minor/small contrivances, including:

- calling of private methods and constants in parent classes generates 
and heavily exercise synthetic bridge methods; carefully making more of 
these package-private cleans the air
- use of MethodType.parameterList() and .subList() pull in extra classes 
in places I missed during JDK-8163370 analysis; preferring 
parameterType/parameterCount/Arrays.copyOf also reduces allocations
- removed some pointless bookkeeping and duplicate checks of constant 
placeholders in InvokerBytecodeGenerator
- since I was already changing around in StringConcatFactory I reworked 
some changes I made during JDK-8163370 that proved controversial

Webrev: http://cr.openjdk.java.net/~redestad/8163878/webrev.01/
Bug: https://bugs.openjdk.java.net/browse/JDK-8163878

All in all -45K executed bytecodes and 9 fewer loaded classes in my 
favored startup test.



More information about the core-libs-dev mailing list