Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/sharedRuntime.cpp @ 1805:a25394352030
Merge
author | kamg |
---|---|
date | Wed, 22 Sep 2010 12:54:51 -0400 |
parents | d257356e35f0 |
children | 3dc12ef8735e |
line wrap: on
line diff
--- a/src/share/vm/runtime/sharedRuntime.cpp Tue Sep 21 06:58:44 2010 -0700 +++ b/src/share/vm/runtime/sharedRuntime.cpp Wed Sep 22 12:54:51 2010 -0400 @@ -1633,8 +1633,13 @@ char* SharedRuntime::generate_wrong_method_type_message(JavaThread* thread, oopDesc* required, oopDesc* actual) { + if (TraceMethodHandles) { + tty->print_cr("WrongMethodType thread="PTR_FORMAT" req="PTR_FORMAT" act="PTR_FORMAT"", + thread, required, actual); + } assert(EnableMethodHandles, ""); oop singleKlass = wrong_method_type_is_for_single_argument(thread, required); + char* message = NULL; if (singleKlass != NULL) { const char* objName = "argument or return value"; if (actual != NULL) { @@ -1647,7 +1652,7 @@ Klass* targetKlass = Klass::cast(required->is_klass() ? (klassOop)required : java_lang_Class::as_klassOop(required)); - return generate_class_cast_message(objName, targetKlass->external_name()); + message = generate_class_cast_message(objName, targetKlass->external_name()); } else { // %%% need to get the MethodType string, without messing around too much // Get a signature from the invoke instruction @@ -1679,9 +1684,13 @@ if (mhName[0] == '$') mhName = actual_method->signature()->as_C_string(); } - return generate_class_cast_message(mhName, targetType, - " cannot be called as "); + message = generate_class_cast_message(mhName, targetType, + " cannot be called as "); } + if (TraceMethodHandles) { + tty->print_cr("WrongMethodType => message=%s", message); + } + return message; } oop SharedRuntime::wrong_method_type_is_for_single_argument(JavaThread* thr,