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");
|
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 int size = java_class->int_field(_oop_size_offset);
875 assert(size > 0, "size not set or stomped on: %d", size);
876 return size;
877 }
878 void java_lang_Class::set_oop_size(oop java_class, int size) {
879 assert(_oop_size_offset != 0, "must be set");
880 assert(size > 0, "total object size must be positive: %d", size);
881 java_class->int_field_put(_oop_size_offset, size);
882 }
883
884 int java_lang_Class::static_oop_field_count(oop java_class) {
885 assert(_static_oop_field_count_offset != 0, "must be set");
886 return java_class->int_field(_static_oop_field_count_offset);
887 }
888 void java_lang_Class::set_static_oop_field_count(oop java_class, int size) {
889 assert(_static_oop_field_count_offset != 0, "must be set");
890 java_class->int_field_put(_static_oop_field_count_offset, size);
891 }
892
893 oop java_lang_Class::protection_domain(oop java_class) {
894 assert(_protection_domain_offset != 0, "must be set");
895 return java_class->obj_field(_protection_domain_offset);
896 }
897 void java_lang_Class::set_protection_domain(oop java_class, oop pd) {
898 assert(_protection_domain_offset != 0, "must be set");
899 java_class->obj_field_put(_protection_domain_offset, pd);
900 }
901
902 void java_lang_Class::set_component_mirror(oop java_class, oop comp_mirror) {
903 assert(_component_mirror_offset != 0, "must be set");
|