comparison src/share/vm/oops/cpCache.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 f6b0eb4e44cf
children a4e1bd941ded 070d523b96a7
comparison
equal deleted inserted replaced
6939:c284cf4781f0 6940:18fb7da42534
229 NOT_PRODUCT(verify(tty)); 229 NOT_PRODUCT(verify(tty));
230 } 230 }
231 231
232 232
233 void ConstantPoolCacheEntry::set_interface_call(methodHandle method, int index) { 233 void ConstantPoolCacheEntry::set_interface_call(methodHandle method, int index) {
234 Klass* interf = method->method_holder(); 234 InstanceKlass* interf = method->method_holder();
235 assert(InstanceKlass::cast(interf)->is_interface(), "must be an interface"); 235 assert(interf->is_interface(), "must be an interface");
236 assert(!method->is_final_method(), "interfaces do not have final methods; cannot link to one here"); 236 assert(!method->is_final_method(), "interfaces do not have final methods; cannot link to one here");
237 set_f1(interf); 237 set_f1(interf);
238 set_f2(index); 238 set_f2(index);
239 set_method_flags(as_TosState(method->result_type()), 239 set_method_flags(as_TosState(method->result_type()),
240 0, // no option bits 240 0, // no option bits
419 _f2 = (intptr_t)new_method; 419 _f2 = (intptr_t)new_method;
420 if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) { 420 if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) {
421 if (!(*trace_name_printed)) { 421 if (!(*trace_name_printed)) {
422 // RC_TRACE_MESG macro has an embedded ResourceMark 422 // RC_TRACE_MESG macro has an embedded ResourceMark
423 RC_TRACE_MESG(("adjust: name=%s", 423 RC_TRACE_MESG(("adjust: name=%s",
424 Klass::cast(old_method->method_holder())->external_name())); 424 old_method->method_holder()->external_name()));
425 *trace_name_printed = true; 425 *trace_name_printed = true;
426 } 426 }
427 // RC_TRACE macro has an embedded ResourceMark 427 // RC_TRACE macro has an embedded ResourceMark
428 RC_TRACE(0x00400000, ("cpc vf-entry update: %s(%s)", 428 RC_TRACE(0x00400000, ("cpc vf-entry update: %s(%s)",
429 new_method->name()->as_C_string(), 429 new_method->name()->as_C_string(),
447 _f1 = new_method; 447 _f1 = new_method;
448 if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) { 448 if (RC_TRACE_IN_RANGE(0x00100000, 0x00400000)) {
449 if (!(*trace_name_printed)) { 449 if (!(*trace_name_printed)) {
450 // RC_TRACE_MESG macro has an embedded ResourceMark 450 // RC_TRACE_MESG macro has an embedded ResourceMark
451 RC_TRACE_MESG(("adjust: name=%s", 451 RC_TRACE_MESG(("adjust: name=%s",
452 Klass::cast(old_method->method_holder())->external_name())); 452 old_method->method_holder()->external_name()));
453 *trace_name_printed = true; 453 *trace_name_printed = true;
454 } 454 }
455 // RC_TRACE macro has an embedded ResourceMark 455 // RC_TRACE macro has an embedded ResourceMark
456 RC_TRACE(0x00400000, ("cpc entry update: %s(%s)", 456 RC_TRACE(0x00400000, ("cpc entry update: %s(%s)",
457 new_method->name()->as_C_string(), 457 new_method->name()->as_C_string(),