comparison src/share/vm/runtime/deoptimization.cpp @ 6940:18fb7da42534

8000725: NPG: method_holder() and pool_holder() and pool_holder field should be InstanceKlass Summary: Change types of above methods and field to InstanceKlass and remove unneeded casts from the source files. Reviewed-by: dholmes, coleenp, zgu Contributed-by: harold.seigel@oracle.com
author coleenp
date Tue, 06 Nov 2012 15:09:37 -0500
parents d804e148cff8
children e522a00b91aa d0aa87f04bd5 ee32440febeb
comparison
equal deleted inserted replaced
6939:c284cf4781f0 6940:18fb7da42534
1189 return; 1189 return;
1190 } 1190 }
1191 1191
1192 if (!constant_pool->tag_at(index).is_symbol()) return; 1192 if (!constant_pool->tag_at(index).is_symbol()) return;
1193 1193
1194 Handle class_loader (THREAD, InstanceKlass::cast(constant_pool->pool_holder())->class_loader()); 1194 Handle class_loader (THREAD, constant_pool->pool_holder()->class_loader());
1195 Symbol* symbol = constant_pool->symbol_at(index); 1195 Symbol* symbol = constant_pool->symbol_at(index);
1196 1196
1197 // class name? 1197 // class name?
1198 if (symbol->byte_at(0) != '(') { 1198 if (symbol->byte_at(0) != '(') {
1199 Handle protection_domain (THREAD, Klass::cast(constant_pool->pool_holder())->protection_domain()); 1199 Handle protection_domain (THREAD, constant_pool->pool_holder()->protection_domain());
1200 SystemDictionary::resolve_or_null(symbol, class_loader, protection_domain, CHECK); 1200 SystemDictionary::resolve_or_null(symbol, class_loader, protection_domain, CHECK);
1201 return; 1201 return;
1202 } 1202 }
1203 1203
1204 // then it must be a signature! 1204 // then it must be a signature!
1205 ResourceMark rm(THREAD); 1205 ResourceMark rm(THREAD);
1206 for (SignatureStream ss(symbol); !ss.is_done(); ss.next()) { 1206 for (SignatureStream ss(symbol); !ss.is_done(); ss.next()) {
1207 if (ss.is_object()) { 1207 if (ss.is_object()) {
1208 Symbol* class_name = ss.as_symbol(CHECK); 1208 Symbol* class_name = ss.as_symbol(CHECK);
1209 Handle protection_domain (THREAD, Klass::cast(constant_pool->pool_holder())->protection_domain()); 1209 Handle protection_domain (THREAD, constant_pool->pool_holder()->protection_domain());
1210 SystemDictionary::resolve_or_null(class_name, class_loader, protection_domain, CHECK); 1210 SystemDictionary::resolve_or_null(class_name, class_loader, protection_domain, CHECK);
1211 } 1211 }
1212 } 1212 }
1213 } 1213 }
1214 1214