8308655: Narrow types of ConstantPool and ConstMethod returns

Reviewed-by: fparain, matsaave
This commit is contained in:
Coleen Phillimore 2023-05-25 11:52:40 +00:00
parent 5a0a238f67
commit 2599ada152
31 changed files with 162 additions and 161 deletions

View file

@ -2511,7 +2511,9 @@ void InstanceKlass::metaspace_pointers_do(MetaspaceClosure* it) {
if (itable_length() > 0) {
itableOffsetEntry* ioe = (itableOffsetEntry*)start_of_itable();
int method_table_offset_in_words = ioe->offset()/wordSize;
int nof_interfaces = (method_table_offset_in_words - itable_offset_in_words())
int itable_offset_in_words = (int)(start_of_itable() - (intptr_t*)this);
int nof_interfaces = (method_table_offset_in_words - itable_offset_in_words)
/ itableOffsetEntry::size();
for (int i = 0; i < nof_interfaces; i ++, ioe ++) {