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

Claes Redestad claes.redestad at oracle.com
Thu Apr 25 12:20:16 UTC 2019


Hi,

sorry for the delay, got distracted by other things. Switch back:

http://cr.openjdk.java.net/~redestad/8222852/open.01/

Passed a sanity tier1 run.

/Claes

On 2019-04-23 13:27, Aleksey Shipilev wrote:
> I'd keep the switch in the second loop, like this:
> 
>    for (RecipeElement el : recipe.getElements()) {
>        switch (el.getTag()) {
>            case TAG_ARG:
>                ...
>                break;
>            case TAG_CONST:
>                // Constants are already handled in the code above.
>                break;
>            default:
>                throw new StringConcatException("Unhandled tag: " + el.getTag());
>        }
>    }


More information about the core-libs-dev mailing list