Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8286190

Add test to verify constant folding for Enum fields

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 17, 18, 19
    • hotspot
    • b22

      There is the JDK-8161245 to make compilers trust Enum final fields. It was implicitly implemented by 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.

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: