On Thu, 29 Jan 2026 08:04:19 GMT, Joel Sikström <[email protected]> wrote:

> Hello,
> 
> We should be explicit when naming variables that refer to "fields" and state 
> whether we mean static or nonstatic fields.
> 
> I've also done a bit of cleanup in 
> `FieldLayoutBuilder::compute_inline_class_layout()`, which calls 
> `has_nonstatic_fields`. The "has_nonstatic_fields" property is inherited from 
> the superklass whenever a klass instance is created, so we only have to check 
> the property once on the "first" superklass.
> 
> Testing:
> * Oracle's tier1-3, jdk_valhalla and hotspot_valhalla
> * I added an assert to sanity test that the while loop I removed in 
> `FieldLayoutBuilder::compute_inline_class_layout()` never gets past the 
> "first" superklass, which didn't hit in tier1-3.

This pull request has now been integrated.

Changeset: 8b04a6e3
Author:    Joel Sikström <[email protected]>
Committer: Chen Liang <[email protected]>
URL:       
https://git.openjdk.org/valhalla/commit/8b04a6e3d92fd0b39e49456824d877dae8df9534
Stats:     36 lines in 4 files changed: 2 ins; 13 del; 21 mod

8376652: [lworld] Explicit and consistent names for nonstatic fields in 
FieldLayout

Reviewed-by: fparain, phubner

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

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

Reply via email to