RFR (S) 8149835: StringConcatFactory should emit classes with the same package as the host class

Aleksey Shipilev aleksey.shipilev at oracle.com
Wed Feb 17 09:36:42 UTC 2016


On 02/16/2016 11:59 PM, Andrej Golovnin wrote:
> Hi Aleksey,
> 
>>  http://cr.openjdk.java.net/~shade/8149835/webrev.jdk.01/
> 
> 701                     return (pkg != null ? pkg.getName().replace(".", "/") + "/" : "") + "Stubs$$StringConcat";
> 702                 } else {
> 703                     return hostClass.getName().replace(".", "/") + "$$StringConcat”;
> 
> Maybe you should use here the character based String#replace()-method as it is faster and
> does not produce as much garbage as the CharSequence based method does.

Yes:
  http://cr.openjdk.java.net/~shade/8149835/webrev.jdk.02/
  http://cr.openjdk.java.net/~shade/8149835/webrev.langtools.01/

I have also changed to Lookup.IMPL_LOOKUP when looking up the method
from U.defineAnonymousClass-loaded bytecode stub. This make the load
sequence consistent with LambdaMetafactory.

It still passes JPRT, java/lang/String and jake build.

Cheers,
-Aleksey








More information about the core-libs-dev mailing list