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

Michael Haupt michael.haupt at oracle.com
Thu Aug 11 20:51:28 UTC 2016


Hi Claes,

thumbs up - I'd appreciate if Aleksey could take a glance at the changes in the String concatenation logic though.

Best,

Michael

> Am 11.08.2016 um 10:55 schrieb Claes Redestad <claes.redestad at oracle.com>:
> 
> Hi,
> 
> 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.
> 
> Thanks!
> 
> /Claes

-- 

 <http://www.oracle.com/>
Dr. Michael Haupt | Principal Member of Technical Staff
Phone: +49 331 200 7277 | Fax: +49 331 200 7561
Oracle Java Platform Group | LangTools Team | Nashorn
Oracle Deutschland B.V. & Co. KG | Schiffbauergasse 14 | 14467 Potsdam, Germany

ORACLE Deutschland B.V. & Co. KG | Hauptverwaltung: Riesstraße 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V. | Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
 <http://www.oracle.com/commitment>	Oracle is committed to developing practices and products that help protect the environment



More information about the core-libs-dev mailing list