< prev index next >

src/hotspot/share/classfile/vmSymbols.cpp

Print this page




1052   ID declared_id = match_method_with_klass(m, mk);
1053 
1054   if (declared_id == actual_id)  return; // success
1055 
1056   if (declared_id == _none && actual_id != _none && mk == vmSymbols::java_lang_StrictMath()) {
1057     // Here are a few special cases in StrictMath not declared in vmSymbols.hpp.
1058     switch (actual_id) {
1059     case _min:
1060     case _max:
1061     case _dsqrt:
1062       declared_id = match_method_with_klass(m, vmSymbols::java_lang_Math());
1063       if (declared_id == actual_id)  return; // acceptable alias
1064       break;
1065     default:
1066         break;
1067     }
1068   }
1069 
1070   const char* declared_name = name_at(declared_id);
1071   const char* actual_name   = name_at(actual_id);
1072   methodHandle mh = m;
1073   m = NULL;
1074   ttyLocker ttyl;
1075   if (xtty != NULL) {
1076     xtty->begin_elem("intrinsic_misdeclared actual='%s' declared='%s'",
1077                      actual_name, declared_name);
1078     xtty->method(mh);
1079     xtty->end_elem("%s", "");
1080   }
1081   if (PrintMiscellaneous && (WizardMode || Verbose)) {
1082     tty->print_cr("*** misidentified method; %s(%d) should be %s(%d):",
1083                   declared_name, declared_id, actual_name, actual_id);
1084     mh()->print_short_name(tty);
1085     tty->cr();
1086   }
1087 }
1088 #endif //PRODUCT


1052   ID declared_id = match_method_with_klass(m, mk);
1053 
1054   if (declared_id == actual_id)  return; // success
1055 
1056   if (declared_id == _none && actual_id != _none && mk == vmSymbols::java_lang_StrictMath()) {
1057     // Here are a few special cases in StrictMath not declared in vmSymbols.hpp.
1058     switch (actual_id) {
1059     case _min:
1060     case _max:
1061     case _dsqrt:
1062       declared_id = match_method_with_klass(m, vmSymbols::java_lang_Math());
1063       if (declared_id == actual_id)  return; // acceptable alias
1064       break;
1065     default:
1066         break;
1067     }
1068   }
1069 
1070   const char* declared_name = name_at(declared_id);
1071   const char* actual_name   = name_at(actual_id);

1072   m = NULL;
1073   ttyLocker ttyl;
1074   if (xtty != NULL) {
1075     xtty->begin_elem("intrinsic_misdeclared actual='%s' declared='%s'",
1076                      actual_name, declared_name);
1077     xtty->method(m);
1078     xtty->end_elem("%s", "");
1079   }
1080   if (PrintMiscellaneous && (WizardMode || Verbose)) {
1081     tty->print_cr("*** misidentified method; %s(%d) should be %s(%d):",
1082                   declared_name, declared_id, actual_name, actual_id);
1083     m->print_short_name(tty);
1084     tty->cr();
1085   }
1086 }
1087 #endif //PRODUCT
< prev index next >