RFR: 8286190: Add test to verify constant folding for Enum fields
Tobias Hartmann
thartmann at openjdk.java.net
Fri May 6 06:52:35 UTC 2022
On Thu, 5 May 2022 13:35:37 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> There is the [JDK-8161245](https://bugs.openjdk.java.net/browse/JDK-8161245) to make compilers trust Enum final fields. It was implicitly implemented by [JDK-8234049](https://bugs.openjdk.java.net/browse/JDK-8234049), which added the wildcard trust for everything in java/lang:
> https://github.com/openjdk/jdk/blob/c5a0687f80367a3a284dfd56781c371826264d3b/src/hotspot/share/ci/ciField.cpp#L230
>
> It would be better to have the explicit test that verifies the constant folding of Enum fields indeed happens.
>
> Additional testing:
> - [x] Linux x86_64 fastdebug, new test passes
> - [x] Linux x86_64 release, new test passes
> - [x] Linux x86_32 fastdebug, new test passes
Looks good.
-------------
Marked as reviewed by thartmann (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/8551
More information about the hotspot-compiler-dev
mailing list