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

Add test to verify constant folding for Enum fields

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17, 18, 19
    • Fix Version/s: 19
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b22

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: