RFR: 8378793: Add ResolvedFieldEntry is_valid assert [v2]

Matias Saavedra Silva matsaave at openjdk.org
Fri Feb 27 15:48:22 UTC 2026


On Fri, 27 Feb 2026 13:52:45 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Please review this small change to add an assert for values in ResolvedFieldEntry, which was useful for debugging at one time.
>> Tested with tier1-3
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Make assert_is_valid() only debug and only on ResolvedFieldEntry initialization.  Change fill_in to initialize flags also from fieldDescriptor, so set_flags and set_bytecodes can be private.

Changes and cleanup look good, thanks! I have one nit though

src/hotspot/share/oops/resolvedFieldEntry.cpp line 76:

> 74: void ResolvedFieldEntry::assert_is_valid() const {
> 75:   assert(field_holder()->is_instance_klass(), "should be instanceKlass");
> 76:   assert(field_offset() >= instanceOopDesc::base_offset_in_bytes() && field_offset() < 0x7fffffff,

Is there a constant somewhere with the value `0x7fffffff` we can use?

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

Marked as reviewed by matsaave (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/29943#pullrequestreview-3867637774
PR Review Comment: https://git.openjdk.org/jdk/pull/29943#discussion_r2864957798


More information about the hotspot-dev mailing list