RFR: 8339112: Move JVM Klass flags out of AccessFlags [v3]

Dean Long dlong at openjdk.org
Fri Aug 30 22:28:30 UTC 2024


On Fri, 30 Aug 2024 21:35:49 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/opto/library_call.cpp line 3777:
>> 
>>> 3775:   Node* p = basic_plus_adr(kls, in_bytes(Klass::misc_flags_offset()));
>>> 3776:   Node* mods = make_load(nullptr, p, TypeInt::UBYTE, T_BOOLEAN, MemNode::unordered);
>>> 3777:   return generate_mods_flags_guard(mods, modifier_mask, modifier_bits, region);
>> 
>> Suggestion:
>> 
>>   return generate_mods_flags_guard(mods, modifier_mask, modifier_bits, region, Klass::misc_flags_offset(), TypeInt::UBYTE, T_BOOLEAN);
>> 
>> This looks much better, but can't you leave the basic_plus_adr and make_load in generate_mods_flags_guard, and pass in the needed specialization?
>
> Really, this is better? it adds three parameters.  I made this change.

It reduces duplicate code, which is usually good.  Yes, I like it better.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20719#discussion_r1739475163


More information about the graal-dev mailing list