hotspot/src/share/vm/prims/nativeLookup.cpp
changeset 36551 77f29c57ed2e
parent 35235 5e373cc222a5
child 36615 c744e3b0f8c5
equal deleted inserted replaced
36550:6d26e3a083cb 36551:77f29c57ed2e
    33 #include "oops/method.hpp"
    33 #include "oops/method.hpp"
    34 #include "oops/oop.inline.hpp"
    34 #include "oops/oop.inline.hpp"
    35 #include "oops/symbol.hpp"
    35 #include "oops/symbol.hpp"
    36 #include "prims/jvm_misc.hpp"
    36 #include "prims/jvm_misc.hpp"
    37 #include "prims/nativeLookup.hpp"
    37 #include "prims/nativeLookup.hpp"
       
    38 #include "prims/unsafe.hpp"
    38 #include "runtime/arguments.hpp"
    39 #include "runtime/arguments.hpp"
    39 #include "runtime/handles.inline.hpp"
    40 #include "runtime/handles.inline.hpp"
    40 #include "runtime/javaCalls.hpp"
    41 #include "runtime/javaCalls.hpp"
    41 #include "runtime/sharedRuntime.hpp"
    42 #include "runtime/sharedRuntime.hpp"
    42 #include "runtime/signature.hpp"
    43 #include "runtime/signature.hpp"
   105   mangle_name_on(&st, signature, 1, end);
   106   mangle_name_on(&st, signature, 1, end);
   106   return st.as_string();
   107   return st.as_string();
   107 }
   108 }
   108 
   109 
   109 extern "C" {
   110 extern "C" {
   110   void JNICALL JVM_RegisterJDKInternalMiscUnsafeMethods(JNIEnv *env, jclass unsafecls);
       
   111   void JNICALL JVM_RegisterSunMiscUnsafeMethods(JNIEnv *env, jclass unsafecls);
       
   112   void JNICALL JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass unsafecls);
   111   void JNICALL JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass unsafecls);
   113   void JNICALL JVM_RegisterPerfMethods(JNIEnv *env, jclass perfclass);
   112   void JNICALL JVM_RegisterPerfMethods(JNIEnv *env, jclass perfclass);
   114   void JNICALL JVM_RegisterWhiteBoxMethods(JNIEnv *env, jclass wbclass);
   113   void JNICALL JVM_RegisterWhiteBoxMethods(JNIEnv *env, jclass wbclass);
   115 #if INCLUDE_JVMCI
   114 #if INCLUDE_JVMCI
   116   jobject  JNICALL JVM_GetJVMCIRuntime(JNIEnv *env, jclass c);
   115   jobject  JNICALL JVM_GetJVMCIRuntime(JNIEnv *env, jclass c);
   121 #define CC (char*)  /* cast a literal from (const char*) */
   120 #define CC (char*)  /* cast a literal from (const char*) */
   122 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &f)
   121 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &f)
   123 
   122 
   124 static JNINativeMethod lookup_special_native_methods[] = {
   123 static JNINativeMethod lookup_special_native_methods[] = {
   125   { CC"Java_jdk_internal_misc_Unsafe_registerNatives",             NULL, FN_PTR(JVM_RegisterJDKInternalMiscUnsafeMethods) },
   124   { CC"Java_jdk_internal_misc_Unsafe_registerNatives",             NULL, FN_PTR(JVM_RegisterJDKInternalMiscUnsafeMethods) },
   126   { CC"Java_sun_misc_Unsafe_registerNatives",                      NULL, FN_PTR(JVM_RegisterSunMiscUnsafeMethods)         },
       
   127   { CC"Java_java_lang_invoke_MethodHandleNatives_registerNatives", NULL, FN_PTR(JVM_RegisterMethodHandleMethods) },
   125   { CC"Java_java_lang_invoke_MethodHandleNatives_registerNatives", NULL, FN_PTR(JVM_RegisterMethodHandleMethods) },
   128   { CC"Java_jdk_internal_perf_Perf_registerNatives",               NULL, FN_PTR(JVM_RegisterPerfMethods)         },
   126   { CC"Java_jdk_internal_perf_Perf_registerNatives",               NULL, FN_PTR(JVM_RegisterPerfMethods)         },
   129   { CC"Java_sun_hotspot_WhiteBox_registerNatives",                 NULL, FN_PTR(JVM_RegisterWhiteBoxMethods)     },
   127   { CC"Java_sun_hotspot_WhiteBox_registerNatives",                 NULL, FN_PTR(JVM_RegisterWhiteBoxMethods)     },
   130 #if INCLUDE_JVMCI
   128 #if INCLUDE_JVMCI
   131   { CC"Java_jdk_vm_ci_runtime_JVMCI_initializeRuntime",            NULL, FN_PTR(JVM_GetJVMCIRuntime)             },
   129   { CC"Java_jdk_vm_ci_runtime_JVMCI_initializeRuntime",            NULL, FN_PTR(JVM_GetJVMCIRuntime)             },