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

Aleksey Shipilev aleksey.shipilev at gmail.com
Thu Aug 11 21:48:24 UTC 2016

On 08/11/2016 11:51 PM, Michael Haupt wrote:
> 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>:
>> 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/

 *) StringConcatFactory changes look good. I should have used arrays
from day one. (Also, my precious switches are back!)

 *) In LambdaForm.Name: @Stable only works on finals, right?
  1411         @Stable short index;


More information about the core-libs-dev mailing list