Integrated: 8350892: [JVMCI] Align ResolvedJavaType.getInstanceFields with Class.getDeclaredFields

Doug Simon dnsimon at openjdk.org
Fri Mar 21 13:03:17 UTC 2025


On Fri, 28 Feb 2025 23:46:54 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

> The current order of fields returned by `ResolvedJavaType.getInstanceFields` is a) not well specified and b) different than the order of fields used almost everywhere else in HotSpot. This PR aligns the order of `getInstanceFields` with `Class.getDeclaredFields()`.
> 
> It also makes `ciInstanceKlass::_nonstatic_fields` use the same order which unifies how escape analysis and deoptimization treats fields across C2 and JVMCI.

This pull request has now been integrated.

Changeset: 0cb110eb
Author:    Doug Simon <dnsimon at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/0cb110ebb7f8d184dd855f64c5dd7924c8202b3d
Stats:     89 lines in 6 files changed: 18 ins; 32 del; 39 mod

8350892: [JVMCI] Align ResolvedJavaType.getInstanceFields with Class.getDeclaredFields

Reviewed-by: yzheng, never, thartmann

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

PR: https://git.openjdk.org/jdk/pull/23849


More information about the hotspot-dev mailing list