src/share/vm/oops/arrayKlass.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File bug_jdk8033150 Sdiff src/share/vm/oops

src/share/vm/oops/arrayKlass.cpp

Print this page




  47 #else
  48   int size = header_size + vtable_len;
  49 #endif
  50   return align_object_size(size);
  51 }
  52 
  53 
  54 Klass* ArrayKlass::java_super() const {
  55   if (super() == NULL)  return NULL;  // bootstrap case
  56   // Array klasses have primary supertypes which are not reported to Java.
  57   // Example super chain:  String[][] -> Object[][] -> Object[] -> Object
  58   return SystemDictionary::Object_klass();
  59 }
  60 
  61 
  62 oop ArrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) {
  63   ShouldNotReachHere();
  64   return NULL;
  65 }
  66 
  67 Method* ArrayKlass::uncached_lookup_method(Symbol* name, Symbol* signature) const {
  68   // There are no methods in an array klass but the super class (Object) has some
  69   assert(super(), "super klass must be present");
  70   return super()->uncached_lookup_method(name, signature);
  71 }
  72 
  73 ArrayKlass::ArrayKlass(Symbol* name) {
  74   set_name(name);
  75 
  76   set_super(Universe::is_bootstrapping() ? (Klass*)NULL : SystemDictionary::Object_klass());
  77   set_layout_helper(Klass::_lh_neutral_value);
  78   set_dimension(1);
  79   set_higher_dimension(NULL);
  80   set_lower_dimension(NULL);
  81   set_component_mirror(NULL);
  82   // Arrays don't add any new methods, so their vtable is the same size as
  83   // the vtable of klass Object.
  84   int vtable_size = Universe::base_vtable_size();
  85   set_vtable_length(vtable_size);
  86   set_is_cloneable(); // All arrays are considered to be cloneable (See JLS 20.1.5)
  87 }
  88 
  89 
  90 // Initialization of vtables and mirror object is done separatly from base_create_array_klass,




  47 #else
  48   int size = header_size + vtable_len;
  49 #endif
  50   return align_object_size(size);
  51 }
  52 
  53 
  54 Klass* ArrayKlass::java_super() const {
  55   if (super() == NULL)  return NULL;  // bootstrap case
  56   // Array klasses have primary supertypes which are not reported to Java.
  57   // Example super chain:  String[][] -> Object[][] -> Object[] -> Object
  58   return SystemDictionary::Object_klass();
  59 }
  60 
  61 
  62 oop ArrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) {
  63   ShouldNotReachHere();
  64   return NULL;
  65 }
  66 
  67 Method* ArrayKlass::uncached_lookup_method(Symbol* name, Symbol* signature, bool ignore_overpass) const {
  68   // There are no methods in an array klass but the super class (Object) has some
  69   assert(super(), "super klass must be present");
  70   return super()->uncached_lookup_method(name, signature, ignore_overpass);
  71 }
  72 
  73 ArrayKlass::ArrayKlass(Symbol* name) {
  74   set_name(name);
  75 
  76   set_super(Universe::is_bootstrapping() ? (Klass*)NULL : SystemDictionary::Object_klass());
  77   set_layout_helper(Klass::_lh_neutral_value);
  78   set_dimension(1);
  79   set_higher_dimension(NULL);
  80   set_lower_dimension(NULL);
  81   set_component_mirror(NULL);
  82   // Arrays don't add any new methods, so their vtable is the same size as
  83   // the vtable of klass Object.
  84   int vtable_size = Universe::base_vtable_size();
  85   set_vtable_length(vtable_size);
  86   set_is_cloneable(); // All arrays are considered to be cloneable (See JLS 20.1.5)
  87 }
  88 
  89 
  90 // Initialization of vtables and mirror object is done separatly from base_create_array_klass,


src/share/vm/oops/arrayKlass.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File