126 static int compare_offset(const OopMapBlock* a, const OopMapBlock* b) {
127 return a->offset() - b->offset();
128 }
129
130 private:
131 int _offset;
132 uint _count;
133 };
134
135 struct JvmtiCachedClassFileData;
136
137 class SigEntry;
138
139 class ValueKlassFixedBlock {
140 Array<SigEntry>** _extended_sig;
141 Array<VMRegPair>** _return_regs;
142 address* _pack_handler;
143 address* _unpack_handler;
144 int* _default_value_offset;
145 Klass** _value_array_klass;
146
147 friend class ValueKlass;
148 };
149
150 class ValueTypes {
151 public:
152 u2 _class_info_index;
153 Symbol* _class_name;
154 };
155
156 class InstanceKlass: public Klass {
157 friend class VMStructs;
158 friend class JVMCIVMStructs;
159 friend class ClassFileParser;
160 friend class CompileReplay;
161
162 public:
163 static const KlassID ID = InstanceKlassID;
164
165 protected:
166 InstanceKlass(const ClassFileParser& parser, unsigned kind, KlassID id = ID);
167
168 public:
169 InstanceKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
170
171 // See "The Java Virtual Machine Specification" section 2.16.2-5 for a detailed description
172 // of the class loading & initialization procedure, and the use of the states.
173 enum ClassState {
174 allocated, // allocated (but not yet linked)
175 loaded, // loaded and inserted in class hierarchy (but not linked yet)
176 linked, // successfully linked/verified (but not initialized yet)
177 being_initialized, // currently running class initializer
178 fully_initialized, // initialized (successfull final state)
179 initialization_error // error happened during initialization
180 };
181
182 private:
183 static InstanceKlass* allocate_instance_klass(const ClassFileParser& parser, TRAPS);
184
185 protected:
186 // If you add a new field that points to any metaspace object, you
187 // must add this field to InstanceKlass::metaspace_pointers_do().
188
189 // Annotations for this class
190 Annotations* _annotations;
191 // Package this class is defined in
192 PackageEntry* _package_entry;
193 // Array classes holding elements of this class.
194 Klass* volatile _array_klasses;
195 // Constant pool for this class.
196 ConstantPool* _constants;
197 // The InnerClasses attribute and EnclosingMethod attribute. The
198 // _inner_classes is an array of shorts. If the class has InnerClasses
|
126 static int compare_offset(const OopMapBlock* a, const OopMapBlock* b) {
127 return a->offset() - b->offset();
128 }
129
130 private:
131 int _offset;
132 uint _count;
133 };
134
135 struct JvmtiCachedClassFileData;
136
137 class SigEntry;
138
139 class ValueKlassFixedBlock {
140 Array<SigEntry>** _extended_sig;
141 Array<VMRegPair>** _return_regs;
142 address* _pack_handler;
143 address* _unpack_handler;
144 int* _default_value_offset;
145 Klass** _value_array_klass;
146 int _alignment;
147 int _first_field_offset;
148 int _exact_size_in_bytes;
149
150 friend class ValueKlass;
151 };
152
153 class ValueTypes {
154 public:
155 u2 _class_info_index;
156 Symbol* _class_name;
157 };
158
159 class InstanceKlass: public Klass {
160 friend class VMStructs;
161 friend class JVMCIVMStructs;
162 friend class ClassFileParser;
163 friend class CompileReplay;
164
165 public:
166 static const KlassID ID = InstanceKlassID;
167
168 protected:
169 InstanceKlass(const ClassFileParser& parser, unsigned kind, KlassID id = ID);
170
171 public:
172 InstanceKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
173
174 // See "The Java Virtual Machine Specification" section 2.16.2-5 for a detailed description
175 // of the class loading & initialization procedure, and the use of the states.
176 enum ClassState {
177 allocated, // allocated (but not yet linked)
178 loaded, // loaded and inserted in class hierarchy (but not linked yet)
179 linked, // successfully linked/verified (but not initialized yet)
180 being_initialized, // currently running class initializer
181 fully_initialized, // initialized (successful final state)
182 initialization_error // error happened during initialization
183 };
184
185 private:
186 static InstanceKlass* allocate_instance_klass(const ClassFileParser& parser, TRAPS);
187
188 protected:
189 // If you add a new field that points to any metaspace object, you
190 // must add this field to InstanceKlass::metaspace_pointers_do().
191
192 // Annotations for this class
193 Annotations* _annotations;
194 // Package this class is defined in
195 PackageEntry* _package_entry;
196 // Array classes holding elements of this class.
197 Klass* volatile _array_klasses;
198 // Constant pool for this class.
199 ConstantPool* _constants;
200 // The InnerClasses attribute and EnclosingMethod attribute. The
201 // _inner_classes is an array of shorts. If the class has InnerClasses
|