277 |
277 |
278 // Method array. |
278 // Method array. |
279 Array<Method*>* _methods; |
279 Array<Method*>* _methods; |
280 // Default Method Array, concrete methods inherited from interfaces |
280 // Default Method Array, concrete methods inherited from interfaces |
281 Array<Method*>* _default_methods; |
281 Array<Method*>* _default_methods; |
282 // Interface (Klass*s) this class declares locally to implement. |
282 // Interfaces (InstanceKlass*s) this class declares locally to implement. |
283 Array<Klass*>* _local_interfaces; |
283 Array<InstanceKlass*>* _local_interfaces; |
284 // Interface (Klass*s) this class implements transitively. |
284 // Interfaces (InstanceKlass*s) this class implements transitively. |
285 Array<Klass*>* _transitive_interfaces; |
285 Array<InstanceKlass*>* _transitive_interfaces; |
286 // Int array containing the original order of method in the class file (for JVMTI). |
286 // Int array containing the original order of method in the class file (for JVMTI). |
287 Array<int>* _method_ordering; |
287 Array<int>* _method_ordering; |
288 // Int array containing the vtable_indices for default_methods |
288 // Int array containing the vtable_indices for default_methods |
289 // offset matches _default_methods offset |
289 // offset matches _default_methods offset |
290 Array<int>* _default_vtable_indices; |
290 Array<int>* _default_vtable_indices; |
413 Array<int>* default_vtable_indices() const { return _default_vtable_indices; } |
413 Array<int>* default_vtable_indices() const { return _default_vtable_indices; } |
414 void set_default_vtable_indices(Array<int>* v) { _default_vtable_indices = v; } |
414 void set_default_vtable_indices(Array<int>* v) { _default_vtable_indices = v; } |
415 Array<int>* create_new_default_vtable_indices(int len, TRAPS); |
415 Array<int>* create_new_default_vtable_indices(int len, TRAPS); |
416 |
416 |
417 // interfaces |
417 // interfaces |
418 Array<Klass*>* local_interfaces() const { return _local_interfaces; } |
418 Array<InstanceKlass*>* local_interfaces() const { return _local_interfaces; } |
419 void set_local_interfaces(Array<Klass*>* a) { |
419 void set_local_interfaces(Array<InstanceKlass*>* a) { |
420 guarantee(_local_interfaces == NULL || a == NULL, "Just checking"); |
420 guarantee(_local_interfaces == NULL || a == NULL, "Just checking"); |
421 _local_interfaces = a; } |
421 _local_interfaces = a; } |
422 |
422 |
423 Array<Klass*>* transitive_interfaces() const { return _transitive_interfaces; } |
423 Array<InstanceKlass*>* transitive_interfaces() const { return _transitive_interfaces; } |
424 void set_transitive_interfaces(Array<Klass*>* a) { |
424 void set_transitive_interfaces(Array<InstanceKlass*>* a) { |
425 guarantee(_transitive_interfaces == NULL || a == NULL, "Just checking"); |
425 guarantee(_transitive_interfaces == NULL || a == NULL, "Just checking"); |
426 _transitive_interfaces = a; |
426 _transitive_interfaces = a; |
427 } |
427 } |
428 |
428 |
429 private: |
429 private: |
1050 void process_interfaces(Thread *thread); |
1050 void process_interfaces(Thread *thread); |
1051 |
1051 |
1052 // virtual operations from Klass |
1052 // virtual operations from Klass |
1053 bool is_leaf_class() const { return _subklass == NULL; } |
1053 bool is_leaf_class() const { return _subklass == NULL; } |
1054 GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots, |
1054 GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots, |
1055 Array<Klass*>* transitive_interfaces); |
1055 Array<InstanceKlass*>* transitive_interfaces); |
1056 bool compute_is_subtype_of(Klass* k); |
1056 bool compute_is_subtype_of(Klass* k); |
1057 bool can_be_primary_super_slow() const; |
1057 bool can_be_primary_super_slow() const; |
1058 int oop_size(oop obj) const { return size_helper(); } |
1058 int oop_size(oop obj) const { return size_helper(); } |
1059 // slow because it's a virtual call and used for verifying the layout_helper. |
1059 // slow because it's a virtual call and used for verifying the layout_helper. |
1060 // Using the layout_helper bits, we can call is_instance_klass without a virtual call. |
1060 // Using the layout_helper bits, we can call is_instance_klass without a virtual call. |
1078 assert(k != NULL, "k should not be null"); |
1078 assert(k != NULL, "k should not be null"); |
1079 assert(k->is_instance_klass(), "cast to InstanceKlass"); |
1079 assert(k->is_instance_klass(), "cast to InstanceKlass"); |
1080 return static_cast<const InstanceKlass*>(k); |
1080 return static_cast<const InstanceKlass*>(k); |
1081 } |
1081 } |
1082 |
1082 |
1083 InstanceKlass* java_super() const { |
1083 virtual InstanceKlass* java_super() const { |
1084 return (super() == NULL) ? NULL : cast(super()); |
1084 return (super() == NULL) ? NULL : cast(super()); |
1085 } |
1085 } |
1086 |
1086 |
1087 // Sizing (in words) |
1087 // Sizing (in words) |
1088 static int header_size() { return sizeof(InstanceKlass)/wordSize; } |
1088 static int header_size() { return sizeof(InstanceKlass)/wordSize; } |
1199 void deallocate_contents(ClassLoaderData* loader_data); |
1199 void deallocate_contents(ClassLoaderData* loader_data); |
1200 static void deallocate_methods(ClassLoaderData* loader_data, |
1200 static void deallocate_methods(ClassLoaderData* loader_data, |
1201 Array<Method*>* methods); |
1201 Array<Method*>* methods); |
1202 void static deallocate_interfaces(ClassLoaderData* loader_data, |
1202 void static deallocate_interfaces(ClassLoaderData* loader_data, |
1203 const Klass* super_klass, |
1203 const Klass* super_klass, |
1204 Array<Klass*>* local_interfaces, |
1204 Array<InstanceKlass*>* local_interfaces, |
1205 Array<Klass*>* transitive_interfaces); |
1205 Array<InstanceKlass*>* transitive_interfaces); |
1206 |
1206 |
1207 // The constant pool is on stack if any of the methods are executing or |
1207 // The constant pool is on stack if any of the methods are executing or |
1208 // referenced by handles. |
1208 // referenced by handles. |
1209 bool on_stack() const { return _constants->on_stack(); } |
1209 bool on_stack() const { return _constants->on_stack(); } |
1210 |
1210 |
1377 #ifndef PRODUCT |
1377 #ifndef PRODUCT |
1378 void oop_print_on (oop obj, outputStream* st); |
1378 void oop_print_on (oop obj, outputStream* st); |
1379 |
1379 |
1380 void print_dependent_nmethods(bool verbose = false); |
1380 void print_dependent_nmethods(bool verbose = false); |
1381 bool is_dependent_nmethod(nmethod* nm); |
1381 bool is_dependent_nmethod(nmethod* nm); |
|
1382 bool verify_itable_index(int index); |
1382 #endif |
1383 #endif |
1383 |
1384 |
1384 const char* internal_name() const; |
1385 const char* internal_name() const; |
1385 |
1386 |
1386 // Verification |
1387 // Verification |