diff options
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | doc/cp-vmintegration.texinfo | 2 | ||||
-rw-r--r-- | include/java_lang_VMDouble.h | 5 | ||||
-rw-r--r-- | m4/acinclude.m4 | 2 | ||||
-rw-r--r-- | native/jni/java-lang/java_lang_VMDouble.c | 32 | ||||
-rw-r--r-- | vm/reference/java/lang/VMDouble.java | 16 |
6 files changed, 22 insertions, 52 deletions
@@ -1,5 +1,22 @@ 2008-02-08 Dalibor Topic <robilad@kaffe.org> + * m4/acinclude.m4 (CLASSPATH_CHECK_JAVAH) [USER_JAVAH]: Check for gjavah-4.2 + and gjavah-4.1. + +2008-02-08 Dalibor Topic <robilad@kaffe.org> + + * vm/reference/java/lang/VMDouble.java (doubleToLongBits): Removed unused method. + + * native/jni/java-lang/java_lang_VMDouble.c (Java_java_lang_VMDouble_doubleToLongBits): + Removed unused function. + + * include/java_lang_VMDouble.h: Regenerated. + + * doc/cp-vmintegration.texinfo (java.lang.VMDouble): Removed + unused method doubleToLongBits. + +2008-02-08 Dalibor Topic <robilad@kaffe.org> + * java/lang/Double.java (doubleToLongBits): Simplified. 2008-02-07 Ian Rogers <ian.rogers@manchester.ac.uk> diff --git a/doc/cp-vmintegration.texinfo b/doc/cp-vmintegration.texinfo index 97f381a5f..1a4418e8f 100644 --- a/doc/cp-vmintegration.texinfo +++ b/doc/cp-vmintegration.texinfo @@ -526,8 +526,6 @@ compiler, and is specific to the compiler implementation. of doubles. @itemize @bullet -@item @code{doubleToLongBits(double)} -- Converts the double to the IEEE 754 -bit layout, collapsing NaNs to @code{0x7ff8000000000000L}. @item @code{doubleToRawLongBits(double)} -- Same as the above, but preserves NaNs. @item @code{longBitsToDouble(long)} -- This is the inverse of the last method, diff --git a/include/java_lang_VMDouble.h b/include/java_lang_VMDouble.h index 8f04dcae5..bafcbec04 100644 --- a/include/java_lang_VMDouble.h +++ b/include/java_lang_VMDouble.h @@ -1,16 +1,15 @@ /* DO NOT EDIT THIS FILE - it is machine generated */ +#include <jni.h> + #ifndef __java_lang_VMDouble__ #define __java_lang_VMDouble__ -#include <jni.h> - #ifdef __cplusplus extern "C" { #endif -JNIEXPORT jlong JNICALL Java_java_lang_VMDouble_doubleToLongBits (JNIEnv *env, jclass, jdouble); JNIEXPORT jlong JNICALL Java_java_lang_VMDouble_doubleToRawLongBits (JNIEnv *env, jclass, jdouble); JNIEXPORT jdouble JNICALL Java_java_lang_VMDouble_longBitsToDouble (JNIEnv *env, jclass, jlong); JNIEXPORT jstring JNICALL Java_java_lang_VMDouble_toString (JNIEnv *env, jclass, jdouble, jboolean); diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index 6165e9b84..28f581910 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -221,7 +221,7 @@ AC_DEFUN([CLASSPATH_CHECK_JAVAH], AC_PATH_PROG(USER_JAVAH, "$1") fi else - AC_PATH_PROGS([USER_JAVAH],[gjavah gcjh-wrapper-4.1 gcjh-4.1 gcjh javah]) + AC_PATH_PROGS([USER_JAVAH],[gjavah gjavah-4.2 gjavah-4.1 gcjh-wrapper-4.1 gcjh-4.1 gcjh javah]) fi if test "x${USER_JAVAH}" = x; then diff --git a/native/jni/java-lang/java_lang_VMDouble.c b/native/jni/java-lang/java_lang_VMDouble.c index e861b9107..e915a3089 100644 --- a/native/jni/java-lang/java_lang_VMDouble.c +++ b/native/jni/java-lang/java_lang_VMDouble.c @@ -112,16 +112,15 @@ Java_java_lang_VMDouble_initIDs (JNIEnv * env, jclass cls __attribute__ ((__unus /* * Class: java_lang_VMDouble - * Method: doubleToLongBits + * Method: doubleToRawLongBits * Signature: (D)J */ JNIEXPORT jlong JNICALL -Java_java_lang_VMDouble_doubleToLongBits +Java_java_lang_VMDouble_doubleToRawLongBits (JNIEnv * env __attribute__ ((__unused__)), jclass cls __attribute__ ((__unused__)), jdouble doubleValue) { jvalue val; - jlong e, f; val.d = doubleValue; @@ -135,33 +134,6 @@ Java_java_lang_VMDouble_doubleToLongBits val.j = SWAP_DOUBLE(val.j); #endif - e = val.j & 0x7ff0000000000000LL; - f = val.j & 0x000fffffffffffffLL; - - if (e == 0x7ff0000000000000LL && f != 0L) - val.j = 0x7ff8000000000000LL; - - return val.j; -} - -/* - * Class: java_lang_VMDouble - * Method: doubleToRawLongBits - * Signature: (D)J - */ -JNIEXPORT jlong JNICALL -Java_java_lang_VMDouble_doubleToRawLongBits - (JNIEnv * env __attribute__ ((__unused__)), - jclass cls __attribute__ ((__unused__)), jdouble doubleValue) -{ - jvalue val; - - val.d = doubleValue; - -#if defined(__IEEE_BYTES_LITTLE_ENDIAN) - val.j = SWAP_DOUBLE(val.j); -#endif - return val.j; } diff --git a/vm/reference/java/lang/VMDouble.java b/vm/reference/java/lang/VMDouble.java index 8a991c9ad..58b3b45b4 100644 --- a/vm/reference/java/lang/VMDouble.java +++ b/vm/reference/java/lang/VMDouble.java @@ -70,22 +70,6 @@ final class VMDouble * layout. Bit 63 (the most significant) is the sign bit, bits 62-52 * (masked by 0x7ff0000000000000L) represent the exponent, and bits 51-0 * (masked by 0x000fffffffffffffL) are the mantissa. This function - * collapses all versions of NaN to 0x7ff8000000000000L. The result of this - * function can be used as the argument to - * <code>Double.longBitsToDouble(long)</code> to obtain the original - * <code>double</code> value. - * - * @param value the <code>double</code> to convert - * @return the bits of the <code>double</code> - * @see #longBitsToDouble(long) - */ - public static native long doubleToLongBits(double value); - - /** - * Convert the double to the IEEE 754 floating-point "double format" bit - * layout. Bit 63 (the most significant) is the sign bit, bits 62-52 - * (masked by 0x7ff0000000000000L) represent the exponent, and bits 51-0 - * (masked by 0x000fffffffffffffL) are the mantissa. This function * leaves NaN alone, rather than collapsing to a canonical value. The * result of this function can be used as the argument to * <code>Double.longBitsToDouble(long)</code> to obtain the original |