500 _mirrors[T_INT] = _int_mirror; 501 _mirrors[T_FLOAT] = _float_mirror; 502 _mirrors[T_DOUBLE] = _double_mirror; 503 _mirrors[T_BYTE] = _byte_mirror; 504 _mirrors[T_BOOLEAN] = _bool_mirror; 505 _mirrors[T_CHAR] = _char_mirror; 506 _mirrors[T_LONG] = _long_mirror; 507 _mirrors[T_SHORT] = _short_mirror; 508 _mirrors[T_VOID] = _void_mirror; 509 //_mirrors[T_OBJECT] = _object_klass->java_mirror(); 510 //_mirrors[T_ARRAY] = _object_klass->java_mirror(); 511 } 512 513 void Universe::fixup_mirrors(TRAPS) { 514 // Bootstrap problem: all classes gets a mirror (java.lang.Class instance) assigned eagerly, 515 // but we cannot do that for classes created before java.lang.Class is loaded. Here we simply 516 // walk over permanent objects created so far (mostly classes) and fixup their mirrors. Note 517 // that the number of objects allocated at this point is very small. 518 assert(SystemDictionary::Class_klass_loaded(), "java.lang.Class should be loaded"); 519 HandleMark hm(THREAD); 520 // Cache the start of the static fields 521 InstanceMirrorKlass::init_offset_of_static_fields(); 522 523 GrowableArray <Klass*>* list = java_lang_Class::fixup_mirror_list(); 524 int list_length = list->length(); 525 for (int i = 0; i < list_length; i++) { 526 Klass* k = list->at(i); 527 assert(k->is_klass(), "List should only hold classes"); 528 EXCEPTION_MARK; 529 java_lang_Class::fixup_mirror(k, CATCH); 530 } 531 delete java_lang_Class::fixup_mirror_list(); 532 java_lang_Class::set_fixup_mirror_list(NULL); 533 } 534 535 #define assert_pll_locked(test) \ 536 assert(Heap_lock->test(), "Reference pending list access requires lock") 537 538 #define assert_pll_ownership() assert_pll_locked(owned_by_self) 539 540 oop Universe::reference_pending_list() { 541 if (Thread::current()->is_VM_thread()) { | 500 _mirrors[T_INT] = _int_mirror; 501 _mirrors[T_FLOAT] = _float_mirror; 502 _mirrors[T_DOUBLE] = _double_mirror; 503 _mirrors[T_BYTE] = _byte_mirror; 504 _mirrors[T_BOOLEAN] = _bool_mirror; 505 _mirrors[T_CHAR] = _char_mirror; 506 _mirrors[T_LONG] = _long_mirror; 507 _mirrors[T_SHORT] = _short_mirror; 508 _mirrors[T_VOID] = _void_mirror; 509 //_mirrors[T_OBJECT] = _object_klass->java_mirror(); 510 //_mirrors[T_ARRAY] = _object_klass->java_mirror(); 511 } 512 513 void Universe::fixup_mirrors(TRAPS) { 514 // Bootstrap problem: all classes gets a mirror (java.lang.Class instance) assigned eagerly, 515 // but we cannot do that for classes created before java.lang.Class is loaded. Here we simply 516 // walk over permanent objects created so far (mostly classes) and fixup their mirrors. Note 517 // that the number of objects allocated at this point is very small. 518 assert(SystemDictionary::Class_klass_loaded(), "java.lang.Class should be loaded"); 519 HandleMark hm(THREAD); 520 521 if (!UseSharedSpaces) { 522 // Cache the start of the static fields 523 InstanceMirrorKlass::init_offset_of_static_fields(); 524 } 525 526 GrowableArray <Klass*>* list = java_lang_Class::fixup_mirror_list(); 527 int list_length = list->length(); 528 for (int i = 0; i < list_length; i++) { 529 Klass* k = list->at(i); 530 assert(k->is_klass(), "List should only hold classes"); 531 EXCEPTION_MARK; 532 java_lang_Class::fixup_mirror(k, CATCH); 533 } 534 delete java_lang_Class::fixup_mirror_list(); 535 java_lang_Class::set_fixup_mirror_list(NULL); 536 } 537 538 #define assert_pll_locked(test) \ 539 assert(Heap_lock->test(), "Reference pending list access requires lock") 540 541 #define assert_pll_ownership() assert_pll_locked(owned_by_self) 542 543 oop Universe::reference_pending_list() { 544 if (Thread::current()->is_VM_thread()) { |