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

Constant folding final field accesses does not take class redefinition into account

    Details

      Description

      Since JDK-8157181, the VM is disallowed to fold final field accesses if the final field is modified outside of initializers. However, as pointed out by Vladimir Ivanov, the changes by JDK-8157181 do not take account for class redefinition. That is supposed to be addressed by the current issue.

      Here is the relevant part of the discussion during the review of JDK-8157181:

      "Unfortunately, it doesn't (and, moreover, can't) cover class
      redefinition: if a new version of a method contains final field update,
      all the generated code which embed previous value should be invalidated.

      The only way to handle such case now is to add nmethod dependencies when
      static final field loads are constant folded.

      Please, file a separate bug (P4) for that and let's decide how to
      proceed with it later."

      For more details see the email thread on hotspot-compiler-dev about JDK-8157181:

      http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2016-June/023313.html

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vlivanov Vladimir Ivanov
                Reporter:
                zmajo Zoltan Majo (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: