src/share/vm/prims/methodHandles.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/prims/methodHandles.cpp	Tue Sep  4 15:44:12 2012
--- new/src/share/vm/prims/methodHandles.cpp	Tue Sep  4 15:44:12 2012

*** 1192,1215 **** --- 1192,1201 ---- } java_lang_invoke_CallSite::set_target_volatile(call_site(), target()); } 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 #define LANG "Ljava/lang/"
*** 1243,1257 **** --- 1229,1238 ---- {CC"staticFieldOffset", CC"("MEM")J", FN_PTR(MHN_staticFieldOffset)}, {CC"staticFieldBase", CC"("MEM")"OBJ, FN_PTR(MHN_staticFieldBase)}, {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)) { if (!EnableInvokeDynamic) { warning("JSR 292 is disabled in this JVM. Use -XX:+UnlockDiagnosticVMOptions -XX:+EnableInvokeDynamic to enable.");
*** 1273,1285 **** --- 1254,1263 ---- if (enable_MH) { 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; env->ExceptionClear(); }

src/share/vm/prims/methodHandles.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File