RFD: C2: Poor code quality for Unsafe

Andrew Haley aph at redhat.com
Wed Jul 27 13:54:49 UTC 2016


On 27/07/16 14:45, Paul Sandoz wrote:
> 
>> On 27 Jul 2016, at 15:36, Andrew Haley <aph at redhat.com> wrote:
>>
>> On 27/07/16 13:57, Paul Sandoz wrote:
>>> What JDK build are you using? dev, hs, or hs-comp?
>>
>> hs-comp.
> 
> Only hs has the buggy fix for ByteBufferAs-X-Buffer to use Unsafe to
> read/write as wider primitives, so hs-comp will resort to
> reading/writing as bytes and composing/decomposing as view types via
> Bits.java.

Yabbut: remember, I reviewed that patch, so my copy does.  This code
quality issue came up during that review.  I determined that it was a
HotSpot issue.

>> Sure.  It doesn't seem to make any difference to the exact issue I'm
>> addressing.
> 
> Thanks. Perhaps it will if Unsafe is used to read wider primitives?

No.  I now have everything that you have, I think.  :-)

Andrew.


More information about the hotspot-dev mailing list