RFR: 8222852: Reduce String concat combinator tree shapes by folding constants into prependers

Claes Redestad claes.redestad at oracle.com
Mon Apr 29 14:57:45 UTC 2019

Hi Rémi,

On 2019-04-29 13:36, Remi Forax wrote:
> That's nice !

thanks for reviewing!

> In StringConcatFactory, i will change
>    prefixConstant + constantValue (resp suffixConstant + constantValue)
> to
>    prefixConstant.concat(constantValue)
> to not depend on any string concat implementations of javac.

It has some strange appeal, but it isn't necessary (java.base is
explicitly excluded from using ISC).

- We use regular concatenation in a few places in StringConcatFactory
- Removing all cycles (to make it possible to compile java.base with
ISC enabled?) wouldn't be enough: we'd need to enforce nothing creeps
back in in all code StringConcatFactory depends on (which includes much
of java.lang.invoke and ASM). Not impossible, but impractical.


More information about the core-libs-dev mailing list