[lworld] RFR: 8331606: [lworld] javac should consider some library classes as value classes [v2]

Vicente Romero vromero at openjdk.org
Thu May 9 14:22:12 UTC 2024


On Thu, 9 May 2024 10:20:50 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   minor refactorings
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java line 3180:
> 
>> 3178:         if (((flags & ACC_IDENTITY) != 0 && !isMigratedValueClass(flags)) || (majorVersion < V66.major && (flags & INTERFACE) == 0)) {
>> 3179:             flags |= IDENTITY_TYPE;
>> 3180:         } else if (needsValueFlag(c, flags)) {
> 
> isn't this redundant? E.g. isn't VALUE_CLASS set as soon as you see the annotation?

no, we need this path for the cases when we load a `real` value class

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1104#discussion_r1595518340



More information about the valhalla-dev mailing list