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

Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: 12
    • Component/s: core-libs
    • Labels:

      Description

      http://mail.openjdk.java.net/pipermail/valhalla-dev/2018-June/004450.html

      Unsafe::getObject returns a reference to an object. Similarly Unsafe::putObject sets a reference in the given base+offset. It's proposed to rename Unsafe xxxObject to xxxReference that will make the API very clear xxxReference are getters/setters for a reference (instance of object class). In the future getters and setters for values would be named xxxValue.

      When we have value types: A reference can refer to an object (instance of object class) or a value (instance of a value class), or it can be null. Value flattening is a storage tactic which must be detected in a given array class or field; otherwise, it’s all about simple pointer-shaped references.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mchung Mandy Chung
              Reporter:
              mchung Mandy Chung
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: