diff options
author | zgu <none@none> | 2012-05-22 20:29:05 -0400 |
---|---|---|
committer | zgu <none@none> | 2012-05-22 20:29:05 -0400 |
commit | 57fc1ff2ecfdcd7ea98f4ad0f1e8677db656b2b6 (patch) | |
tree | 18352a0f168e92cce2cabaa30bd7460b4070787a /src/cpu | |
parent | db5f939ea66486c4c15768e9f727bdd943a89cd8 (diff) | |
parent | cf8088aac7e68db13a2ffe3b24353fb9bb260d7c (diff) |
Merge
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/zero/vm/cppInterpreter_zero.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/cpu/zero/vm/cppInterpreter_zero.cpp b/src/cpu/zero/vm/cppInterpreter_zero.cpp index 0beb4cdad..ec2805b4d 100644 --- a/src/cpu/zero/vm/cppInterpreter_zero.cpp +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp @@ -1026,6 +1026,16 @@ void CppInterpreter::process_method_handle(oop method_handle, TRAPS) { java_lang_invoke_AdapterMethodHandle::vmargslot(method_handle); oop arg = VMSLOTS_OBJECT(arg_slot); 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); if (arg_type == T_LONG || arg_type == T_DOUBLE) { intptr_t *unwind_sp = calculate_unwind_sp(stack, method_handle); @@ -1112,6 +1122,15 @@ void CppInterpreter::process_method_handle(oop method_handle, TRAPS) { case T_SHORT: 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:"); |