[lworld] RFR: 8281295: Prototype serialization/deserialization using Unsafe. [v3]

Roger Riggs rriggs at openjdk.org
Thu Oct 13 14:09:31 UTC 2022


On Wed, 12 Oct 2022 21:25:55 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove asserts checking for null in cases where null signals there is no local class
>>   and the fields of the class in the stream are to be read and discarded.
>
> src/java.base/share/classes/java/io/ObjectStreamClass.java line 2100:
> 
>> 2098:                 vals[offsets[i]] = switch (typeCodes[i]) {
>> 2099:                     case 'L', '[' ->
>> 2100:                             unsafe.isFlattened(f)
> 
> Flattened field has `Q` descriptor.  This PR doesn't support primitive class, right?

As far as I know, a "value type" (aka primitive class) is a value class and the only difference from the Unsafe API point of view is whether it is flattened or not. There may be some additional work for JEP 401.

-------------

PR: https://git.openjdk.org/valhalla/pull/761



More information about the valhalla-dev mailing list