提交 1797d8c0 编写于 作者: A acorn

Merge

...@@ -450,6 +450,10 @@ class MethodFamily : public ResourceObj { ...@@ -450,6 +450,10 @@ class MethodFamily : public ResourceObj {
streamIndentor si(str, indent * 2); streamIndentor si(str, indent * 2);
str->indent().print("Selected method: "); str->indent().print("Selected method: ");
print_method(str, _selected_target); print_method(str, _selected_target);
Klass* method_holder = _selected_target->method_holder();
if (!method_holder->is_interface()) {
tty->print(" : in superclass");
}
str->print_cr(""); str->print_cr("");
} }
...@@ -1141,12 +1145,15 @@ static void create_overpasses( ...@@ -1141,12 +1145,15 @@ static void create_overpasses(
#endif // ndef PRODUCT #endif // ndef PRODUCT
if (method->has_target()) { if (method->has_target()) {
Method* selected = method->get_selected_target(); Method* selected = method->get_selected_target();
if (selected->method_holder()->is_interface()) {
max_stack = assemble_redirect( max_stack = assemble_redirect(
&bpool, &buffer, slot->signature(), selected, CHECK); &bpool, &buffer, slot->signature(), selected, CHECK);
}
} else if (method->throws_exception()) { } else if (method->throws_exception()) {
max_stack = assemble_abstract_method_error( max_stack = assemble_abstract_method_error(
&bpool, &buffer, method->get_exception_message(), CHECK); &bpool, &buffer, method->get_exception_message(), CHECK);
} }
if (max_stack != 0) {
AccessFlags flags = accessFlags_from( AccessFlags flags = accessFlags_from(
JVM_ACC_PUBLIC | JVM_ACC_SYNTHETIC | JVM_ACC_BRIDGE); JVM_ACC_PUBLIC | JVM_ACC_SYNTHETIC | JVM_ACC_BRIDGE);
Method* m = new_method(&bpool, &buffer, slot->name(), slot->signature(), Method* m = new_method(&bpool, &buffer, slot->name(), slot->signature(),
...@@ -1157,6 +1164,7 @@ static void create_overpasses( ...@@ -1157,6 +1164,7 @@ static void create_overpasses(
} }
} }
} }
}
#ifndef PRODUCT #ifndef PRODUCT
if (TraceDefaultMethods) { if (TraceDefaultMethods) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册