RFR: JDK-8273914: Indy string concat changes order of operations [v4]

Liam Miller-Cushon cushon at openjdk.java.net
Tue Oct 12 16:29:51 UTC 2021


On Tue, 12 Oct 2021 06:18:13 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> (The `WellKnownTypes` test still only exercises the indy strategies, because it's testing logic that only exists in those strategies.)
>
> But still, we probably want to confirm that `inline` strategy yields the same answer in `WellKnownTypes`? That's my thinking why to test `inline`: that is a baseline.

I agree in general about using `inline` as a baseline, but `WellKnownTypes` doesn't currently check the output of string concatenation, it checks the signature of the `invokedynamic` it find in the test case.

What do you have in mind for `inline` here? Should I update the test to assert on the output of string concatenation (and tolerate not being able to find an `invokedynamic`, which could make the coverage for the indy strategies more fragile)? Or add a different test with similar inputs, and check the output of string concatenation on primitives and boxes?

I think it might make sense to rely on other tests to ensure `inline` and the `indy` strategies produce the same results, and use `WellKnownTypes` as a test just for `shouldConvertToStringEagerly`, which is only used by the `indy` strategies.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5844


More information about the hotspot-runtime-dev mailing list