提交 32bcf50c 编写于 作者: D dholmes

7167406: (Zero) Fix for InvokeDynamic needed

Reviewed-by: chrisphi, dholmes
Contributed-by: NAndrew Dinn <adinn@redhat.com>
上级 df550cbe
...@@ -1026,6 +1026,16 @@ void CppInterpreter::process_method_handle(oop method_handle, TRAPS) { ...@@ -1026,6 +1026,16 @@ void CppInterpreter::process_method_handle(oop method_handle, TRAPS) {
java_lang_invoke_AdapterMethodHandle::vmargslot(method_handle); java_lang_invoke_AdapterMethodHandle::vmargslot(method_handle);
oop arg = VMSLOTS_OBJECT(arg_slot); oop arg = VMSLOTS_OBJECT(arg_slot);
jvalue arg_value; jvalue arg_value;
if (arg == NULL) {
// queue a nullpointer exception for the caller
stack->set_sp(calculate_unwind_sp(stack, method_handle));
CALL_VM_NOCHECK_NOFIX(
throw_exception(
thread, vmSymbols::java_lang_NullPointerException()));
// NB all oops trashed!
assert(HAS_PENDING_EXCEPTION, "should do");
return;
}
BasicType arg_type = java_lang_boxing_object::get_value(arg, &arg_value); BasicType arg_type = java_lang_boxing_object::get_value(arg, &arg_value);
if (arg_type == T_LONG || arg_type == T_DOUBLE) { if (arg_type == T_LONG || arg_type == T_DOUBLE) {
intptr_t *unwind_sp = calculate_unwind_sp(stack, method_handle); intptr_t *unwind_sp = calculate_unwind_sp(stack, method_handle);
...@@ -1112,6 +1122,15 @@ void CppInterpreter::process_method_handle(oop method_handle, TRAPS) { ...@@ -1112,6 +1122,15 @@ void CppInterpreter::process_method_handle(oop method_handle, TRAPS) {
case T_SHORT: case T_SHORT:
return; return;
} }
// INT results sometimes need narrowing
case T_BOOLEAN:
case T_CHAR:
case T_BYTE:
case T_SHORT:
switch (src_rtype) {
case T_INT:
return;
}
} }
tty->print_cr("unhandled conversion:"); tty->print_cr("unhandled conversion:");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册