[lworld] RFR: 8321039: [lworld] Substitutability code must recognize new annotations [v2]

Mandy Chung mchung at openjdk.org
Wed Dec 6 18:17:39 UTC 2023


On Wed, 6 Dec 2023 02:34:46 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Mandy Chung has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review comment
>
> src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java line 689:
> 
>> 687:                                                       boolean isValue, boolean isFlat, boolean isNullRestricted, Class<?> ftype) {
>> 688:         int ftypeKind = ftypeKind(ftype, isValue);
>> 689:         int afIndex = afIndex(formOp, isVolatile, isFlat, ftypeKind);
> 
> The null-restriction info should be encoded in the cache key too.

Fixed.

> src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template line 53:
> 
>> 51: #end[Reference]
>> 52: 
>> 53:         FieldInstanceReadOnly(Class<?> receiverType, long fieldOffset{#if[Object]?, Class<?> fieldType, boolean nullRestricted}) {
> 
> This `nullRestricted` can be conditional to references, too

I leave it as is.  We will do more work in this file to support the null-restricted types.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/960#discussion_r1417784035
PR Review Comment: https://git.openjdk.org/valhalla/pull/960#discussion_r1417790045



More information about the valhalla-dev mailing list