Mercurial > hg > graal-jvmci-8
diff src/share/vm/oops/instanceKlass.hpp @ 6100:71afdabfd05b
7168280: Eliminate the generic signature index slot from field array for field without generic signature.
Summary: Only allocate the generic signature index slot in the field array for field with generic signature attribute.
Reviewed-by: coleenp, dlong
author | jiangli |
---|---|
date | Mon, 21 May 2012 14:10:35 -0400 |
parents | 2766551175a0 |
children | d2a62e0f25eb |
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.hpp Fri May 18 14:57:28 2012 -0700 +++ b/src/share/vm/oops/instanceKlass.hpp Mon May 21 14:10:35 2012 -0400 @@ -168,8 +168,19 @@ objArrayOop _local_interfaces; // Interface (klassOops) this class implements transitively. objArrayOop _transitive_interfaces; - // Instance and static variable information, 5-tuples of shorts [access, name - // index, sig index, initval index, offset]. + // Instance and static variable information, starts with 6-tuples of shorts + // [access, name index, sig index, initval index, low_offset, high_offset] + // for all fields, followed by the generic signature data at the end of + // the array. Only fields with generic signature attributes have the generic + // signature data set in the array. The fields array looks like following: + // + // f1: [access, name index, sig index, initial value index, low_offset, high_offset] + // f2: [access, name index, sig index, initial value index, low_offset, high_offset] + // ... + // fn: [access, name index, sig index, initial value index, low_offset, high_offset] + // [generic signature index] + // [generic signature index] + // ... typeArrayOop _fields; // Constant pool for this class. constantPoolOop _constants; @@ -351,9 +362,6 @@ // Number of Java declared fields int java_fields_count() const { return (int)_java_fields_count; } - // Number of fields including any injected fields - int all_fields_count() const { return _fields->length() / FieldInfo::field_slots; } - typeArrayOop fields() const { return _fields; } void set_fields(typeArrayOop f, u2 java_fields_count) {