diff src/share/vm/oops/fieldInfo.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 e6b1331a51d2
children da91efe96a93
line wrap: on
line diff
--- a/src/share/vm/oops/fieldInfo.hpp	Fri May 18 14:57:28 2012 -0700
+++ b/src/share/vm/oops/fieldInfo.hpp	Mon May 21 14:10:35 2012 -0400
@@ -50,8 +50,7 @@
     initval_index_offset     = 3,
     low_offset               = 4,
     high_offset              = 5,
-    generic_signature_offset = 6,
-    field_slots              = 7
+    field_slots              = 6
   };
 
  private:
@@ -60,29 +59,28 @@
   void set_name_index(u2 val)                    { _shorts[name_index_offset] = val;         }
   void set_signature_index(u2 val)               { _shorts[signature_index_offset] = val;    }
   void set_initval_index(u2 val)                 { _shorts[initval_index_offset] = val;      }
-  void set_generic_signature_index(u2 val)       { _shorts[generic_signature_offset] = val;  }
 
   u2 name_index() const                          { return _shorts[name_index_offset];        }
   u2 signature_index() const                     { return _shorts[signature_index_offset];   }
   u2 initval_index() const                       { return _shorts[initval_index_offset];     }
-  u2 generic_signature_index() const             { return _shorts[generic_signature_offset]; }
 
  public:
   static FieldInfo* from_field_array(typeArrayOop fields, int index) {
     return ((FieldInfo*)fields->short_at_addr(index * field_slots));
   }
+  static FieldInfo* from_field_array(u2* fields, int index) {
+    return ((FieldInfo*)(fields + index * field_slots));
+  }
 
   void initialize(u2 access_flags,
                   u2 name_index,
                   u2 signature_index,
                   u2 initval_index,
-                  u2 generic_signature_index,
                   u4 offset) {
     _shorts[access_flags_offset] = access_flags;
     _shorts[name_index_offset] = name_index;
     _shorts[signature_index_offset] = signature_index;
     _shorts[initval_index_offset] = initval_index;
-    _shorts[generic_signature_offset] = generic_signature_index;
     set_offset(offset);
   }
 
@@ -105,14 +103,6 @@
     return cp->symbol_at(index);
   }
 
-  Symbol* generic_signature(constantPoolHandle cp) const {
-    int index = generic_signature_index();
-    if (index == 0) {
-      return NULL;
-    }
-    return cp->symbol_at(index);
-  }
-
   void set_access_flags(u2 val)                  { _shorts[access_flags_offset] = val;             }
   void set_offset(u4 val)                        {
     _shorts[low_offset] = extract_low_short_from_int(val);