diff -r a04f8bf14d45 -r cbcfa2a6fe0b hotspot/src/share/vm/jvmci/jvmciRuntime.cpp --- a/hotspot/src/share/vm/jvmci/jvmciRuntime.cpp Fri Nov 06 08:45:13 2015 +0000 +++ b/hotspot/src/share/vm/jvmci/jvmciRuntime.cpp Fri Nov 06 10:06:51 2015 -1000 @@ -59,7 +59,11 @@ static const char* OPTION_PREFIX = "jvmci.option."; static const size_t OPTION_PREFIX_LEN = strlen(OPTION_PREFIX); -BasicType JVMCIRuntime::kindToBasicType(jchar ch) { +BasicType JVMCIRuntime::kindToBasicType(Handle kind, TRAPS) { + if (kind.is_null()) { + THROW_(vmSymbols::java_lang_NullPointerException(), T_ILLEGAL); + } + jchar ch = JavaKind::typeChar(kind); switch(ch) { case 'z': return T_BOOLEAN; case 'b': return T_BYTE; @@ -72,10 +76,8 @@ case 'a': return T_OBJECT; case '-': return T_ILLEGAL; default: - fatal("unexpected Kind: %c", ch); - break; + JVMCI_ERROR_(T_ILLEGAL, "unexpected Kind: %c", ch); } - return T_ILLEGAL; } // Simple helper to see if the caller of a runtime stub which