207
208 // the source debug extension for this klass, NULL if not specified.
209 // Specified as UTF-8 string without terminating zero byte in the classfile,
210 // it is stored in the instanceklass as a NULL-terminated UTF-8 string
211 const char* _source_debug_extension;
212
213 // Number of heapOopSize words used by non-static fields in this klass
214 // (including inherited fields but after header_size()).
215 int _nonstatic_field_size;
216 int _static_field_size; // number words used by static fields (oop and non-oop) in this klass
217
218 int _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks
219 int _itable_len; // length of Java itable (in words)
220
221 // The NestHost attribute. The class info index for the class
222 // that is the nest-host of this class. This data has not been validated.
223 u2 _nest_host_index;
224 u2 _this_class_index; // constant pool entry
225
226 u2 _static_oop_field_count;// number of static oop fields in this klass
227 u2 _java_fields_count; // The number of declared Java fields
228
229 volatile u2 _idnum_allocated_count; // JNI/JVMTI: increments with the addition of methods, old ids don't change
230
231 // _is_marked_dependent can be set concurrently, thus cannot be part of the
232 // _misc_flags.
233 bool _is_marked_dependent; // used for marking during flushing and deoptimization
234
235 // Class states are defined as ClassState (see above).
236 // Place the _init_state here to utilize the unused 2-byte after
237 // _idnum_allocated_count.
238 u1 _init_state; // state of class
239
240 // This can be used to quickly discriminate among the four kinds of
241 // InstanceKlass. This should be an enum (?)
242 static const unsigned _kind_other = 0; // concrete InstanceKlass
243 static const unsigned _kind_reference = 1; // InstanceRefKlass
244 static const unsigned _kind_class_loader = 2; // InstanceClassLoaderKlass
245 static const unsigned _kind_mirror = 3; // InstanceMirrorKlass
246
373 bool has_nonstatic_fields() const {
374 return (_misc_flags & _misc_has_nonstatic_fields) != 0;
375 }
376 void set_has_nonstatic_fields(bool b) {
377 if (b) {
378 _misc_flags |= _misc_has_nonstatic_fields;
379 } else {
380 _misc_flags &= ~_misc_has_nonstatic_fields;
381 }
382 }
383
384 // field sizes
385 int nonstatic_field_size() const { return _nonstatic_field_size; }
386 void set_nonstatic_field_size(int size) { _nonstatic_field_size = size; }
387
388 int static_field_size() const { return _static_field_size; }
389 void set_static_field_size(int size) { _static_field_size = size; }
390
391 int static_oop_field_count() const { return (int)_static_oop_field_count; }
392 void set_static_oop_field_count(u2 size) { _static_oop_field_count = size; }
393
394 // Java itable
395 int itable_length() const { return _itable_len; }
396 void set_itable_length(int len) { _itable_len = len; }
397
398 // array klasses
399 ObjArrayKlass* array_klasses() const { return _array_klasses; }
400 inline ObjArrayKlass* array_klasses_acquire() const; // load with acquire semantics
401 void set_array_klasses(ObjArrayKlass* k) { _array_klasses = k; }
402 inline void release_set_array_klasses(ObjArrayKlass* k); // store with release semantics
403
404 // methods
405 Array<Method*>* methods() const { return _methods; }
406 void set_methods(Array<Method*>* a) { _methods = a; }
407 Method* method_with_idnum(int idnum);
408 Method* method_with_orig_idnum(int idnum);
409 Method* method_with_orig_idnum(int idnum, int version);
410
411 // method ordering
412 Array<int>* method_ordering() const { return _method_ordering; }
|
207
208 // the source debug extension for this klass, NULL if not specified.
209 // Specified as UTF-8 string without terminating zero byte in the classfile,
210 // it is stored in the instanceklass as a NULL-terminated UTF-8 string
211 const char* _source_debug_extension;
212
213 // Number of heapOopSize words used by non-static fields in this klass
214 // (including inherited fields but after header_size()).
215 int _nonstatic_field_size;
216 int _static_field_size; // number words used by static fields (oop and non-oop) in this klass
217
218 int _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks
219 int _itable_len; // length of Java itable (in words)
220
221 // The NestHost attribute. The class info index for the class
222 // that is the nest-host of this class. This data has not been validated.
223 u2 _nest_host_index;
224 u2 _this_class_index; // constant pool entry
225
226 u2 _static_oop_field_count;// number of static oop fields in this klass
227 u2 _nonstatic_oop_field_count;// number of non-static oop fields in this klass
228 u2 _java_fields_count; // The number of declared Java fields
229
230 volatile u2 _idnum_allocated_count; // JNI/JVMTI: increments with the addition of methods, old ids don't change
231
232 // _is_marked_dependent can be set concurrently, thus cannot be part of the
233 // _misc_flags.
234 bool _is_marked_dependent; // used for marking during flushing and deoptimization
235
236 // Class states are defined as ClassState (see above).
237 // Place the _init_state here to utilize the unused 2-byte after
238 // _idnum_allocated_count.
239 u1 _init_state; // state of class
240
241 // This can be used to quickly discriminate among the four kinds of
242 // InstanceKlass. This should be an enum (?)
243 static const unsigned _kind_other = 0; // concrete InstanceKlass
244 static const unsigned _kind_reference = 1; // InstanceRefKlass
245 static const unsigned _kind_class_loader = 2; // InstanceClassLoaderKlass
246 static const unsigned _kind_mirror = 3; // InstanceMirrorKlass
247
374 bool has_nonstatic_fields() const {
375 return (_misc_flags & _misc_has_nonstatic_fields) != 0;
376 }
377 void set_has_nonstatic_fields(bool b) {
378 if (b) {
379 _misc_flags |= _misc_has_nonstatic_fields;
380 } else {
381 _misc_flags &= ~_misc_has_nonstatic_fields;
382 }
383 }
384
385 // field sizes
386 int nonstatic_field_size() const { return _nonstatic_field_size; }
387 void set_nonstatic_field_size(int size) { _nonstatic_field_size = size; }
388
389 int static_field_size() const { return _static_field_size; }
390 void set_static_field_size(int size) { _static_field_size = size; }
391
392 int static_oop_field_count() const { return (int)_static_oop_field_count; }
393 void set_static_oop_field_count(u2 size) { _static_oop_field_count = size; }
394
395 int nonstatic_oop_field_count() const { return (int)_nonstatic_oop_field_count; }
396 void set_nonstatic_oop_field_count(u2 size) { _nonstatic_oop_field_count = size; }
397
398 // Java itable
399 int itable_length() const { return _itable_len; }
400 void set_itable_length(int len) { _itable_len = len; }
401
402 // array klasses
403 ObjArrayKlass* array_klasses() const { return _array_klasses; }
404 inline ObjArrayKlass* array_klasses_acquire() const; // load with acquire semantics
405 void set_array_klasses(ObjArrayKlass* k) { _array_klasses = k; }
406 inline void release_set_array_klasses(ObjArrayKlass* k); // store with release semantics
407
408 // methods
409 Array<Method*>* methods() const { return _methods; }
410 void set_methods(Array<Method*>* a) { _methods = a; }
411 Method* method_with_idnum(int idnum);
412 Method* method_with_orig_idnum(int idnum);
413 Method* method_with_orig_idnum(int idnum, int version);
414
415 // method ordering
416 Array<int>* method_ordering() const { return _method_ordering; }
|