comparison src/cpu/zero/vm/cppInterpreter_zero.cpp @ 6071:7f410b6ea66c

7167406: (Zero) Fix for InvokeDynamic needed Reviewed-by: chrisphi, dholmes Contributed-by: Andrew Dinn <adinn@redhat.com>
author dholmes
date Wed, 09 May 2012 00:28:45 -0400
parents d83ac25d0304
children 1d7922586cf6
comparison
equal deleted inserted replaced
5946:3d7ea1dbe0de 6071:7f410b6ea66c
1024 { 1024 {
1025 int arg_slot = 1025 int arg_slot =
1026 java_lang_invoke_AdapterMethodHandle::vmargslot(method_handle); 1026 java_lang_invoke_AdapterMethodHandle::vmargslot(method_handle);
1027 oop arg = VMSLOTS_OBJECT(arg_slot); 1027 oop arg = VMSLOTS_OBJECT(arg_slot);
1028 jvalue arg_value; 1028 jvalue arg_value;
1029 if (arg == NULL) {
1030 // queue a nullpointer exception for the caller
1031 stack->set_sp(calculate_unwind_sp(stack, method_handle));
1032 CALL_VM_NOCHECK_NOFIX(
1033 throw_exception(
1034 thread, vmSymbols::java_lang_NullPointerException()));
1035 // NB all oops trashed!
1036 assert(HAS_PENDING_EXCEPTION, "should do");
1037 return;
1038 }
1029 BasicType arg_type = java_lang_boxing_object::get_value(arg, &arg_value); 1039 BasicType arg_type = java_lang_boxing_object::get_value(arg, &arg_value);
1030 if (arg_type == T_LONG || arg_type == T_DOUBLE) { 1040 if (arg_type == T_LONG || arg_type == T_DOUBLE) {
1031 intptr_t *unwind_sp = calculate_unwind_sp(stack, method_handle); 1041 intptr_t *unwind_sp = calculate_unwind_sp(stack, method_handle);
1032 insert_vmslots(arg_slot, 1, THREAD); 1042 insert_vmslots(arg_slot, 1, THREAD);
1033 if (HAS_PENDING_EXCEPTION) { 1043 if (HAS_PENDING_EXCEPTION) {
1110 case T_CHAR: 1120 case T_CHAR:
1111 case T_BYTE: 1121 case T_BYTE:
1112 case T_SHORT: 1122 case T_SHORT:
1113 return; 1123 return;
1114 } 1124 }
1125 // INT results sometimes need narrowing
1126 case T_BOOLEAN:
1127 case T_CHAR:
1128 case T_BYTE:
1129 case T_SHORT:
1130 switch (src_rtype) {
1131 case T_INT:
1132 return;
1133 }
1115 } 1134 }
1116 1135
1117 tty->print_cr("unhandled conversion:"); 1136 tty->print_cr("unhandled conversion:");
1118 tty->print_cr("src_rtype = %s", type2name(src_rtype)); 1137 tty->print_cr("src_rtype = %s", type2name(src_rtype));
1119 tty->print_cr("dst_rtype = %s", type2name(dst_rtype)); 1138 tty->print_cr("dst_rtype = %s", type2name(dst_rtype));