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.
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.
- relates to
-
JDK-6509032 (bf) Monomorphic implementations for Direct and Heap versions of X-Buffer
-
- Open
-
-
JDK-8154592 Exceptions thrown from unsafe operations should be synchronous
-
- Closed
-