equal
deleted
inserted
replaced
206 ObjectLocker ol(this_oop, THREAD); |
206 ObjectLocker ol(this_oop, THREAD); |
207 |
207 |
208 // abort if someone beat us to the initialization |
208 // abort if someone beat us to the initialization |
209 if (!this_oop->is_not_initialized()) return; // note: not equivalent to is_initialized() |
209 if (!this_oop->is_not_initialized()) return; // note: not equivalent to is_initialized() |
210 |
210 |
211 ClassState old_state = this_oop->_init_state; |
211 ClassState old_state = this_oop->init_state(); |
212 link_class_impl(this_oop, true, THREAD); |
212 link_class_impl(this_oop, true, THREAD); |
213 if (HAS_PENDING_EXCEPTION) { |
213 if (HAS_PENDING_EXCEPTION) { |
214 CLEAR_PENDING_EXCEPTION; |
214 CLEAR_PENDING_EXCEPTION; |
215 // Abort if linking the class throws an exception. |
215 // Abort if linking the class throws an exception. |
216 |
216 |
2477 #ifdef ASSERT |
2477 #ifdef ASSERT |
2478 void instanceKlass::set_init_state(ClassState state) { |
2478 void instanceKlass::set_init_state(ClassState state) { |
2479 bool good_state = as_klassOop()->is_shared() ? (_init_state <= state) |
2479 bool good_state = as_klassOop()->is_shared() ? (_init_state <= state) |
2480 : (_init_state < state); |
2480 : (_init_state < state); |
2481 assert(good_state || state == allocated, "illegal state transition"); |
2481 assert(good_state || state == allocated, "illegal state transition"); |
2482 _init_state = state; |
2482 _init_state = (u1)state; |
2483 } |
2483 } |
2484 #endif |
2484 #endif |
2485 |
2485 |
2486 |
2486 |
2487 // RedefineClasses() support for previous versions: |
2487 // RedefineClasses() support for previous versions: |