933 bool is_interface, bool is_anonymous) { 934 return align_object_size(header_size() + 935 align_object_offset(vtable_length) + 936 align_object_offset(itable_length) + 937 ((is_interface || is_anonymous) ? 938 align_object_offset(nonstatic_oop_map_size) : 939 nonstatic_oop_map_size) + 940 (is_interface ? (int)sizeof(Klass*)/HeapWordSize : 0) + 941 (is_anonymous ? (int)sizeof(Klass*)/HeapWordSize : 0)); 942 } 943 int size() const { return size(vtable_length(), 944 itable_length(), 945 nonstatic_oop_map_size(), 946 is_interface(), 947 is_anonymous()); 948 } 949 #if INCLUDE_SERVICES 950 virtual void collect_statistics(KlassSizeStats *sz) const; 951 #endif 952 953 static int vtable_start_offset() { return header_size(); } 954 static int vtable_length_offset() { return offset_of(InstanceKlass, _vtable_len) / HeapWordSize; } 955 956 intptr_t* start_of_vtable() const { return ((intptr_t*)this) + vtable_start_offset(); } 957 intptr_t* start_of_itable() const { return start_of_vtable() + align_object_offset(vtable_length()); } 958 int itable_offset_in_words() const { return start_of_itable() - (intptr_t*)this; } 959 960 intptr_t* end_of_itable() const { return start_of_itable() + itable_length(); } 961 962 address static_field_addr(int offset); 963 964 OopMapBlock* start_of_nonstatic_oop_maps() const { 965 return (OopMapBlock*)(start_of_itable() + align_object_offset(itable_length())); 966 } 967 968 Klass** end_of_nonstatic_oop_maps() const { 969 return (Klass**)(start_of_nonstatic_oop_maps() + 970 nonstatic_oop_map_count()); 971 } 972 973 Klass** adr_implementor() const { 974 if (is_interface()) { 975 return (Klass**)end_of_nonstatic_oop_maps(); 976 } else { | 933 bool is_interface, bool is_anonymous) { 934 return align_object_size(header_size() + 935 align_object_offset(vtable_length) + 936 align_object_offset(itable_length) + 937 ((is_interface || is_anonymous) ? 938 align_object_offset(nonstatic_oop_map_size) : 939 nonstatic_oop_map_size) + 940 (is_interface ? (int)sizeof(Klass*)/HeapWordSize : 0) + 941 (is_anonymous ? (int)sizeof(Klass*)/HeapWordSize : 0)); 942 } 943 int size() const { return size(vtable_length(), 944 itable_length(), 945 nonstatic_oop_map_size(), 946 is_interface(), 947 is_anonymous()); 948 } 949 #if INCLUDE_SERVICES 950 virtual void collect_statistics(KlassSizeStats *sz) const; 951 #endif 952 953 static ByteSize vtable_start_offset() { return in_ByteSize(header_size() * wordSize); } 954 static ByteSize vtable_length_offset() { return byte_offset_of(InstanceKlass, _vtable_len); } 955 956 intptr_t* start_of_vtable() const { return (intptr_t*) ((address)this + in_bytes(vtable_start_offset())); } 957 intptr_t* start_of_itable() const { return start_of_vtable() + align_object_offset(vtable_length()); } 958 int itable_offset_in_words() const { return start_of_itable() - (intptr_t*)this; } 959 960 intptr_t* end_of_itable() const { return start_of_itable() + itable_length(); } 961 962 address static_field_addr(int offset); 963 964 OopMapBlock* start_of_nonstatic_oop_maps() const { 965 return (OopMapBlock*)(start_of_itable() + align_object_offset(itable_length())); 966 } 967 968 Klass** end_of_nonstatic_oop_maps() const { 969 return (Klass**)(start_of_nonstatic_oop_maps() + 970 nonstatic_oop_map_count()); 971 } 972 973 Klass** adr_implementor() const { 974 if (is_interface()) { 975 return (Klass**)end_of_nonstatic_oop_maps(); 976 } else { |