< prev index next >

src/hotspot/share/oops/cpCache.cpp

Print this page


 476   }
 477 
 478   Symbol* error = PENDING_EXCEPTION->klass()->name();
 479   Symbol* message = java_lang_Throwable::detail_message(PENDING_EXCEPTION);
 480   assert(message != NULL, "Missing detail message");
 481 
 482   SystemDictionary::add_resolution_error(cpool, index, error, message);
 483   set_indy_resolution_failed();
 484   return true;
 485 }
 486 
 487 Method* ConstantPoolCacheEntry::method_if_resolved(const constantPoolHandle& cpool) {
 488   // Decode the action of set_method and set_interface_call
 489   Bytecodes::Code invoke_code = bytecode_1();
 490   if (invoke_code != (Bytecodes::Code)0) {
 491     Metadata* f1 = f1_ord();
 492     if (f1 != NULL) {
 493       switch (invoke_code) {
 494       case Bytecodes::_invokeinterface:
 495         assert(f1->is_klass(), "");
 496         return klassItable::method_for_itable_index((Klass*)f1, f2_as_index());
 497       case Bytecodes::_invokestatic:
 498       case Bytecodes::_invokespecial:
 499         assert(!has_appendix(), "");
 500       case Bytecodes::_invokehandle:
 501       case Bytecodes::_invokedynamic:
 502         assert(f1->is_method(), "");
 503         return (Method*)f1;
 504       default:
 505         break;
 506       }
 507     }
 508   }
 509   invoke_code = bytecode_2();
 510   if (invoke_code != (Bytecodes::Code)0) {
 511     switch (invoke_code) {
 512     case Bytecodes::_invokevirtual:
 513       if (is_vfinal()) {
 514         // invokevirtual
 515         Method* m = f2_as_vfinal_method();
 516         assert(m->is_method(), "");




 476   }
 477 
 478   Symbol* error = PENDING_EXCEPTION->klass()->name();
 479   Symbol* message = java_lang_Throwable::detail_message(PENDING_EXCEPTION);
 480   assert(message != NULL, "Missing detail message");
 481 
 482   SystemDictionary::add_resolution_error(cpool, index, error, message);
 483   set_indy_resolution_failed();
 484   return true;
 485 }
 486 
 487 Method* ConstantPoolCacheEntry::method_if_resolved(const constantPoolHandle& cpool) {
 488   // Decode the action of set_method and set_interface_call
 489   Bytecodes::Code invoke_code = bytecode_1();
 490   if (invoke_code != (Bytecodes::Code)0) {
 491     Metadata* f1 = f1_ord();
 492     if (f1 != NULL) {
 493       switch (invoke_code) {
 494       case Bytecodes::_invokeinterface:
 495         assert(f1->is_klass(), "");
 496         return klassItable::method_for_itable_index((InstanceKlass*)f1, f2_as_index());
 497       case Bytecodes::_invokestatic:
 498       case Bytecodes::_invokespecial:
 499         assert(!has_appendix(), "");
 500       case Bytecodes::_invokehandle:
 501       case Bytecodes::_invokedynamic:
 502         assert(f1->is_method(), "");
 503         return (Method*)f1;
 504       default:
 505         break;
 506       }
 507     }
 508   }
 509   invoke_code = bytecode_2();
 510   if (invoke_code != (Bytecodes::Code)0) {
 511     switch (invoke_code) {
 512     case Bytecodes::_invokevirtual:
 513       if (is_vfinal()) {
 514         // invokevirtual
 515         Method* m = f2_as_vfinal_method();
 516         assert(m->is_method(), "");


< prev index next >