RFR (S): 8191681: Unsafe accesses should use field_offset_to_byte_offset()
Andrew Haley
aph at redhat.com
Fri Nov 24 17:44:22 UTC 2017
On 24/11/17 14:45, Erik Österlund wrote:
>
> Before the Access API, there was a no-op conversion function in
> unsafe.cpp for getting the byte offset of a field offset from unsafe as
> a jlong. Now, the field offsets *are* byte offsets, so the conversion
> did not do anything. But I guess it could be useful nevertheless for
> abstraction purposes.
This came up when I was working on Unsafe, and I think it's really a
bit of nonsense. These days the byte offsets might even be absolute
addresses, and the speculation that one day we might change our minds
is rather pointless. I could find the discussion from that thread if
you're interested.
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-runtime-dev
mailing list