hotspot/src/share/vm/oops/klass.cpp
changeset 4571 80b553bddc26
parent 4094 1f424b2b2171
child 4584 e2a449e8cc6f
equal deleted inserted replaced
4569:f372ea9e5ed4 4571:80b553bddc26
   215   }
   215   }
   216   if (k == NULL) {
   216   if (k == NULL) {
   217     set_super(NULL);
   217     set_super(NULL);
   218     oop_store_without_check((oop*) &_primary_supers[0], (oop) this->as_klassOop());
   218     oop_store_without_check((oop*) &_primary_supers[0], (oop) this->as_klassOop());
   219     assert(super_depth() == 0, "Object must already be initialized properly");
   219     assert(super_depth() == 0, "Object must already be initialized properly");
   220   } else if (k != super() || k == SystemDictionary::object_klass()) {
   220   } else if (k != super() || k == SystemDictionary::Object_klass()) {
   221     assert(super() == NULL || super() == SystemDictionary::object_klass(),
   221     assert(super() == NULL || super() == SystemDictionary::Object_klass(),
   222            "initialize this only once to a non-trivial value");
   222            "initialize this only once to a non-trivial value");
   223     set_super(k);
   223     set_super(k);
   224     Klass* sup = k->klass_part();
   224     Klass* sup = k->klass_part();
   225     int sup_depth = sup->super_depth();
   225     int sup_depth = sup->super_depth();
   226     juint my_depth  = MIN2(sup_depth + 1, (int)primary_super_limit());
   226     juint my_depth  = MIN2(sup_depth + 1, (int)primary_super_limit());
   368 }
   368 }
   369 
   369 
   370 void Klass::remove_from_sibling_list() {
   370 void Klass::remove_from_sibling_list() {
   371   // remove receiver from sibling list
   371   // remove receiver from sibling list
   372   instanceKlass* super = superklass();
   372   instanceKlass* super = superklass();
   373   assert(super != NULL || as_klassOop() == SystemDictionary::object_klass(), "should have super");
   373   assert(super != NULL || as_klassOop() == SystemDictionary::Object_klass(), "should have super");
   374   if (super == NULL) return;        // special case: class Object
   374   if (super == NULL) return;        // special case: class Object
   375   if (super->subklass() == this) {
   375   if (super->subklass() == this) {
   376     // first subklass
   376     // first subklass
   377     super->set_subklass(_next_sibling);
   377     super->set_subklass(_next_sibling);
   378   } else {
   378   } else {