Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/oops/instanceKlass.hpp
32285 views
/*1* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_VM_OOPS_INSTANCEKLASS_HPP25#define SHARE_VM_OOPS_INSTANCEKLASS_HPP2627#include "classfile/classLoaderData.hpp"28#include "memory/referenceType.hpp"29#include "oops/annotations.hpp"30#include "oops/constMethod.hpp"31#include "oops/fieldInfo.hpp"32#include "oops/instanceOop.hpp"33#include "oops/klassVtable.hpp"34#include "runtime/atomic.hpp"35#include "runtime/handles.hpp"36#include "runtime/os.hpp"37#include "utilities/accessFlags.hpp"38#include "utilities/bitMap.inline.hpp"39#include "utilities/macros.hpp"40#if INCLUDE_JFR41#include "jfr/support/jfrKlassExtension.hpp"42#endif4344// An InstanceKlass is the VM level representation of a Java class.45// It contains all information needed for at class at execution runtime.4647// InstanceKlass layout:48// [C++ vtbl pointer ] Klass49// [subtype cache ] Klass50// [instance size ] Klass51// [java mirror ] Klass52// [super ] Klass53// [access_flags ] Klass54// [name ] Klass55// [first subklass ] Klass56// [next sibling ] Klass57// [array klasses ]58// [methods ]59// [local interfaces ]60// [transitive interfaces ]61// [fields ]62// [constants ]63// [class loader ]64// [source file name ]65// [inner classes ]66// [static field size ]67// [nonstatic field size ]68// [static oop fields size ]69// [nonstatic oop maps size ]70// [has finalize method ]71// [deoptimization mark bit ]72// [initialization state ]73// [initializing thread ]74// [Java vtable length ]75// [oop map cache (stack maps) ]76// [EMBEDDED Java vtable ] size in words = vtable_len77// [EMBEDDED nonstatic oop-map blocks] size in words = nonstatic_oop_map_size78// The embedded nonstatic oop-map blocks are short pairs (offset, length)79// indicating where oops are located in instances of this klass.80// [EMBEDDED implementor of the interface] only exist for interface81// [EMBEDDED host klass ] only exist for an anonymous class (JSR 292 enabled)828384// forward declaration for class -- see below for definition85class SuperTypeClosure;86class JNIid;87class jniIdMapBase;88class BreakpointInfo;89class fieldDescriptor;90class DepChange;91class nmethodBucket;92class JvmtiCachedClassFieldMap;93class MemberNameTable;9495// This is used in iterators below.96class FieldClosure: public StackObj {97public:98virtual void do_field(fieldDescriptor* fd) = 0;99};100101#ifndef PRODUCT102// Print fields.103// If "obj" argument to constructor is NULL, prints static fields, otherwise prints non-static fields.104class FieldPrinter: public FieldClosure {105oop _obj;106outputStream* _st;107public:108FieldPrinter(outputStream* st, oop obj = NULL) : _obj(obj), _st(st) {}109void do_field(fieldDescriptor* fd);110};111#endif // !PRODUCT112113// ValueObjs embedded in klass. Describes where oops are located in instances of114// this klass.115class OopMapBlock VALUE_OBJ_CLASS_SPEC {116public:117// Byte offset of the first oop mapped by this block.118int offset() const { return _offset; }119void set_offset(int offset) { _offset = offset; }120121// Number of oops in this block.122uint count() const { return _count; }123void set_count(uint count) { _count = count; }124125// sizeof(OopMapBlock) in HeapWords.126static const int size_in_words() {127return align_size_up(int(sizeof(OopMapBlock)), HeapWordSize) >>128LogHeapWordSize;129}130131private:132int _offset;133uint _count;134};135136struct JvmtiCachedClassFileData;137138class InstanceKlass: public Klass {139friend class VMStructs;140friend class ClassFileParser;141friend class CompileReplay;142143protected:144// Constructor145InstanceKlass(int vtable_len,146int itable_len,147int static_field_size,148int nonstatic_oop_map_size,149ReferenceType rt,150AccessFlags access_flags,151bool is_anonymous);152public:153static InstanceKlass* allocate_instance_klass(154ClassLoaderData* loader_data,155int vtable_len,156int itable_len,157int static_field_size,158int nonstatic_oop_map_size,159ReferenceType rt,160AccessFlags access_flags,161Symbol* name,162Klass* super_klass,163bool is_anonymous,164TRAPS);165166InstanceKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }167168// See "The Java Virtual Machine Specification" section 2.16.2-5 for a detailed description169// of the class loading & initialization procedure, and the use of the states.170enum ClassState {171allocated, // allocated (but not yet linked)172loaded, // loaded and inserted in class hierarchy (but not linked yet)173linked, // successfully linked/verified (but not initialized yet)174being_initialized, // currently running class initializer175fully_initialized, // initialized (successfull final state)176initialization_error // error happened during initialization177};178179static int number_of_instance_classes() { return _total_instanceKlass_count; }180181private:182static volatile int _total_instanceKlass_count;183184protected:185// Annotations for this class186Annotations* _annotations;187// Array classes holding elements of this class.188Klass* _array_klasses;189// Constant pool for this class.190ConstantPool* _constants;191// The InnerClasses attribute and EnclosingMethod attribute. The192// _inner_classes is an array of shorts. If the class has InnerClasses193// attribute, then the _inner_classes array begins with 4-tuples of shorts194// [inner_class_info_index, outer_class_info_index,195// inner_name_index, inner_class_access_flags] for the InnerClasses196// attribute. If the EnclosingMethod attribute exists, it occupies the197// last two shorts [class_index, method_index] of the array. If only198// the InnerClasses attribute exists, the _inner_classes array length is199// number_of_inner_classes * 4. If the class has both InnerClasses200// and EnclosingMethod attributes the _inner_classes array length is201// number_of_inner_classes * 4 + enclosing_method_attribute_size.202Array<jushort>* _inner_classes;203204// the source debug extension for this klass, NULL if not specified.205// Specified as UTF-8 string without terminating zero byte in the classfile,206// it is stored in the instanceklass as a NULL-terminated UTF-8 string207char* _source_debug_extension;208// Array name derived from this class which needs unreferencing209// if this class is unloaded.210Symbol* _array_name;211212// Number of heapOopSize words used by non-static fields in this klass213// (including inherited fields but after header_size()).214int _nonstatic_field_size;215int _static_field_size; // number words used by static fields (oop and non-oop) in this klass216// Constant pool index to the utf8 entry of the Generic signature,217// or 0 if none.218u2 _generic_signature_index;219// Constant pool index to the utf8 entry for the name of source file220// containing this klass, 0 if not specified.221u2 _source_file_name_index;222u2 _static_oop_field_count;// number of static oop fields in this klass223u2 _java_fields_count; // The number of declared Java fields224int _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks225226// _is_marked_dependent can be set concurrently, thus cannot be part of the227// _misc_flags.228bool _is_marked_dependent; // used for marking during flushing and deoptimization229bool _is_being_redefined; // used for locking redefinition230bool _has_unloaded_dependent;231232enum {233_misc_rewritten = 1 << 0, // methods rewritten.234_misc_has_nonstatic_fields = 1 << 1, // for sizing with UseCompressedOops235_misc_should_verify_class = 1 << 2, // allow caching of preverification236_misc_is_anonymous = 1 << 3, // has embedded _host_klass field237_misc_is_contended = 1 << 4, // marked with contended annotation238_misc_has_default_methods = 1 << 5, // class/superclass/implemented interfaces has default methods239_misc_declares_default_methods = 1 << 6, // directly declares default methods (any access)240_misc_has_been_redefined = 1 << 7 // class has been redefined241};242u2 _misc_flags;243u2 _minor_version; // minor version number of class file244u2 _major_version; // major version number of class file245Thread* _init_thread; // Pointer to current thread doing initialization (to handle recursive initialization)246int _vtable_len; // length of Java vtable (in words)247int _itable_len; // length of Java itable (in words)248OopMapCache* volatile _oop_map_cache; // OopMapCache for all methods in the klass (allocated lazily)249MemberNameTable* _member_names; // Member names250JNIid* _jni_ids; // First JNI identifier for static fields in this class251jmethodID* _methods_jmethod_ids; // jmethodIDs corresponding to method_idnum, or NULL if none252nmethodBucket* _dependencies; // list of dependent nmethods253nmethod* _osr_nmethods_head; // Head of list of on-stack replacement nmethods for this class254BreakpointInfo* _breakpoints; // bpt lists, managed by Method*255// Linked instanceKlasses of previous versions256InstanceKlass* _previous_versions;257// JVMTI fields can be moved to their own structure - see 6315920258// JVMTI: cached class file, before retransformable agent modified it in CFLH259JvmtiCachedClassFileData* _cached_class_file;260261volatile u2 _idnum_allocated_count; // JNI/JVMTI: increments with the addition of methods, old ids don't change262263// Class states are defined as ClassState (see above).264// Place the _init_state here to utilize the unused 2-byte after265// _idnum_allocated_count.266u1 _init_state; // state of class267u1 _reference_type; // reference type268269JvmtiCachedClassFieldMap* _jvmti_cached_class_field_map; // JVMTI: used during heap iteration270271NOT_PRODUCT(int _verify_count;) // to avoid redundant verifies272273// Method array.274Array<Method*>* _methods;275// Default Method Array, concrete methods inherited from interfaces276Array<Method*>* _default_methods;277// Interface (Klass*s) this class declares locally to implement.278Array<Klass*>* _local_interfaces;279// Interface (Klass*s) this class implements transitively.280Array<Klass*>* _transitive_interfaces;281// Int array containing the original order of method in the class file (for JVMTI).282Array<int>* _method_ordering;283// Int array containing the vtable_indices for default_methods284// offset matches _default_methods offset285Array<int>* _default_vtable_indices;286287// Instance and static variable information, starts with 6-tuples of shorts288// [access, name index, sig index, initval index, low_offset, high_offset]289// for all fields, followed by the generic signature data at the end of290// the array. Only fields with generic signature attributes have the generic291// signature data set in the array. The fields array looks like following:292//293// f1: [access, name index, sig index, initial value index, low_offset, high_offset]294// f2: [access, name index, sig index, initial value index, low_offset, high_offset]295// ...296// fn: [access, name index, sig index, initial value index, low_offset, high_offset]297// [generic signature index]298// [generic signature index]299// ...300Array<u2>* _fields;301302// embedded Java vtable follows here303// embedded Java itables follows here304// embedded static fields follows here305// embedded nonstatic oop-map blocks follows here306// embedded implementor of this interface follows here307// The embedded implementor only exists if the current klass is an308// iterface. The possible values of the implementor fall into following309// three cases:310// NULL: no implementor.311// A Klass* that's not itself: one implementor.312// Itself: more than one implementors.313// embedded host klass follows here314// The embedded host klass only exists in an anonymous class for315// dynamic language support (JSR 292 enabled). The host class grants316// its access privileges to this class also. The host class is either317// named, or a previously loaded anonymous class. A non-anonymous class318// or an anonymous class loaded through normal classloading does not319// have this embedded field.320//321322friend class SystemDictionary;323324public:325bool has_nonstatic_fields() const {326return (_misc_flags & _misc_has_nonstatic_fields) != 0;327}328void set_has_nonstatic_fields(bool b) {329if (b) {330_misc_flags |= _misc_has_nonstatic_fields;331} else {332_misc_flags &= ~_misc_has_nonstatic_fields;333}334}335336// field sizes337int nonstatic_field_size() const { return _nonstatic_field_size; }338void set_nonstatic_field_size(int size) { _nonstatic_field_size = size; }339340int static_field_size() const { return _static_field_size; }341void set_static_field_size(int size) { _static_field_size = size; }342343int static_oop_field_count() const { return (int)_static_oop_field_count; }344void set_static_oop_field_count(u2 size) { _static_oop_field_count = size; }345346// Java vtable347int vtable_length() const { return _vtable_len; }348void set_vtable_length(int len) { _vtable_len = len; }349350// Java itable351int itable_length() const { return _itable_len; }352void set_itable_length(int len) { _itable_len = len; }353354// array klasses355Klass* array_klasses() const { return _array_klasses; }356void set_array_klasses(Klass* k) { _array_klasses = k; }357358// methods359Array<Method*>* methods() const { return _methods; }360void set_methods(Array<Method*>* a) { _methods = a; }361Method* method_with_idnum(int idnum);362Method* method_with_orig_idnum(int idnum);363Method* method_with_orig_idnum(int idnum, int version);364365// method ordering366Array<int>* method_ordering() const { return _method_ordering; }367void set_method_ordering(Array<int>* m) { _method_ordering = m; }368void copy_method_ordering(intArray* m, TRAPS);369370// default_methods371Array<Method*>* default_methods() const { return _default_methods; }372void set_default_methods(Array<Method*>* a) { _default_methods = a; }373374// default method vtable_indices375Array<int>* default_vtable_indices() const { return _default_vtable_indices; }376void set_default_vtable_indices(Array<int>* v) { _default_vtable_indices = v; }377Array<int>* create_new_default_vtable_indices(int len, TRAPS);378379// interfaces380Array<Klass*>* local_interfaces() const { return _local_interfaces; }381void set_local_interfaces(Array<Klass*>* a) {382guarantee(_local_interfaces == NULL || a == NULL, "Just checking");383_local_interfaces = a; }384385Array<Klass*>* transitive_interfaces() const { return _transitive_interfaces; }386void set_transitive_interfaces(Array<Klass*>* a) {387guarantee(_transitive_interfaces == NULL || a == NULL, "Just checking");388_transitive_interfaces = a;389}390391private:392friend class fieldDescriptor;393FieldInfo* field(int index) const { return FieldInfo::from_field_array(_fields, index); }394395public:396int field_offset (int index) const { return field(index)->offset(); }397int field_access_flags(int index) const { return field(index)->access_flags(); }398Symbol* field_name (int index) const { return field(index)->name(constants()); }399Symbol* field_signature (int index) const { return field(index)->signature(constants()); }400401// Number of Java declared fields402int java_fields_count() const { return (int)_java_fields_count; }403404Array<u2>* fields() const { return _fields; }405void set_fields(Array<u2>* f, u2 java_fields_count) {406guarantee(_fields == NULL || f == NULL, "Just checking");407_fields = f;408_java_fields_count = java_fields_count;409}410411// inner classes412Array<u2>* inner_classes() const { return _inner_classes; }413void set_inner_classes(Array<u2>* f) { _inner_classes = f; }414415enum InnerClassAttributeOffset {416// From http://mirror.eng/products/jdk/1.1/docs/guide/innerclasses/spec/innerclasses.doc10.html#18814417inner_class_inner_class_info_offset = 0,418inner_class_outer_class_info_offset = 1,419inner_class_inner_name_offset = 2,420inner_class_access_flags_offset = 3,421inner_class_next_offset = 4422};423424enum EnclosingMethodAttributeOffset {425enclosing_method_class_index_offset = 0,426enclosing_method_method_index_offset = 1,427enclosing_method_attribute_size = 2428};429430// method override check431bool is_override(methodHandle super_method, Handle targetclassloader, Symbol* targetclassname, TRAPS);432433// package434bool is_same_class_package(Klass* class2);435bool is_same_class_package(oop classloader2, Symbol* classname2);436static bool is_same_class_package(oop class_loader1, Symbol* class_name1, oop class_loader2, Symbol* class_name2);437438// find an enclosing class (defined where original code was, in jvm.cpp!)439Klass* compute_enclosing_class(bool* inner_is_member, TRAPS) {440instanceKlassHandle self(THREAD, this);441return compute_enclosing_class_impl(self, inner_is_member, THREAD);442}443static Klass* compute_enclosing_class_impl(instanceKlassHandle self,444bool* inner_is_member, TRAPS);445446// tell if two classes have the same enclosing class (at package level)447bool is_same_package_member(Klass* class2, TRAPS) {448instanceKlassHandle self(THREAD, this);449return is_same_package_member_impl(self, class2, THREAD);450}451static bool is_same_package_member_impl(instanceKlassHandle self,452Klass* class2, TRAPS);453454// initialization state455bool is_loaded() const { return _init_state >= loaded; }456bool is_linked() const { return _init_state >= linked; }457bool is_initialized() const { return _init_state == fully_initialized; }458bool is_not_initialized() const { return _init_state < being_initialized; }459bool is_being_initialized() const { return _init_state == being_initialized; }460bool is_in_error_state() const { return _init_state == initialization_error; }461bool is_reentrant_initialization(Thread *thread) { return thread == _init_thread; }462ClassState init_state() { return (ClassState)_init_state; }463bool is_rewritten() const { return (_misc_flags & _misc_rewritten) != 0; }464465// defineClass specified verification466bool should_verify_class() const {467return (_misc_flags & _misc_should_verify_class) != 0;468}469void set_should_verify_class(bool value) {470if (value) {471_misc_flags |= _misc_should_verify_class;472} else {473_misc_flags &= ~_misc_should_verify_class;474}475}476477// marking478bool is_marked_dependent() const { return _is_marked_dependent; }479void set_is_marked_dependent(bool value) { _is_marked_dependent = value; }480481bool has_unloaded_dependent() const { return _has_unloaded_dependent; }482void set_has_unloaded_dependent(bool value) { _has_unloaded_dependent = value; }483484// initialization (virtuals from Klass)485bool should_be_initialized() const; // means that initialize should be called486void initialize(TRAPS);487void link_class(TRAPS);488bool link_class_or_fail(TRAPS); // returns false on failure489void unlink_class();490void rewrite_class(TRAPS);491void link_methods(TRAPS);492Method* class_initializer();493494// set the class to initialized if no static initializer is present495void eager_initialize(Thread *thread);496497// reference type498ReferenceType reference_type() const { return (ReferenceType)_reference_type; }499void set_reference_type(ReferenceType t) {500assert(t == (u1)t, "overflow");501_reference_type = (u1)t;502}503504static ByteSize reference_type_offset() { return in_ByteSize(offset_of(InstanceKlass, _reference_type)); }505506// find local field, returns true if found507bool find_local_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const;508// find field in direct superinterfaces, returns the interface in which the field is defined509Klass* find_interface_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const;510// find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined511Klass* find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const;512// find instance or static fields according to JVM spec 5.4.3.2, returns the klass in which the field is defined513Klass* find_field(Symbol* name, Symbol* sig, bool is_static, fieldDescriptor* fd) const;514515// find a non-static or static field given its offset within the class.516bool contains_field_offset(int offset) {517return instanceOopDesc::contains_field_offset(offset, nonstatic_field_size());518}519520bool find_local_field_from_offset(int offset, bool is_static, fieldDescriptor* fd) const;521bool find_field_from_offset(int offset, bool is_static, fieldDescriptor* fd) const;522523// find a local method (returns NULL if not found)524Method* find_method(Symbol* name, Symbol* signature) const;525static Method* find_method(Array<Method*>* methods, Symbol* name, Symbol* signature);526527// find a local method, but skip static methods528Method* find_instance_method(Symbol* name, Symbol* signature,529PrivateLookupMode private_mode);530static Method* find_instance_method(Array<Method*>* methods,531Symbol* name, Symbol* signature,532PrivateLookupMode private_mode);533534// find a local method (returns NULL if not found)535Method* find_local_method(Symbol* name, Symbol* signature,536OverpassLookupMode overpass_mode,537StaticLookupMode static_mode,538PrivateLookupMode private_mode) const;539540// find a local method from given methods array (returns NULL if not found)541static Method* find_local_method(Array<Method*>* methods,542Symbol* name, Symbol* signature,543OverpassLookupMode overpass_mode,544StaticLookupMode static_mode,545PrivateLookupMode private_mode);546547// true if method matches signature and conforms to skipping_X conditions.548static bool method_matches(Method* m, Symbol* signature, bool skipping_overpass, bool skipping_static, bool skipping_private);549550// find a local method index in methods or default_methods (returns -1 if not found)551static int find_method_index(Array<Method*>* methods,552Symbol* name, Symbol* signature,553OverpassLookupMode overpass_mode,554StaticLookupMode static_mode,555PrivateLookupMode private_mode);556557558// lookup operation (returns NULL if not found)559Method* uncached_lookup_method(Symbol* name, Symbol* signature, OverpassLookupMode overpass_mode) const;560561// lookup a method in all the interfaces that this class implements562// (returns NULL if not found)563Method* lookup_method_in_all_interfaces(Symbol* name, Symbol* signature, DefaultsLookupMode defaults_mode) const;564565// lookup a method in local defaults then in all interfaces566// (returns NULL if not found)567Method* lookup_method_in_ordered_interfaces(Symbol* name, Symbol* signature) const;568569// Find method indices by name. If a method with the specified name is570// found the index to the first method is returned, and 'end' is filled in571// with the index of first non-name-matching method. If no method is found572// -1 is returned.573int find_method_by_name(Symbol* name, int* end);574static int find_method_by_name(Array<Method*>* methods, Symbol* name, int* end);575576// constant pool577ConstantPool* constants() const { return _constants; }578void set_constants(ConstantPool* c) { _constants = c; }579580// protection domain581oop protection_domain() const;582583// signers584objArrayOop signers() const;585586// host class587Klass* host_klass() const {588Klass** hk = (Klass**)adr_host_klass();589if (hk == NULL) {590assert(!is_anonymous(), "Anonymous classes have host klasses");591return NULL;592} else {593assert(*hk != NULL, "host klass should always be set if the address is not null");594assert(is_anonymous(), "Only anonymous classes have host klasses");595return *hk;596}597}598void set_host_klass(Klass* host) {599assert(is_anonymous(), "not anonymous");600Klass** addr = (Klass**)adr_host_klass();601assert(addr != NULL, "no reversed space");602if (addr != NULL) {603*addr = host;604}605}606bool has_host_klass() const {607return adr_host_klass() != NULL;608}609bool is_anonymous() const {610return (_misc_flags & _misc_is_anonymous) != 0;611}612void set_is_anonymous(bool value) {613if (value) {614_misc_flags |= _misc_is_anonymous;615} else {616_misc_flags &= ~_misc_is_anonymous;617}618}619620// Oop that keeps the metadata for this class from being unloaded621// in places where the metadata is stored in other places, like nmethods622oop klass_holder() const {623return is_anonymous() ? java_mirror() : class_loader();624}625626bool is_contended() const {627return (_misc_flags & _misc_is_contended) != 0;628}629void set_is_contended(bool value) {630if (value) {631_misc_flags |= _misc_is_contended;632} else {633_misc_flags &= ~_misc_is_contended;634}635}636637// source file name638Symbol* source_file_name() const {639return (_source_file_name_index == 0) ?640(Symbol*)NULL : _constants->symbol_at(_source_file_name_index);641}642u2 source_file_name_index() const {643return _source_file_name_index;644}645void set_source_file_name_index(u2 sourcefile_index) {646_source_file_name_index = sourcefile_index;647}648649// minor and major version numbers of class file650u2 minor_version() const { return _minor_version; }651void set_minor_version(u2 minor_version) { _minor_version = minor_version; }652u2 major_version() const { return _major_version; }653void set_major_version(u2 major_version) { _major_version = major_version; }654655// source debug extension656char* source_debug_extension() const { return _source_debug_extension; }657void set_source_debug_extension(char* array, int length);658659// symbol unloading support (refcount already added)660Symbol* array_name() { return _array_name; }661void set_array_name(Symbol* name) { assert(_array_name == NULL || name == NULL, "name already created"); _array_name = name; }662663// nonstatic oop-map blocks664static int nonstatic_oop_map_size(unsigned int oop_map_count) {665return oop_map_count * OopMapBlock::size_in_words();666}667unsigned int nonstatic_oop_map_count() const {668return _nonstatic_oop_map_size / OopMapBlock::size_in_words();669}670int nonstatic_oop_map_size() const { return _nonstatic_oop_map_size; }671void set_nonstatic_oop_map_size(int words) {672_nonstatic_oop_map_size = words;673}674675// Redefinition locking. Class can only be redefined by one thread at a time.676bool is_being_redefined() const { return _is_being_redefined; }677void set_is_being_redefined(bool value) { _is_being_redefined = value; }678679// RedefineClasses() support for previous versions:680void add_previous_version(instanceKlassHandle ikh, int emcp_method_count);681682InstanceKlass* previous_versions() const { return _previous_versions; }683684bool has_been_redefined() const {685return (_misc_flags & _misc_has_been_redefined) != 0;686}687void set_has_been_redefined() {688_misc_flags |= _misc_has_been_redefined;689}690691void init_previous_versions() {692_previous_versions = NULL;693}694695696InstanceKlass* get_klass_version(int version) {697for (InstanceKlass* ik = this; ik != NULL; ik = ik->previous_versions()) {698if (ik->constants()->version() == version) {699return ik;700}701}702return NULL;703}704705static void purge_previous_versions(InstanceKlass* ik);706707// JVMTI: Support for caching a class file before it is modified by an agent that can do retransformation708void set_cached_class_file(JvmtiCachedClassFileData *data) {709_cached_class_file = data;710}711JvmtiCachedClassFileData * get_cached_class_file() { return _cached_class_file; }712jint get_cached_class_file_len();713unsigned char * get_cached_class_file_bytes();714715// JVMTI: Support for caching of field indices, types, and offsets716void set_jvmti_cached_class_field_map(JvmtiCachedClassFieldMap* descriptor) {717_jvmti_cached_class_field_map = descriptor;718}719JvmtiCachedClassFieldMap* jvmti_cached_class_field_map() const {720return _jvmti_cached_class_field_map;721}722723bool has_default_methods() const {724return (_misc_flags & _misc_has_default_methods) != 0;725}726void set_has_default_methods(bool b) {727if (b) {728_misc_flags |= _misc_has_default_methods;729} else {730_misc_flags &= ~_misc_has_default_methods;731}732}733734bool declares_default_methods() const {735return (_misc_flags & _misc_declares_default_methods) != 0;736}737void set_declares_default_methods(bool b) {738if (b) {739_misc_flags |= _misc_declares_default_methods;740} else {741_misc_flags &= ~_misc_declares_default_methods;742}743}744745// for adding methods, ConstMethod::UNSET_IDNUM means no more ids available746inline u2 next_method_idnum();747void set_initial_method_idnum(u2 value) { _idnum_allocated_count = value; }748749// generics support750Symbol* generic_signature() const {751return (_generic_signature_index == 0) ?752(Symbol*)NULL : _constants->symbol_at(_generic_signature_index);753}754u2 generic_signature_index() const {755return _generic_signature_index;756}757void set_generic_signature_index(u2 sig_index) {758_generic_signature_index = sig_index;759}760761u2 enclosing_method_data(int offset);762u2 enclosing_method_class_index() {763return enclosing_method_data(enclosing_method_class_index_offset);764}765u2 enclosing_method_method_index() {766return enclosing_method_data(enclosing_method_method_index_offset);767}768void set_enclosing_method_indices(u2 class_index,769u2 method_index);770771// jmethodID support772static jmethodID get_jmethod_id(instanceKlassHandle ik_h,773methodHandle method_h);774static jmethodID get_jmethod_id_fetch_or_update(instanceKlassHandle ik_h,775size_t idnum, jmethodID new_id, jmethodID* new_jmeths,776jmethodID* to_dealloc_id_p,777jmethodID** to_dealloc_jmeths_p);778static void get_jmethod_id_length_value(jmethodID* cache, size_t idnum,779size_t *length_p, jmethodID* id_p);780jmethodID jmethod_id_or_null(Method* method);781782// annotations support783Annotations* annotations() const { return _annotations; }784void set_annotations(Annotations* anno) { _annotations = anno; }785786AnnotationArray* class_annotations() const {787return (_annotations != NULL) ? _annotations->class_annotations() : NULL;788}789Array<AnnotationArray*>* fields_annotations() const {790return (_annotations != NULL) ? _annotations->fields_annotations() : NULL;791}792AnnotationArray* class_type_annotations() const {793return (_annotations != NULL) ? _annotations->class_type_annotations() : NULL;794}795Array<AnnotationArray*>* fields_type_annotations() const {796return (_annotations != NULL) ? _annotations->fields_type_annotations() : NULL;797}798// allocation799instanceOop allocate_instance(TRAPS);800801// additional member function to return a handle802instanceHandle allocate_instance_handle(TRAPS) { return instanceHandle(THREAD, allocate_instance(THREAD)); }803804objArrayOop allocate_objArray(int n, int length, TRAPS);805// Helper function806static instanceOop register_finalizer(instanceOop i, TRAPS);807808// Check whether reflection/jni/jvm code is allowed to instantiate this class;809// if not, throw either an Error or an Exception.810virtual void check_valid_for_instantiation(bool throwError, TRAPS);811812// initialization813void call_class_initializer(TRAPS);814void set_initialization_state_and_notify(ClassState state, TRAPS);815816// OopMapCache support817OopMapCache* oop_map_cache() { return _oop_map_cache; }818void set_oop_map_cache(OopMapCache *cache) { _oop_map_cache = cache; }819void mask_for(methodHandle method, int bci, InterpreterOopMap* entry);820821// JNI identifier support (for static fields - for jni performance)822JNIid* jni_ids() { return _jni_ids; }823void set_jni_ids(JNIid* ids) { _jni_ids = ids; }824JNIid* jni_id_for(int offset);825826// maintenance of deoptimization dependencies827int mark_dependent_nmethods(DepChange& changes);828void add_dependent_nmethod(nmethod* nm);829void remove_dependent_nmethod(nmethod* nm, bool delete_immediately);830831// On-stack replacement support832nmethod* osr_nmethods_head() const { return _osr_nmethods_head; };833void set_osr_nmethods_head(nmethod* h) { _osr_nmethods_head = h; };834void add_osr_nmethod(nmethod* n);835void remove_osr_nmethod(nmethod* n);836int mark_osr_nmethods(const Method* m);837nmethod* lookup_osr_nmethod(const Method* m, int bci, int level, bool match_level) const;838839// Breakpoint support (see methods on Method* for details)840BreakpointInfo* breakpoints() const { return _breakpoints; };841void set_breakpoints(BreakpointInfo* bps) { _breakpoints = bps; };842843// support for stub routines844static ByteSize init_state_offset() { return in_ByteSize(offset_of(InstanceKlass, _init_state)); }845JFR_ONLY(DEFINE_KLASS_TRACE_ID_OFFSET;)846static ByteSize init_thread_offset() { return in_ByteSize(offset_of(InstanceKlass, _init_thread)); }847848// subclass/subinterface checks849bool implements_interface(Klass* k) const;850bool is_same_or_direct_interface(Klass* k) const;851852#ifdef ASSERT853// check whether this class or one of its superclasses was redefined854bool has_redefined_this_or_super() const;855#endif856857// Access to the implementor of an interface.858Klass* implementor() const859{860Klass** k = adr_implementor();861if (k == NULL) {862return NULL;863} else {864return *k;865}866}867868void set_implementor(Klass* k) {869assert(is_interface(), "not interface");870Klass** addr = adr_implementor();871assert(addr != NULL, "null addr");872if (addr != NULL) {873*addr = k;874}875}876877int nof_implementors() const {878Klass* k = implementor();879if (k == NULL) {880return 0;881} else if (k != this) {882return 1;883} else {884return 2;885}886}887888void add_implementor(Klass* k); // k is a new class that implements this interface889void init_implementor(); // initialize890891// link this class into the implementors list of every interface it implements892void process_interfaces(Thread *thread);893894// virtual operations from Klass895bool is_leaf_class() const { return _subklass == NULL; }896GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots);897bool compute_is_subtype_of(Klass* k);898bool can_be_primary_super_slow() const;899int oop_size(oop obj) const { return size_helper(); }900bool oop_is_instance_slow() const { return true; }901902// Iterators903void do_local_static_fields(FieldClosure* cl);904void do_nonstatic_fields(FieldClosure* cl); // including inherited fields905void do_local_static_fields(void f(fieldDescriptor*, Handle, TRAPS), Handle, TRAPS);906907void methods_do(void f(Method* method));908void array_klasses_do(void f(Klass* k));909void array_klasses_do(void f(Klass* k, TRAPS), TRAPS);910bool super_types_do(SuperTypeClosure* blk);911912// Casting from Klass*913static InstanceKlass* cast(Klass* k) {914assert(k == NULL || k->is_klass(), "must be");915assert(k == NULL || k->oop_is_instance(), "cast to InstanceKlass");916return (InstanceKlass*) k;917}918919InstanceKlass* java_super() const {920return (super() == NULL) ? NULL : cast(super());921}922923// Sizing (in words)924static int header_size() { return align_object_offset(sizeof(InstanceKlass)/HeapWordSize); }925926static int size(int vtable_length, int itable_length,927int nonstatic_oop_map_size,928bool is_interface, bool is_anonymous) {929return align_object_size(header_size() +930align_object_offset(vtable_length) +931align_object_offset(itable_length) +932((is_interface || is_anonymous) ?933align_object_offset(nonstatic_oop_map_size) :934nonstatic_oop_map_size) +935(is_interface ? (int)sizeof(Klass*)/HeapWordSize : 0) +936(is_anonymous ? (int)sizeof(Klass*)/HeapWordSize : 0));937}938int size() const { return size(vtable_length(),939itable_length(),940nonstatic_oop_map_size(),941is_interface(),942is_anonymous());943}944#if INCLUDE_SERVICES945virtual void collect_statistics(KlassSizeStats *sz) const;946#endif947948static int vtable_start_offset() { return header_size(); }949static int vtable_length_offset() { return offset_of(InstanceKlass, _vtable_len) / HeapWordSize; }950951intptr_t* start_of_vtable() const { return ((intptr_t*)this) + vtable_start_offset(); }952intptr_t* start_of_itable() const { return start_of_vtable() + align_object_offset(vtable_length()); }953int itable_offset_in_words() const { return start_of_itable() - (intptr_t*)this; }954955intptr_t* end_of_itable() const { return start_of_itable() + itable_length(); }956957address static_field_addr(int offset);958959OopMapBlock* start_of_nonstatic_oop_maps() const {960return (OopMapBlock*)(start_of_itable() + align_object_offset(itable_length()));961}962963Klass** end_of_nonstatic_oop_maps() const {964return (Klass**)(start_of_nonstatic_oop_maps() +965nonstatic_oop_map_count());966}967968Klass** adr_implementor() const {969if (is_interface()) {970return (Klass**)end_of_nonstatic_oop_maps();971} else {972return NULL;973}974};975976Klass** adr_host_klass() const {977if (is_anonymous()) {978Klass** adr_impl = adr_implementor();979if (adr_impl != NULL) {980return adr_impl + 1;981} else {982return end_of_nonstatic_oop_maps();983}984} else {985return NULL;986}987}988989// Use this to return the size of an instance in heap words:990int size_helper() const {991return layout_helper_to_size_helper(layout_helper());992}993994// This bit is initialized in classFileParser.cpp.995// It is false under any of the following conditions:996// - the class is abstract (including any interface)997// - the class has a finalizer (if !RegisterFinalizersAtInit)998// - the class size is larger than FastAllocateSizeLimit999// - the class is java/lang/Class, which cannot be allocated directly1000bool can_be_fastpath_allocated() const {1001return !layout_helper_needs_slow_path(layout_helper());1002}10031004// Java vtable/itable1005klassVtable* vtable() const; // return new klassVtable wrapper1006inline Method* method_at_vtable(int index);1007klassItable* itable() const; // return new klassItable wrapper1008Method* method_at_itable(Klass* holder, int index, TRAPS);10091010#if INCLUDE_JVMTI1011void adjust_default_methods(InstanceKlass* holder, bool* trace_name_printed);1012#endif // INCLUDE_JVMTI10131014// Garbage collection1015void oop_follow_contents(oop obj);1016int oop_adjust_pointers(oop obj);10171018void clean_weak_instanceklass_links(BoolObjectClosure* is_alive);1019void clean_implementors_list(BoolObjectClosure* is_alive);1020void clean_method_data(BoolObjectClosure* is_alive);1021void clean_dependent_nmethods();10221023// Explicit metaspace deallocation of fields1024// For RedefineClasses and class file parsing errors, we need to deallocate1025// instanceKlasses and the metadata they point to.1026void deallocate_contents(ClassLoaderData* loader_data);1027static void deallocate_methods(ClassLoaderData* loader_data,1028Array<Method*>* methods);1029void static deallocate_interfaces(ClassLoaderData* loader_data,1030Klass* super_klass,1031Array<Klass*>* local_interfaces,1032Array<Klass*>* transitive_interfaces);10331034// The constant pool is on stack if any of the methods are executing or1035// referenced by handles.1036bool on_stack() const { return _constants->on_stack(); }10371038// callbacks for actions during class unloading1039static void notify_unload_class(InstanceKlass* ik);1040static void release_C_heap_structures(InstanceKlass* ik);10411042// Parallel Scavenge and Parallel Old1043PARALLEL_GC_DECLS10441045// Naming1046const char* signature_name() const;10471048// Iterators1049int oop_oop_iterate(oop obj, ExtendedOopClosure* blk) {1050return oop_oop_iterate_v(obj, blk);1051}10521053int oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegion mr) {1054return oop_oop_iterate_v_m(obj, blk, mr);1055}10561057#define InstanceKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \1058int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* blk); \1059int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* blk, \1060MemRegion mr);10611062ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_DECL)1063ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_DECL)10641065#if INCLUDE_ALL_GCS1066#define InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \1067int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);10681069ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)1070ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)1071#endif // INCLUDE_ALL_GCS10721073u2 idnum_allocated_count() const { return _idnum_allocated_count; }10741075public:1076void set_in_error_state() {1077assert(DumpSharedSpaces, "only call this when dumping archive");1078_init_state = initialization_error;1079}1080bool check_sharing_error_state();10811082private:1083// initialization state1084#ifdef ASSERT1085void set_init_state(ClassState state);1086#else1087void set_init_state(ClassState state) { _init_state = (u1)state; }1088#endif1089void set_rewritten() { _misc_flags |= _misc_rewritten; }1090void set_init_thread(Thread *thread) { _init_thread = thread; }10911092// The RedefineClasses() API can cause new method idnums to be needed1093// which will cause the caches to grow. Safety requires different1094// cache management logic if the caches can grow instead of just1095// going from NULL to non-NULL.1096bool idnum_can_increment() const { return has_been_redefined(); }1097jmethodID* methods_jmethod_ids_acquire() const1098{ return (jmethodID*)OrderAccess::load_ptr_acquire(&_methods_jmethod_ids); }1099void release_set_methods_jmethod_ids(jmethodID* jmeths)1100{ OrderAccess::release_store_ptr(&_methods_jmethod_ids, jmeths); }11011102// Lock during initialization1103public:1104// Lock for (1) initialization; (2) access to the ConstantPool of this class.1105// Must be one per class and it has to be a VM internal object so java code1106// cannot lock it (like the mirror).1107// It has to be an object not a Mutex because it's held through java calls.1108oop init_lock() const;1109private:1110void fence_and_clear_init_lock();11111112// Static methods that are used to implement member methods where an exposed this pointer1113// is needed due to possible GCs1114static bool link_class_impl (instanceKlassHandle this_oop, bool throw_verifyerror, TRAPS);1115static bool verify_code (instanceKlassHandle this_oop, bool throw_verifyerror, TRAPS);1116static void initialize_impl (instanceKlassHandle this_oop, TRAPS);1117static void initialize_super_interfaces (instanceKlassHandle this_oop, TRAPS);1118static void eager_initialize_impl (instanceKlassHandle this_oop);1119static void set_initialization_state_and_notify_impl (instanceKlassHandle this_oop, ClassState state, TRAPS);1120static void call_class_initializer_impl (instanceKlassHandle this_oop, TRAPS);1121static Klass* array_klass_impl (instanceKlassHandle this_oop, bool or_null, int n, TRAPS);1122static void do_local_static_fields_impl (instanceKlassHandle this_oop, void f(fieldDescriptor* fd, Handle, TRAPS), Handle, TRAPS);1123/* jni_id_for_impl for jfieldID only */1124static JNIid* jni_id_for_impl (instanceKlassHandle this_oop, int offset);11251126// Returns the array class for the n'th dimension1127Klass* array_klass_impl(bool or_null, int n, TRAPS);11281129// Returns the array class with this class as element type1130Klass* array_klass_impl(bool or_null, TRAPS);11311132// find a local method (returns NULL if not found)1133Method* find_method_impl(Symbol* name, Symbol* signature,1134OverpassLookupMode overpass_mode,1135StaticLookupMode static_mode,1136PrivateLookupMode private_mode) const;1137static Method* find_method_impl(Array<Method*>* methods,1138Symbol* name, Symbol* signature,1139OverpassLookupMode overpass_mode,1140StaticLookupMode static_mode,1141PrivateLookupMode private_mode);11421143// Free CHeap allocated fields.1144void release_C_heap_structures();11451146// RedefineClasses support1147void link_previous_versions(InstanceKlass* pv) { _previous_versions = pv; }1148void mark_newly_obsolete_methods(Array<Method*>* old_methods, int emcp_method_count);1149public:1150// CDS support - remove and restore oops from metadata. Oops are not shared.1151virtual void remove_unshareable_info();1152virtual void restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS);11531154// jvm support1155jint compute_modifier_flags(TRAPS) const;11561157// JSR-292 support1158MemberNameTable* member_names() { return _member_names; }1159void set_member_names(MemberNameTable* member_names) { _member_names = member_names; }1160oop add_member_name(Handle member_name, bool intern);11611162public:1163// JVMTI support1164jint jvmti_class_status() const;11651166public:1167// Printing1168#ifndef PRODUCT1169void print_on(outputStream* st) const;1170#endif1171void print_value_on(outputStream* st) const;11721173void oop_print_value_on(oop obj, outputStream* st);11741175#ifndef PRODUCT1176void oop_print_on (oop obj, outputStream* st);11771178void print_dependent_nmethods(bool verbose = false);1179bool is_dependent_nmethod(nmethod* nm);1180#endif11811182const char* internal_name() const;11831184// Verification1185void verify_on(outputStream* st);11861187void oop_verify_on(oop obj, outputStream* st);1188};11891190inline Method* InstanceKlass::method_at_vtable(int index) {1191#ifndef PRODUCT1192assert(index >= 0, "valid vtable index");1193if (DebugVtables) {1194verify_vtable_index(index);1195}1196#endif1197vtableEntry* ve = (vtableEntry*)start_of_vtable();1198return ve[index].method();1199}12001201// for adding methods1202// UNSET_IDNUM return means no more ids available1203inline u2 InstanceKlass::next_method_idnum() {1204if (_idnum_allocated_count == ConstMethod::MAX_IDNUM) {1205return ConstMethod::UNSET_IDNUM; // no more ids available1206} else {1207return _idnum_allocated_count++;1208}1209}121012111212/* JNIid class for jfieldIDs only */1213class JNIid: public CHeapObj<mtClass> {1214friend class VMStructs;1215private:1216Klass* _holder;1217JNIid* _next;1218int _offset;1219#ifdef ASSERT1220bool _is_static_field_id;1221#endif12221223public:1224// Accessors1225Klass* holder() const { return _holder; }1226int offset() const { return _offset; }1227JNIid* next() { return _next; }1228// Constructor1229JNIid(Klass* holder, int offset, JNIid* next);1230// Identifier lookup1231JNIid* find(int offset);12321233bool find_local_field(fieldDescriptor* fd) {1234return InstanceKlass::cast(holder())->find_local_field_from_offset(offset(), true, fd);1235}12361237static void deallocate(JNIid* id);1238// Debugging1239#ifdef ASSERT1240bool is_static_field_id() const { return _is_static_field_id; }1241void set_is_static_field_id() { _is_static_field_id = true; }1242#endif1243void verify(Klass* holder);1244};124512461247//1248// nmethodBucket is used to record dependent nmethods for1249// deoptimization. nmethod dependencies are actually <klass, method>1250// pairs but we really only care about the klass part for purposes of1251// finding nmethods which might need to be deoptimized. Instead of1252// recording the method, a count of how many times a particular nmethod1253// was recorded is kept. This ensures that any recording errors are1254// noticed since an nmethod should be removed as many times are it's1255// added.1256//1257class nmethodBucket: public CHeapObj<mtClass> {1258friend class VMStructs;1259private:1260nmethod* _nmethod;1261int _count;1262nmethodBucket* _next;12631264public:1265nmethodBucket(nmethod* nmethod, nmethodBucket* next) {1266_nmethod = nmethod;1267_next = next;1268_count = 1;1269}1270int count() { return _count; }1271int increment() { _count += 1; return _count; }1272int decrement();1273nmethodBucket* next() { return _next; }1274void set_next(nmethodBucket* b) { _next = b; }1275nmethod* get_nmethod() { return _nmethod; }1276};12771278// An iterator that's used to access the inner classes indices in the1279// InstanceKlass::_inner_classes array.1280class InnerClassesIterator : public StackObj {1281private:1282Array<jushort>* _inner_classes;1283int _length;1284int _idx;1285public:12861287InnerClassesIterator(instanceKlassHandle k) {1288_inner_classes = k->inner_classes();1289if (k->inner_classes() != NULL) {1290_length = _inner_classes->length();1291// The inner class array's length should be the multiple of1292// inner_class_next_offset if it only contains the InnerClasses1293// attribute data, or it should be1294// n*inner_class_next_offset+enclosing_method_attribute_size1295// if it also contains the EnclosingMethod data.1296assert((_length % InstanceKlass::inner_class_next_offset == 0 ||1297_length % InstanceKlass::inner_class_next_offset == InstanceKlass::enclosing_method_attribute_size),1298"just checking");1299// Remove the enclosing_method portion if exists.1300if (_length % InstanceKlass::inner_class_next_offset == InstanceKlass::enclosing_method_attribute_size) {1301_length -= InstanceKlass::enclosing_method_attribute_size;1302}1303} else {1304_length = 0;1305}1306_idx = 0;1307}13081309int length() const {1310return _length;1311}13121313void next() {1314_idx += InstanceKlass::inner_class_next_offset;1315}13161317bool done() const {1318return (_idx >= _length);1319}13201321u2 inner_class_info_index() const {1322return _inner_classes->at(1323_idx + InstanceKlass::inner_class_inner_class_info_offset);1324}13251326void set_inner_class_info_index(u2 index) {1327_inner_classes->at_put(1328_idx + InstanceKlass::inner_class_inner_class_info_offset, index);1329}13301331u2 outer_class_info_index() const {1332return _inner_classes->at(1333_idx + InstanceKlass::inner_class_outer_class_info_offset);1334}13351336void set_outer_class_info_index(u2 index) {1337_inner_classes->at_put(1338_idx + InstanceKlass::inner_class_outer_class_info_offset, index);1339}13401341u2 inner_name_index() const {1342return _inner_classes->at(1343_idx + InstanceKlass::inner_class_inner_name_offset);1344}13451346void set_inner_name_index(u2 index) {1347_inner_classes->at_put(1348_idx + InstanceKlass::inner_class_inner_name_offset, index);1349}13501351u2 inner_access_flags() const {1352return _inner_classes->at(1353_idx + InstanceKlass::inner_class_access_flags_offset);1354}1355};13561357#endif // SHARE_VM_OOPS_INSTANCEKLASS_HPP135813591360