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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 12
    • repo-valhalla
    • core-libs

      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.

            mchung Mandy Chung
            mchung Mandy Chung
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: