RFR: JDK-8273914: Indy string concat changes order of operations [v3]
Jan Lahoda
jlahoda at openjdk.java.net
Tue Oct 12 07:26:54 UTC 2021
On Fri, 8 Oct 2021 18:22:42 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:
>> This change makes string concatenation call `toString` on the arguments eagerly, to preserve the correct evaluation order of the arguments and the calls to `toString`.
>
> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
>
> Document the rationale for the jasm changes
How about code like:
StringBuilder builder2 = new StringBuilder("foo");
Object oo = builder2;
oo += "" + builder2.append("bar");
Should that be covered as well? From looking at the patch (not really trying it), it does not seem to be covered?
-------------
PR: https://git.openjdk.java.net/jdk/pull/5844
More information about the compiler-dev
mailing list