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

Update Unsafe getters/setters to use double-register variants

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • None
    • core-libs
    • None
    • b120

      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.

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

              Created:
              Updated:
              Resolved: