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

Update Unsafe getters/setters to use double-register variants

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Resolved In Build:
      b120

      Description

      There are two major versions of the s.m.Unsafe/j.i.m.Unsafe getters/setters. The "legacy" version which takes a single long address argument, and the newer double-register addressing versions which take an Object (which may be null) and an offset.

      The legacy versions should be re-implemented to use the corresponding double-register methods, after which the VM implementation of the legacy methods can be removed.

      For example, s.m.Unsafe.getFloat(long address) should call j.i.m.Unsafe.getFloat(null, address). j.i.m.Unsafe.getFloat(long) can be removed all-together (any user of it would simply have to be updated to use the double-register equivalent). Once that's done the DECLARE_GETPUTNATIVE related logic in unsafe.cpp can be removed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mikael Mikael Vidstedt
                Reporter:
                mikael Mikael Vidstedt
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: