3921 JVMWrapper("JVM_RawMonitorExit"); |
3921 JVMWrapper("JVM_RawMonitorExit"); |
3922 ((Mutex*) mon)->jvm_raw_unlock(); |
3922 ((Mutex*) mon)->jvm_raw_unlock(); |
3923 } |
3923 } |
3924 |
3924 |
3925 |
3925 |
3926 // Support for Serialization |
|
3927 |
|
3928 typedef jfloat (JNICALL *IntBitsToFloatFn )(JNIEnv* env, jclass cb, jint value); |
|
3929 typedef jdouble (JNICALL *LongBitsToDoubleFn)(JNIEnv* env, jclass cb, jlong value); |
|
3930 typedef jint (JNICALL *FloatToIntBitsFn )(JNIEnv* env, jclass cb, jfloat value); |
|
3931 typedef jlong (JNICALL *DoubleToLongBitsFn)(JNIEnv* env, jclass cb, jdouble value); |
|
3932 |
|
3933 static IntBitsToFloatFn int_bits_to_float_fn = NULL; |
|
3934 static LongBitsToDoubleFn long_bits_to_double_fn = NULL; |
|
3935 static FloatToIntBitsFn float_to_int_bits_fn = NULL; |
|
3936 static DoubleToLongBitsFn double_to_long_bits_fn = NULL; |
|
3937 |
|
3938 |
|
3939 void initialize_converter_functions() { |
|
3940 if (JDK_Version::is_gte_jdk14x_version()) { |
|
3941 // These functions only exist for compatibility with 1.3.1 and earlier |
|
3942 return; |
|
3943 } |
|
3944 |
|
3945 // called from universe_post_init() |
|
3946 assert( |
|
3947 int_bits_to_float_fn == NULL && |
|
3948 long_bits_to_double_fn == NULL && |
|
3949 float_to_int_bits_fn == NULL && |
|
3950 double_to_long_bits_fn == NULL , |
|
3951 "initialization done twice" |
|
3952 ); |
|
3953 // initialize |
|
3954 int_bits_to_float_fn = CAST_TO_FN_PTR(IntBitsToFloatFn , NativeLookup::base_library_lookup("java/lang/Float" , "intBitsToFloat" , "(I)F")); |
|
3955 long_bits_to_double_fn = CAST_TO_FN_PTR(LongBitsToDoubleFn, NativeLookup::base_library_lookup("java/lang/Double", "longBitsToDouble", "(J)D")); |
|
3956 float_to_int_bits_fn = CAST_TO_FN_PTR(FloatToIntBitsFn , NativeLookup::base_library_lookup("java/lang/Float" , "floatToIntBits" , "(F)I")); |
|
3957 double_to_long_bits_fn = CAST_TO_FN_PTR(DoubleToLongBitsFn, NativeLookup::base_library_lookup("java/lang/Double", "doubleToLongBits", "(D)J")); |
|
3958 // verify |
|
3959 assert( |
|
3960 int_bits_to_float_fn != NULL && |
|
3961 long_bits_to_double_fn != NULL && |
|
3962 float_to_int_bits_fn != NULL && |
|
3963 double_to_long_bits_fn != NULL , |
|
3964 "initialization failed" |
|
3965 ); |
|
3966 } |
|
3967 |
|
3968 |
|
3969 |
|
3970 // Shared JNI/JVM entry points ////////////////////////////////////////////////////////////// |
3926 // Shared JNI/JVM entry points ////////////////////////////////////////////////////////////// |
3971 |
3927 |
3972 jclass find_class_from_class_loader(JNIEnv* env, Symbol* name, jboolean init, Handle loader, Handle protection_domain, jboolean throwError, TRAPS) { |
3928 jclass find_class_from_class_loader(JNIEnv* env, Symbol* name, jboolean init, Handle loader, Handle protection_domain, jboolean throwError, TRAPS) { |
3973 // Security Note: |
3929 // Security Note: |
3974 // The Java level wrapper will perform the necessary security check allowing |
3930 // The Java level wrapper will perform the necessary security check allowing |