comparison src/share/vm/prims/nativeLookup.cpp @ 6275:957c266d8bc5

Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Tue, 21 Aug 2012 10:39:19 +0200
parents 861f8d5a5153 93c71eb28866
children ec196bfc458b
comparison
equal deleted inserted replaced
5891:fd8832ae511d 6275:957c266d8bc5
119 119
120 extern "C" { 120 extern "C" {
121 void JNICALL JVM_RegisterUnsafeMethods(JNIEnv *env, jclass unsafecls); 121 void JNICALL JVM_RegisterUnsafeMethods(JNIEnv *env, jclass unsafecls);
122 void JNICALL JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass unsafecls); 122 void JNICALL JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass unsafecls);
123 void JNICALL JVM_RegisterPerfMethods(JNIEnv *env, jclass perfclass); 123 void JNICALL JVM_RegisterPerfMethods(JNIEnv *env, jclass perfclass);
124 void JNICALL JVM_RegisterWhiteBoxMethods(JNIEnv *env, jclass wbclass);
124 #ifdef GRAAL 125 #ifdef GRAAL
125 jobject JNICALL JVM_InitializeGraalRuntime(JNIEnv *env, jclass graalclass); 126 jobject JNICALL JVM_InitializeGraalRuntime(JNIEnv *env, jclass graalclass);
126 #endif 127 #endif
127 } 128 }
128 129
134 { CC"Java_java_io_ObjectOutputStream_getPrimitiveFieldValues", NULL, FN_PTR(JVM_GetPrimitiveFieldValues) }, // intercept ObjectOutputStream getPrimitiveFieldValues for faster serialization 135 { CC"Java_java_io_ObjectOutputStream_getPrimitiveFieldValues", NULL, FN_PTR(JVM_GetPrimitiveFieldValues) }, // intercept ObjectOutputStream getPrimitiveFieldValues for faster serialization
135 { CC"Java_java_io_ObjectInputStream_setPrimitiveFieldValues", NULL, FN_PTR(JVM_SetPrimitiveFieldValues) }, // intercept ObjectInputStream setPrimitiveFieldValues for faster serialization 136 { CC"Java_java_io_ObjectInputStream_setPrimitiveFieldValues", NULL, FN_PTR(JVM_SetPrimitiveFieldValues) }, // intercept ObjectInputStream setPrimitiveFieldValues for faster serialization
136 137
137 { CC"Java_sun_misc_Unsafe_registerNatives", NULL, FN_PTR(JVM_RegisterUnsafeMethods) }, 138 { CC"Java_sun_misc_Unsafe_registerNatives", NULL, FN_PTR(JVM_RegisterUnsafeMethods) },
138 { CC"Java_java_lang_invoke_MethodHandleNatives_registerNatives", NULL, FN_PTR(JVM_RegisterMethodHandleMethods) }, 139 { CC"Java_java_lang_invoke_MethodHandleNatives_registerNatives", NULL, FN_PTR(JVM_RegisterMethodHandleMethods) },
139 { CC"Java_sun_misc_Perf_registerNatives", NULL, FN_PTR(JVM_RegisterPerfMethods) } 140 { CC"Java_sun_misc_Perf_registerNatives", NULL, FN_PTR(JVM_RegisterPerfMethods) },
141 { CC"Java_sun_hotspot_WhiteBox_registerNatives", NULL, FN_PTR(JVM_RegisterWhiteBoxMethods) },
140 #ifdef GRAAL 142 #ifdef GRAAL
141 ,
142 { CC"Java_com_oracle_graal_api_Graal_initializeRuntime", NULL, FN_PTR(JVM_InitializeGraalRuntime) } 143 { CC"Java_com_oracle_graal_api_Graal_initializeRuntime", NULL, FN_PTR(JVM_InitializeGraalRuntime) }
143 #endif 144 #endif
144 }; 145 };
145 146
146 static address lookup_special_native(char* jni_name) { 147 static address lookup_special_native(char* jni_name) {
384 } 385 }
385 386
386 387
387 address NativeLookup::lookup(methodHandle method, bool& in_base_library, TRAPS) { 388 address NativeLookup::lookup(methodHandle method, bool& in_base_library, TRAPS) {
388 if (!method->has_native_function()) { 389 if (!method->has_native_function()) {
389 address entry = lookup_base(method, in_base_library, CHECK_NULL); 390 address entry =
391 method->intrinsic_id() == vmIntrinsics::_invokeGeneric ?
392 SharedRuntime::native_method_throw_unsupported_operation_exception_entry() :
393 lookup_base(method, in_base_library, CHECK_NULL);
390 method->set_native_function(entry, 394 method->set_native_function(entry,
391 methodOopDesc::native_bind_event_is_interesting); 395 methodOopDesc::native_bind_event_is_interesting);
392 // -verbose:jni printing 396 // -verbose:jni printing
393 if (PrintJNIResolving) { 397 if (PrintJNIResolving) {
394 ResourceMark rm(THREAD); 398 ResourceMark rm(THREAD);