Re: RFR[16]: 8247681: Improve bootstrapping of unary concatenations

2020-06-17 Thread Paul Sandoz
> On Jun 17, 2020, at 3:54 AM, Claes Redestad wrote: > > On 2020-06-16 18:06, Paul Sandoz wrote: >> Looks good. > > Thanks! > >> It’s tempting to do something like this to de-dup the code with less >> potential for mistakes: >> String s = null; >> // Select the singular non-null value, if

Re: RFR[16]: 8247681: Improve bootstrapping of unary concatenations

2020-06-17 Thread Claes Redestad
On 2020-06-16 18:06, Paul Sandoz wrote: Looks good. Thanks! It’s tempting to do something like this to de-dup the code with less potential for mistakes: String s = null; // Select the singular non-null value, if any If (s0 != null && s1 == null) s = s0; else if (s0 == null && s1 != null)

Re: RFR[16]: 8247681: Improve bootstrapping of unary concatenations

2020-06-16 Thread Paul Sandoz
Looks good. It’s tempting to do something like this to de-dup the code with less potential for mistakes: String s = null; // Select the singular non-null value, if any If (s0 != null && s1 == null) s = s0; else if (s0 == null && s1 != null) s = s1; If (s != null) { if (s.isEmpty()) {

Re: RFR[16]: 8247681: Improve bootstrapping of unary concatenations

2020-06-16 Thread Jim Laskey
> On Jun 16, 2020, at 10:20 AM, Claes Redestad > wrote: > > On 2020-06-16 15:09, Jim Laskey wrote: >> Would it be helpful to have benchmarks for the other types, just in case? > > I'm not sure.. We need to be selective or we end up increasing expected > run time by a large factor. We should

Re: RFR[16]: 8247681: Improve bootstrapping of unary concatenations

2020-06-16 Thread Claes Redestad
On 2020-06-16 15:09, Jim Laskey wrote: Would it be helpful to have benchmarks for the other types, just in case? I'm not sure.. We need to be selective or we end up increasing expected run time by a large factor. We should also do a pass over most of these micros to provide saner defaults

Re: RFR[16]: 8247681: Improve bootstrapping of unary concatenations

2020-06-16 Thread Jim Laskey
Would it be helpful to have benchmarks for the other types, just in case? Don't see any tests to ensure all cases are covered. May be relying on existing tests, but... minimally tag those tests. Cheers, -- Jim > On Jun 16, 2020, at 10:00 AM, Claes Redestad > wrote: > > Hi, > > this

RFR[16]: 8247681: Improve bootstrapping of unary concatenations

2020-06-16 Thread Claes Redestad
Hi, this patch specializes bootstrapping of unary concatenation expressions. Such expressions can be reduced to the canonical String.valueOf "stringifier" for any primitive argument, but needs a special stringifier for reference arguments since we need to produce a new String to be compliant