[lworld] RFR: 8355076: [lworld] Incorrect declared_nonstatic_fields computation [v3]

Quan Anh Mai qamai at openjdk.org
Wed Apr 23 13:12:57 UTC 2025


On Wed, 23 Apr 2025 12:52:09 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> @TobiHartmann 
>> 
>>> Isn't that sufficient?
>> 
>> It can be. I think, however, it is confusing to have `non_static_fields` referring to different things when a type is a concrete class and when it is an abstract class. I also think that `declared_nonstatic_fields` seems not to be something that is only applicable to value classes. As a result, moving it to `ciInstanceKlass` seems to be a logical move.
>> 
>>> I could also not reproduce [JDK-8354322](https://bugs.openjdk.org/browse/JDK-8354322) (see details in JBS).
>> 
>> I believe you need `@Strict @NullRestricted` so that the field is inlined.
>
>> As a result, moving it to ciInstanceKlass seems to be a logical move.
> 
> Okay, I agree.
> 
>> I believe you need @Strict @NullRestricted so that the field is inlined.
> 
> Ah yes, of course. I'll give it another try later this week.

@TobiHartmann Thanks a lot for your reviews and testing!

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

PR Comment: https://git.openjdk.org/valhalla/pull/1438#issuecomment-2824249483


More information about the valhalla-dev mailing list