< prev index next >

src/hotspot/share/oops/arrayKlass.cpp

Print this page




  63 }
  64 
  65 // find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined
  66 Klass* ArrayKlass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const {
  67   // There are no fields in an array klass but look to the super class (Object)
  68   assert(super(), "super klass must be present");
  69   return super()->find_field(name, sig, fd);
  70 }
  71 
  72 Method* ArrayKlass::uncached_lookup_method(const Symbol* name,
  73                                            const Symbol* signature,
  74                                            OverpassLookupMode overpass_mode) const {
  75   // There are no methods in an array klass but the super class (Object) has some
  76   assert(super(), "super klass must be present");
  77   // Always ignore overpass methods in superclasses, although technically the
  78   // super klass of an array, (j.l.Object) should not have
  79   // any overpass methods present.
  80   return super()->uncached_lookup_method(name, signature, Klass::skip_overpass);
  81 }
  82 
  83 ArrayKlass::ArrayKlass(Symbol* name) :

  84   _dimension(1),
  85   _higher_dimension(NULL),
  86   _lower_dimension(NULL) {
  87     // Arrays don't add any new methods, so their vtable is the same size as
  88     // the vtable of klass Object.
  89     set_vtable_length(Universe::base_vtable_size());
  90     set_name(name);
  91     set_super(Universe::is_bootstrapping() ? (Klass*)NULL : SystemDictionary::Object_klass());
  92     set_layout_helper(Klass::_lh_neutral_value);
  93     set_is_cloneable(); // All arrays are considered to be cloneable (See JLS 20.1.5)
  94     JFR_ONLY(INIT_ID(this);)
  95 }
  96 
  97 
  98 // Initialization of vtables and mirror object is done separatly from base_create_array_klass,
  99 // since a GC can happen. At this point all instance variables of the ArrayKlass must be setup.
 100 void ArrayKlass::complete_create_array_klass(ArrayKlass* k, Klass* super_klass, ModuleEntry* module_entry, TRAPS) {
 101   ResourceMark rm(THREAD);
 102   k->initialize_supers(super_klass, NULL, CHECK);
 103   k->vtable().initialize_vtable(false, CHECK);




  63 }
  64 
  65 // find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined
  66 Klass* ArrayKlass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const {
  67   // There are no fields in an array klass but look to the super class (Object)
  68   assert(super(), "super klass must be present");
  69   return super()->find_field(name, sig, fd);
  70 }
  71 
  72 Method* ArrayKlass::uncached_lookup_method(const Symbol* name,
  73                                            const Symbol* signature,
  74                                            OverpassLookupMode overpass_mode) const {
  75   // There are no methods in an array klass but the super class (Object) has some
  76   assert(super(), "super klass must be present");
  77   // Always ignore overpass methods in superclasses, although technically the
  78   // super klass of an array, (j.l.Object) should not have
  79   // any overpass methods present.
  80   return super()->uncached_lookup_method(name, signature, Klass::skip_overpass);
  81 }
  82 
  83 ArrayKlass::ArrayKlass(Symbol* name, int klass_id) :
  84   Klass(klass_id),
  85   _dimension(1),
  86   _higher_dimension(NULL),
  87   _lower_dimension(NULL) {
  88     // Arrays don't add any new methods, so their vtable is the same size as
  89     // the vtable of klass Object.
  90     set_vtable_length(Universe::base_vtable_size());
  91     set_name(name);
  92     set_super(Universe::is_bootstrapping() ? (Klass*)NULL : SystemDictionary::Object_klass());
  93     set_layout_helper(Klass::_lh_neutral_value);
  94     set_is_cloneable(); // All arrays are considered to be cloneable (See JLS 20.1.5)
  95     JFR_ONLY(INIT_ID(this);)
  96 }
  97 
  98 
  99 // Initialization of vtables and mirror object is done separatly from base_create_array_klass,
 100 // since a GC can happen. At this point all instance variables of the ArrayKlass must be setup.
 101 void ArrayKlass::complete_create_array_klass(ArrayKlass* k, Klass* super_klass, ModuleEntry* module_entry, TRAPS) {
 102   ResourceMark rm(THREAD);
 103   k->initialize_supers(super_klass, NULL, CHECK);
 104   k->vtable().initialize_vtable(false, CHECK);


< prev index next >