mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8021948: Change InstanceKlass::_source_file_name and _generic_signature from Symbol* to constant pool indexes
Change InstanceKlass::_source_file_name and _generic_signature to u2 fields. Reviewed-by: coleenp, iklam
This commit is contained in:
parent
2c28ff340a
commit
553b498f51
7 changed files with 67 additions and 42 deletions
|
@ -201,14 +201,10 @@ class InstanceKlass: public Klass {
|
|||
// number_of_inner_classes * 4 + enclosing_method_attribute_size.
|
||||
Array<jushort>* _inner_classes;
|
||||
|
||||
// Name of source file containing this klass, NULL if not specified.
|
||||
Symbol* _source_file_name;
|
||||
// the source debug extension for this klass, NULL if not specified.
|
||||
// Specified as UTF-8 string without terminating zero byte in the classfile,
|
||||
// it is stored in the instanceklass as a NULL-terminated UTF-8 string
|
||||
char* _source_debug_extension;
|
||||
// Generic signature, or null if none.
|
||||
Symbol* _generic_signature;
|
||||
// Array name derived from this class which needs unreferencing
|
||||
// if this class is unloaded.
|
||||
Symbol* _array_name;
|
||||
|
@ -217,6 +213,12 @@ class InstanceKlass: public Klass {
|
|||
// (including inherited fields but after header_size()).
|
||||
int _nonstatic_field_size;
|
||||
int _static_field_size; // number words used by static fields (oop and non-oop) in this klass
|
||||
// Constant pool index to the utf8 entry of the Generic signature,
|
||||
// or 0 if none.
|
||||
u2 _generic_signature_index;
|
||||
// Constant pool index to the utf8 entry for the name of source file
|
||||
// containing this klass, 0 if not specified.
|
||||
u2 _source_file_name_index;
|
||||
u2 _static_oop_field_count;// number of static oop fields in this klass
|
||||
u2 _java_fields_count; // The number of declared Java fields
|
||||
int _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks
|
||||
|
@ -570,8 +572,16 @@ class InstanceKlass: public Klass {
|
|||
}
|
||||
|
||||
// source file name
|
||||
Symbol* source_file_name() const { return _source_file_name; }
|
||||
void set_source_file_name(Symbol* n);
|
||||
Symbol* source_file_name() const {
|
||||
return (_source_file_name_index == 0) ?
|
||||
(Symbol*)NULL : _constants->symbol_at(_source_file_name_index);
|
||||
}
|
||||
u2 source_file_name_index() const {
|
||||
return _source_file_name_index;
|
||||
}
|
||||
void set_source_file_name_index(u2 sourcefile_index) {
|
||||
_source_file_name_index = sourcefile_index;
|
||||
}
|
||||
|
||||
// minor and major version numbers of class file
|
||||
u2 minor_version() const { return _minor_version; }
|
||||
|
@ -648,8 +658,16 @@ class InstanceKlass: public Klass {
|
|||
void set_initial_method_idnum(u2 value) { _idnum_allocated_count = value; }
|
||||
|
||||
// generics support
|
||||
Symbol* generic_signature() const { return _generic_signature; }
|
||||
void set_generic_signature(Symbol* sig) { _generic_signature = sig; }
|
||||
Symbol* generic_signature() const {
|
||||
return (_generic_signature_index == 0) ?
|
||||
(Symbol*)NULL : _constants->symbol_at(_generic_signature_index);
|
||||
}
|
||||
u2 generic_signature_index() const {
|
||||
return _generic_signature_index;
|
||||
}
|
||||
void set_generic_signature_index(u2 sig_index) {
|
||||
_generic_signature_index = sig_index;
|
||||
}
|
||||
|
||||
u2 enclosing_method_data(int offset);
|
||||
u2 enclosing_method_class_index() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue