hotspot/src/share/vm/oops/instanceKlass.hpp
changeset 23515 f4872ef5df09
parent 22916 582da2ed4dfa
child 23872 536c66fc43d3
equal deleted inserted replaced
23514:8cc4189d9a2a 23515:f4872ef5df09
    41 #include "trace/traceMacros.hpp"
    41 #include "trace/traceMacros.hpp"
    42 
    42 
    43 // An InstanceKlass is the VM level representation of a Java class.
    43 // An InstanceKlass is the VM level representation of a Java class.
    44 // It contains all information needed for at class at execution runtime.
    44 // It contains all information needed for at class at execution runtime.
    45 
    45 
    46 //  InstanceKlass layout:
    46 //  InstanceKlass embedded field layout (after declared fields):
    47 //    [C++ vtbl pointer           ] Klass
       
    48 //    [subtype cache              ] Klass
       
    49 //    [instance size              ] Klass
       
    50 //    [java mirror                ] Klass
       
    51 //    [super                      ] Klass
       
    52 //    [access_flags               ] Klass
       
    53 //    [name                       ] Klass
       
    54 //    [first subklass             ] Klass
       
    55 //    [next sibling               ] Klass
       
    56 //    [array klasses              ]
       
    57 //    [methods                    ]
       
    58 //    [local interfaces           ]
       
    59 //    [transitive interfaces      ]
       
    60 //    [fields                     ]
       
    61 //    [constants                  ]
       
    62 //    [class loader               ]
       
    63 //    [source file name           ]
       
    64 //    [inner classes              ]
       
    65 //    [static field size          ]
       
    66 //    [nonstatic field size       ]
       
    67 //    [static oop fields size     ]
       
    68 //    [nonstatic oop maps size    ]
       
    69 //    [has finalize method        ]
       
    70 //    [deoptimization mark bit    ]
       
    71 //    [initialization state       ]
       
    72 //    [initializing thread        ]
       
    73 //    [Java vtable length         ]
       
    74 //    [oop map cache (stack maps) ]
       
    75 //    [EMBEDDED Java vtable             ] size in words = vtable_len
    47 //    [EMBEDDED Java vtable             ] size in words = vtable_len
    76 //    [EMBEDDED nonstatic oop-map blocks] size in words = nonstatic_oop_map_size
    48 //    [EMBEDDED nonstatic oop-map blocks] size in words = nonstatic_oop_map_size
    77 //      The embedded nonstatic oop-map blocks are short pairs (offset, length)
    49 //      The embedded nonstatic oop-map blocks are short pairs (offset, length)
    78 //      indicating where oops are located in instances of this klass.
    50 //      indicating where oops are located in instances of this klass.
    79 //    [EMBEDDED implementor of the interface] only exist for interface
    51 //    [EMBEDDED implementor of the interface] only exist for interface
  1029 private:
  1001 private:
  1030   void fence_and_clear_init_lock();
  1002   void fence_and_clear_init_lock();
  1031 
  1003 
  1032   // Static methods that are used to implement member methods where an exposed this pointer
  1004   // Static methods that are used to implement member methods where an exposed this pointer
  1033   // is needed due to possible GCs
  1005   // is needed due to possible GCs
  1034   static bool link_class_impl                           (instanceKlassHandle this_oop, bool throw_verifyerror, TRAPS);
  1006   static bool link_class_impl                           (instanceKlassHandle this_k, bool throw_verifyerror, TRAPS);
  1035   static bool verify_code                               (instanceKlassHandle this_oop, bool throw_verifyerror, TRAPS);
  1007   static bool verify_code                               (instanceKlassHandle this_k, bool throw_verifyerror, TRAPS);
  1036   static void initialize_impl                           (instanceKlassHandle this_oop, TRAPS);
  1008   static void initialize_impl                           (instanceKlassHandle this_k, TRAPS);
  1037   static void eager_initialize_impl                     (instanceKlassHandle this_oop);
  1009   static void eager_initialize_impl                     (instanceKlassHandle this_k);
  1038   static void set_initialization_state_and_notify_impl  (instanceKlassHandle this_oop, ClassState state, TRAPS);
  1010   static void set_initialization_state_and_notify_impl  (instanceKlassHandle this_k, ClassState state, TRAPS);
  1039   static void call_class_initializer_impl               (instanceKlassHandle this_oop, TRAPS);
  1011   static void call_class_initializer_impl               (instanceKlassHandle this_k, TRAPS);
  1040   static Klass* array_klass_impl                      (instanceKlassHandle this_oop, bool or_null, int n, TRAPS);
  1012   static Klass* array_klass_impl                        (instanceKlassHandle this_k, bool or_null, int n, TRAPS);
  1041   static void do_local_static_fields_impl               (instanceKlassHandle this_oop, void f(fieldDescriptor* fd, TRAPS), TRAPS);
  1013   static void do_local_static_fields_impl               (instanceKlassHandle this_k, void f(fieldDescriptor* fd, TRAPS), TRAPS);
  1042   /* jni_id_for_impl for jfieldID only */
  1014   /* jni_id_for_impl for jfieldID only */
  1043   static JNIid* jni_id_for_impl                         (instanceKlassHandle this_oop, int offset);
  1015   static JNIid* jni_id_for_impl                         (instanceKlassHandle this_k, int offset);
  1044 
  1016 
  1045   // Returns the array class for the n'th dimension
  1017   // Returns the array class for the n'th dimension
  1046   Klass* array_klass_impl(bool or_null, int n, TRAPS);
  1018   Klass* array_klass_impl(bool or_null, int n, TRAPS);
  1047 
  1019 
  1048   // Returns the array class with this class as element type
  1020   // Returns the array class with this class as element type