hotspot/src/share/vm/interpreter/linkResolver.cpp
changeset 33105 294e48b4f704
parent 32189 5264b560ab1b
child 33198 b37ad9fbf681
equal deleted inserted replaced
33104:a7c0f60a1294 33105:294e48b4f704
   177 #ifdef ASSERT
   177 #ifdef ASSERT
   178     // Ensure that this is really the case.
   178     // Ensure that this is really the case.
   179     KlassHandle object_klass = SystemDictionary::Object_klass();
   179     KlassHandle object_klass = SystemDictionary::Object_klass();
   180     Method * object_resolved_method = object_klass()->vtable()->method_at(index);
   180     Method * object_resolved_method = object_klass()->vtable()->method_at(index);
   181     assert(object_resolved_method->name() == resolved_method->name(),
   181     assert(object_resolved_method->name() == resolved_method->name(),
   182       err_msg("Object and interface method names should match at vtable index %d, %s != %s",
   182       "Object and interface method names should match at vtable index %d, %s != %s",
   183       index, object_resolved_method->name()->as_C_string(), resolved_method->name()->as_C_string()));
   183       index, object_resolved_method->name()->as_C_string(), resolved_method->name()->as_C_string());
   184     assert(object_resolved_method->signature() == resolved_method->signature(),
   184     assert(object_resolved_method->signature() == resolved_method->signature(),
   185       err_msg("Object and interface method signatures should match at vtable index %d, %s != %s",
   185       "Object and interface method signatures should match at vtable index %d, %s != %s",
   186       index, object_resolved_method->signature()->as_C_string(), resolved_method->signature()->as_C_string()));
   186       index, object_resolved_method->signature()->as_C_string(), resolved_method->signature()->as_C_string());
   187 #endif // ASSERT
   187 #endif // ASSERT
   188 
   188 
   189     kind = CallInfo::vtable_call;
   189     kind = CallInfo::vtable_call;
   190   } else {
   190   } else {
   191     // A regular interface call.
   191     // A regular interface call.
   192     kind = CallInfo::itable_call;
   192     kind = CallInfo::itable_call;
   193     index = resolved_method->itable_index();
   193     index = resolved_method->itable_index();
   194   }
   194   }
   195   assert(index == Method::nonvirtual_vtable_index || index >= 0, err_msg("bad index %d", index));
   195   assert(index == Method::nonvirtual_vtable_index || index >= 0, "bad index %d", index);
   196   _call_kind  = kind;
   196   _call_kind  = kind;
   197   _call_index = index;
   197   _call_index = index;
   198   _resolved_appendix = Handle();
   198   _resolved_appendix = Handle();
   199   DEBUG_ONLY(verify());
   199   DEBUG_ONLY(verify());
   200 }
   200 }
   213     break;
   213     break;
   214   case CallInfo::unknown_kind:
   214   case CallInfo::unknown_kind:
   215     assert(call_kind() != CallInfo::unknown_kind, "CallInfo must be set");
   215     assert(call_kind() != CallInfo::unknown_kind, "CallInfo must be set");
   216     break;
   216     break;
   217   default:
   217   default:
   218     fatal(err_msg_res("Unexpected call kind %d", call_kind()));
   218     fatal("Unexpected call kind %d", call_kind());
   219   }
   219   }
   220 }
   220 }
   221 #endif //ASSERT
   221 #endif //ASSERT
   222 
   222 
   223 #ifndef PRODUCT
   223 #ifndef PRODUCT
   497           tty->print_cr("*** basic_signature=%s", basic_signature->as_C_string());
   497           tty->print_cr("*** basic_signature=%s", basic_signature->as_C_string());
   498           tty->print_cr("*** result for %s: ", vmIntrinsics::name_at(iid));
   498           tty->print_cr("*** result for %s: ", vmIntrinsics::name_at(iid));
   499           result->print();
   499           result->print();
   500         }
   500         }
   501         assert(actual_size_of_params == expected_size_of_params,
   501         assert(actual_size_of_params == expected_size_of_params,
   502                err_msg("%d != %d", actual_size_of_params, expected_size_of_params));
   502                "%d != %d", actual_size_of_params, expected_size_of_params);
   503 #endif //ASSERT
   503 #endif //ASSERT
   504 
   504 
   505         assert(appendix_result_or_null != NULL, "");
   505         assert(appendix_result_or_null != NULL, "");
   506         (*appendix_result_or_null) = appendix;
   506         (*appendix_result_or_null) = appendix;
   507         (*method_type_result)      = method_type;
   507         (*method_type_result)      = method_type;