提交 30b43211 编写于 作者: T twisti

7196120: NPG: JSR 2292 test fails because missing fix for 7188911

Reviewed-by: kvn, coleenp
上级 87639c74
......@@ -1265,7 +1265,7 @@ void LinkResolver::resolve_dynamic_call(CallInfo& result,
bootstrap_specifier,
method_name, method_signature,
&resolved_appendix,
CHECK);
THREAD);
if (HAS_PENDING_EXCEPTION) {
if (TraceMethodHandles) {
tty->print_cr("invokedynamic throws BSME for "INTPTR_FORMAT, PENDING_EXCEPTION);
......@@ -1282,8 +1282,7 @@ void LinkResolver::resolve_dynamic_call(CallInfo& result,
// See the "Linking Exceptions" section for the invokedynamic instruction in the JVMS.
Handle nested_exception(THREAD, PENDING_EXCEPTION);
CLEAR_PENDING_EXCEPTION;
THROW_MSG_CAUSE(vmSymbols::java_lang_BootstrapMethodError(),
"BootstrapMethodError", nested_exception)
THROW_CAUSE(vmSymbols::java_lang_BootstrapMethodError(), nested_exception)
}
result.set_handle(resolved_method, resolved_appendix, CHECK);
}
......
......@@ -1194,20 +1194,6 @@ JVM_ENTRY(void, MHN_setCallSiteTargetVolatile(JNIEnv* env, jobject igcls, jobjec
}
JVM_END
JVM_ENTRY(jobject, MH_invoke_UOE(JNIEnv *env, jobject igmh, jobjectArray igargs)) {
TempNewSymbol UOE_name = SymbolTable::new_symbol("java/lang/UnsupportedOperationException", CHECK_NULL);
THROW_MSG_NULL(UOE_name, "MethodHandle.invoke cannot be invoked reflectively");
return NULL;
}
JVM_END
JVM_ENTRY(jobject, MH_invokeExact_UOE(JNIEnv *env, jobject igmh, jobjectArray igargs)) {
TempNewSymbol UOE_name = SymbolTable::new_symbol("java/lang/UnsupportedOperationException", CHECK_NULL);
THROW_MSG_NULL(UOE_name, "MethodHandle.invokeExact cannot be invoked reflectively");
return NULL;
}
JVM_END
/// JVM_RegisterMethodHandleMethods
#undef CS // Solaris builds complain
......@@ -1245,11 +1231,6 @@ static JNINativeMethod required_methods_JDK8[] = {
{CC"getMemberVMInfo", CC"("MEM")"OBJ, FN_PTR(MHN_getMemberVMInfo)}
};
static JNINativeMethod invoke_methods[] = {
{CC"invoke", CC"(["OBJ")"OBJ, FN_PTR(MH_invoke_UOE)},
{CC"invokeExact", CC"(["OBJ")"OBJ, FN_PTR(MH_invokeExact_UOE)}
};
// This one function is exported, used by NativeLookup.
JVM_ENTRY(void, JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass MHN_class)) {
......@@ -1275,9 +1256,6 @@ JVM_ENTRY(void, JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass MHN_class))
ThreadToNativeFromVM ttnfv(thread);
status = env->RegisterNatives(MHN_class, required_methods_JDK8, sizeof(required_methods_JDK8)/sizeof(JNINativeMethod));
if (status == JNI_OK && !env->ExceptionOccurred()) {
status = env->RegisterNatives(MH_class, invoke_methods, sizeof(invoke_methods)/sizeof(JNINativeMethod));
}
if (status != JNI_OK || env->ExceptionOccurred()) {
warning("JSR 292 method handle code is mismatched to this JVM. Disabling support.");
enable_MH = false;
......
......@@ -235,9 +235,6 @@ class Exceptions {
#define THROW_ARG(name, signature, args) \
{ Exceptions::_throw_args(THREAD_AND_LOCATION, name, signature, args); return; }
#define THROW_MSG_CAUSE(name, message, cause) \
{ Exceptions::_throw_msg_cause(THREAD_AND_LOCATION, name, message, cause); return; }
#define THROW_OOP_(e, result) \
{ Exceptions::_throw_oop(THREAD_AND_LOCATION, e); return result; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册