[code-reflection] RFR: Review FieldLoadOp [v2]

Paul Sandoz psandoz at openjdk.org
Tue Feb 13 17:10:08 UTC 2024


On Tue, 13 Feb 2024 03:01:44 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:

>> Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Delete unnecessary comment
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ReflectMethods.java line 885:
> 
>> 883:                     } else {
>> 884:                         FieldDesc fd = symbolToFieldDesc(sym, symbolSiteType(sym));
>> 885:                         // @@@ for now, for field of generic type, result type is the upper bound
> 
> When we have an unqualified access to a field of generic type, I was expecting the type variable to be the result type of the field.load operation (or something that indicates the field is of generic type), but currently the result type is the upper bound of the type variable. Maybe in the new way modeling of types, we can have that.

Ah, yes we don't model type variables (yet?). You can remove that comment if you wish, since that mapping of variable to upper bound is generally applied.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/19#discussion_r1488268085


More information about the babylon-dev mailing list