RFR: 8357782: JVM JIT Causes Static Initialization Order Issue [v2]

Manuel Hässig mhaessig at openjdk.org
Thu Jun 12 07:33:15 UTC 2025


On Wed, 11 Jun 2025 21:24:18 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Manuel Hässig has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Logical simplification
>>   
>>   Co-authored-by: Dean Long <17332032+dean-long at users.noreply.github.com>
>
> src/hotspot/share/c1/c1_ValueMap.hpp line 193:
> 
>> 191:     ciInstanceKlass* c = x->klass();
>> 192:     if (c != nullptr && !c->is_initialized() &&
>> 193:         ((c->is_loaded() && c->has_class_initializer()) || !c->is_loaded())) {
> 
> Suggestion:
> 
>         (!c->is_loaded() || c->has_class_initializer()) {

Thank you for this simplification. I forgot about short-circuiting in this case...

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25725#discussion_r2141930308


More information about the hotspot-compiler-dev mailing list