RFR: 8378793: Add ResolvedFieldEntry is_valid assert [v2]
Coleen Phillimore
coleenp at openjdk.org
Fri Feb 27 17:15:16 UTC 2026
On Fri, 27 Feb 2026 15:42:45 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> 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.
>
> 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?
I took out this clause in the assert since offset is an int, the only way it would be bigger than 0x7fffffff is if it was negative, which is checked for the first clause.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29943#discussion_r2865339326
More information about the hotspot-dev
mailing list