1132 1133 // This bit is initialized in classFileParser.cpp. 1134 // It is false under any of the following conditions: 1135 // - the class is abstract (including any interface) 1136 // - the class has a finalizer (if !RegisterFinalizersAtInit) 1137 // - the class size is larger than FastAllocateSizeLimit 1138 // - the class is java/lang/Class, which cannot be allocated directly 1139 bool can_be_fastpath_allocated() const { 1140 return !layout_helper_needs_slow_path(layout_helper()); 1141 } 1142 1143 // Java itable 1144 klassItable itable() const; // return klassItable wrapper 1145 Method* method_at_itable(Klass* holder, int index, TRAPS); 1146 1147 #if INCLUDE_JVMTI 1148 void adjust_default_methods(InstanceKlass* holder, bool* trace_name_printed); 1149 #endif // INCLUDE_JVMTI 1150 1151 void clean_weak_instanceklass_links(); 1152 void clean_implementors_list(); 1153 void clean_method_data(); 1154 1155 // Explicit metaspace deallocation of fields 1156 // For RedefineClasses and class file parsing errors, we need to deallocate 1157 // instanceKlasses and the metadata they point to. 1158 void deallocate_contents(ClassLoaderData* loader_data); 1159 static void deallocate_methods(ClassLoaderData* loader_data, 1160 Array<Method*>* methods); 1161 void static deallocate_interfaces(ClassLoaderData* loader_data, 1162 const Klass* super_klass, 1163 Array<Klass*>* local_interfaces, 1164 Array<Klass*>* transitive_interfaces); 1165 1166 // The constant pool is on stack if any of the methods are executing or 1167 // referenced by handles. 1168 bool on_stack() const { return _constants->on_stack(); } 1169 1170 // callbacks for actions during class unloading 1171 static void notify_unload_class(InstanceKlass* ik); 1172 static void release_C_heap_structures(InstanceKlass* ik); 1173 1174 // Naming | 1132 1133 // This bit is initialized in classFileParser.cpp. 1134 // It is false under any of the following conditions: 1135 // - the class is abstract (including any interface) 1136 // - the class has a finalizer (if !RegisterFinalizersAtInit) 1137 // - the class size is larger than FastAllocateSizeLimit 1138 // - the class is java/lang/Class, which cannot be allocated directly 1139 bool can_be_fastpath_allocated() const { 1140 return !layout_helper_needs_slow_path(layout_helper()); 1141 } 1142 1143 // Java itable 1144 klassItable itable() const; // return klassItable wrapper 1145 Method* method_at_itable(Klass* holder, int index, TRAPS); 1146 1147 #if INCLUDE_JVMTI 1148 void adjust_default_methods(InstanceKlass* holder, bool* trace_name_printed); 1149 #endif // INCLUDE_JVMTI 1150 1151 void clean_weak_instanceklass_links(); 1152 private: 1153 void clean_implementors_list(); 1154 void clean_method_data(); 1155 1156 public: 1157 // Explicit metaspace deallocation of fields 1158 // For RedefineClasses and class file parsing errors, we need to deallocate 1159 // instanceKlasses and the metadata they point to. 1160 void deallocate_contents(ClassLoaderData* loader_data); 1161 static void deallocate_methods(ClassLoaderData* loader_data, 1162 Array<Method*>* methods); 1163 void static deallocate_interfaces(ClassLoaderData* loader_data, 1164 const Klass* super_klass, 1165 Array<Klass*>* local_interfaces, 1166 Array<Klass*>* transitive_interfaces); 1167 1168 // The constant pool is on stack if any of the methods are executing or 1169 // referenced by handles. 1170 bool on_stack() const { return _constants->on_stack(); } 1171 1172 // callbacks for actions during class unloading 1173 static void notify_unload_class(InstanceKlass* ik); 1174 static void release_C_heap_structures(InstanceKlass* ik); 1175 1176 // Naming |