RFR: JDK-8205549 JDK-8205698 Support of flattened values in Unsafe

Frederic Parain frederic.parain at oracle.com
Wed Jun 27 22:10:14 UTC 2018



> On Jun 27, 2018, at 17:49, Karen Kinnear <karen.kinnear at oracle.com> wrote:
> 
> Frederic,
> 
> Many thanks for doing this so quickly!
> The code looks good.
> 
> I only had one minor question - 
> 
> 1. allocate_buffered_or_heap_instance
>   - I assume that for unsafe you always want a heap instance?

Why would you force a heap allocation? The reference being
returned is local the the thread.


>   - I recognize that today this will always return a heap instance

Correct.

Thanks,

Fred

> 
> thanks,
> Karen
> 
>> On Jun 27, 2018, at 5:17 PM, Frederic Parain <frederic.parain at oracle.com> wrote:
>> 
>> Please review this changeset which adds support for flattened values to the Unsafe API.
>> 
>> http://cr.openjdk.java.net/~fparain/Unsafe/webrev.02/index.html
>> 
>> This changeset addresses the following issues:
>> - reading from /writing to a flattenable/flattened field with Unsafe
>> - null-check when writing to a flattenable field
>> - initialization barrier when reading an uninitialized static value field with Unsafe
>> - enforcing values immutability even when using Unsafe
>> - reading from /writing to a value array with Unsafe
>> - null-check when writing to a value array with Unsafe
>> 
>> Thanks,
>> 
>> Fred
>> 
> 




More information about the valhalla-dev mailing list