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

Add test to verify constant folding for Enum fields

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 19
    • 17, 18, 19
    • hotspot
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: