hotspot/src/share/vm/classfile/javaClasses.cpp
changeset 39695 946f1321c075
parent 39402 cf2142b8d40f
child 40102 23ff468d69b4
equal deleted inserted replaced
39694:e8e42da000c5 39695:946f1321c075
   869   java_lang_Class::set_module(k->java_mirror(), module());
   869   java_lang_Class::set_module(k->java_mirror(), module());
   870 }
   870 }
   871 
   871 
   872 int  java_lang_Class::oop_size(oop java_class) {
   872 int  java_lang_Class::oop_size(oop java_class) {
   873   assert(_oop_size_offset != 0, "must be set");
   873   assert(_oop_size_offset != 0, "must be set");
   874   return java_class->int_field(_oop_size_offset);
   874   int size = java_class->int_field(_oop_size_offset);
   875 }
   875   assert(size > 0, "Oop size must be greater than zero, not %d", size);
       
   876   return size;
       
   877 }
       
   878 
   876 void java_lang_Class::set_oop_size(oop java_class, int size) {
   879 void java_lang_Class::set_oop_size(oop java_class, int size) {
   877   assert(_oop_size_offset != 0, "must be set");
   880   assert(_oop_size_offset != 0, "must be set");
       
   881   assert(size > 0, "Oop size must be greater than zero, not %d", size);
   878   java_class->int_field_put(_oop_size_offset, size);
   882   java_class->int_field_put(_oop_size_offset, size);
   879 }
   883 }
       
   884 
   880 int  java_lang_Class::static_oop_field_count(oop java_class) {
   885 int  java_lang_Class::static_oop_field_count(oop java_class) {
   881   assert(_static_oop_field_count_offset != 0, "must be set");
   886   assert(_static_oop_field_count_offset != 0, "must be set");
   882   return java_class->int_field(_static_oop_field_count_offset);
   887   return java_class->int_field(_static_oop_field_count_offset);
   883 }
   888 }
   884 void java_lang_Class::set_static_oop_field_count(oop java_class, int size) {
   889 void java_lang_Class::set_static_oop_field_count(oop java_class, int size) {