< prev index next >

src/share/vm/classfile/javaClasses.cpp

Print this page
rev 11483 : [mq]: webrev.01
rev 11484 : [mq]: webrev.02


 852         set_fixup_module_field_list(list);
 853       }
 854       k->class_loader_data()->inc_keep_alive();
 855       fixup_module_field_list()->push(k());
 856     }
 857   } else {
 858     if (fixup_mirror_list() == NULL) {
 859       GrowableArray<Klass*>* list =
 860        new (ResourceObj::C_HEAP, mtClass) GrowableArray<Klass*>(40, true);
 861       set_fixup_mirror_list(list);
 862     }
 863     fixup_mirror_list()->push(k());
 864   }
 865 }
 866 
 867 void java_lang_Class::fixup_module_field(KlassHandle k, Handle module) {
 868   assert(_module_offset != 0, "must have been computed already");
 869   java_lang_Class::set_module(k->java_mirror(), module());
 870 }
 871 

 872 int  java_lang_Class::oop_size(oop java_class) {
 873   assert(_oop_size_offset != 0, "must be set");
 874   return java_class->int_field(_oop_size_offset);
 875 }
 876 void java_lang_Class::set_oop_size(oop java_class, int size) {
 877   assert(_oop_size_offset != 0, "must be set");
 878   java_class->int_field_put(_oop_size_offset, size);
 879 }

 880 int  java_lang_Class::static_oop_field_count(oop java_class) {
 881   assert(_static_oop_field_count_offset != 0, "must be set");
 882   return java_class->int_field(_static_oop_field_count_offset);
 883 }
 884 void java_lang_Class::set_static_oop_field_count(oop java_class, int size) {
 885   assert(_static_oop_field_count_offset != 0, "must be set");
 886   java_class->int_field_put(_static_oop_field_count_offset, size);
 887 }
 888 
 889 oop java_lang_Class::protection_domain(oop java_class) {
 890   assert(_protection_domain_offset != 0, "must be set");
 891   return java_class->obj_field(_protection_domain_offset);
 892 }
 893 void java_lang_Class::set_protection_domain(oop java_class, oop pd) {
 894   assert(_protection_domain_offset != 0, "must be set");
 895   java_class->obj_field_put(_protection_domain_offset, pd);
 896 }
 897 
 898 void java_lang_Class::set_component_mirror(oop java_class, oop comp_mirror) {
 899   assert(_component_mirror_offset != 0, "must be set");




 852         set_fixup_module_field_list(list);
 853       }
 854       k->class_loader_data()->inc_keep_alive();
 855       fixup_module_field_list()->push(k());
 856     }
 857   } else {
 858     if (fixup_mirror_list() == NULL) {
 859       GrowableArray<Klass*>* list =
 860        new (ResourceObj::C_HEAP, mtClass) GrowableArray<Klass*>(40, true);
 861       set_fixup_mirror_list(list);
 862     }
 863     fixup_mirror_list()->push(k());
 864   }
 865 }
 866 
 867 void java_lang_Class::fixup_module_field(KlassHandle k, Handle module) {
 868   assert(_module_offset != 0, "must have been computed already");
 869   java_lang_Class::set_module(k->java_mirror(), module());
 870 }
 871 
 872 // Note, oop_size is set in CollectedHeap::class_allocate()
 873 int  java_lang_Class::oop_size(oop java_class) {
 874   assert(_oop_size_offset != 0, "must be set");
 875   int size = java_class->int_field(_oop_size_offset);
 876   assert(size > 0, "size not set or stomped on: %d", size);
 877   return size;


 878 }
 879 
 880 int  java_lang_Class::static_oop_field_count(oop java_class) {
 881   assert(_static_oop_field_count_offset != 0, "must be set");
 882   return java_class->int_field(_static_oop_field_count_offset);
 883 }
 884 void java_lang_Class::set_static_oop_field_count(oop java_class, int size) {
 885   assert(_static_oop_field_count_offset != 0, "must be set");
 886   java_class->int_field_put(_static_oop_field_count_offset, size);
 887 }
 888 
 889 oop java_lang_Class::protection_domain(oop java_class) {
 890   assert(_protection_domain_offset != 0, "must be set");
 891   return java_class->obj_field(_protection_domain_offset);
 892 }
 893 void java_lang_Class::set_protection_domain(oop java_class, oop pd) {
 894   assert(_protection_domain_offset != 0, "must be set");
 895   java_class->obj_field_put(_protection_domain_offset, pd);
 896 }
 897 
 898 void java_lang_Class::set_component_mirror(oop java_class, oop comp_mirror) {
 899   assert(_component_mirror_offset != 0, "must be set");


< prev index next >