Hi all,
as discussed in another thread, I've applied the attached patch.
cheers,
dalibor topic
2008-02-08 Dalibor Topic <[EMAIL PROTECTED]>
* vm/reference/java/lang/VMFloat.java (floatToIntBits): Removed
unused
method.
* native/jni/java-lang/java_lang_VMFloat.c
(Java_java_lang_VMFloat_floatToIntBits): Removed unused function.
* include/java_lang_VMDouble.h: Regenerated.
* doc/cp-vmintegration.texinfo (java.lang.VMFloat): Removed
unused method floatToIntBits. (java.lang.VMDouble): Use similar
text to text used for floatToRawIntBits for doubleToLongBits.
Index: doc/cp-vmintegration.texinfo
===================================================================
RCS file: /sources/classpath/classpath/doc/cp-vmintegration.texinfo,v
retrieving revision 1.3
diff -u -p -r1.3 cp-vmintegration.texinfo
--- doc/cp-vmintegration.texinfo 8 Feb 2008 17:42:57 -0000 1.3
+++ doc/cp-vmintegration.texinfo 8 Feb 2008 18:32:17 -0000
@@ -526,8 +526,8 @@ compiler, and is specific to the compile
of doubles.
@itemize @bullet
[EMAIL PROTECTED] @code{doubleToRawLongBits(double)} -- Same as the above, but preserves
-NaNs.
[EMAIL PROTECTED] @code{doubleToRawLongBits(double)} -- Converts the double to the IEEE 754
+bit layout, preserving NaNs.
@item @code{longBitsToDouble(long)} -- This is the inverse of the last method,
preserving NaNs so that the output of one can be fed into the other without
data loss.
@@ -550,10 +550,8 @@ implementation optional.
@code{VMFloat} provides native support for the conversion of floats.
@itemize @bullet
[EMAIL PROTECTED] @code{floatToIntBits(float)} -- Converts the float to the IEEE 754
-bit layout, collapsing NaNs to @code{0x7fc00000}.
[EMAIL PROTECTED] @code{floatToRawIntBits(float)} -- Same as the above, but preserves
-NaNs.
[EMAIL PROTECTED] @code{floatToRawIntBits(float)} -- Converts the float to the IEEE 754
+bit layout, preserving NaNs.
@item @code{intBitsToFloat(int)} -- This is the inverse of the last method,
preserving NaNs so that the output of one can be fed into the other without
data loss.
Index: include/java_lang_VMFloat.h
===================================================================
RCS file: /sources/classpath/classpath/include/java_lang_VMFloat.h,v
retrieving revision 1.2
diff -u -p -r1.2 java_lang_VMFloat.h
--- include/java_lang_VMFloat.h 28 May 2004 17:27:55 -0000 1.2
+++ include/java_lang_VMFloat.h 8 Feb 2008 18:32:17 -0000
@@ -1,16 +1,15 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+
#ifndef __java_lang_VMFloat__
#define __java_lang_VMFloat__
-#include <jni.h>
-
#ifdef __cplusplus
extern "C"
{
#endif
-JNIEXPORT jint JNICALL Java_java_lang_VMFloat_floatToIntBits (JNIEnv *env, jclass, jfloat);
JNIEXPORT jint JNICALL Java_java_lang_VMFloat_floatToRawIntBits (JNIEnv *env, jclass, jfloat);
JNIEXPORT jfloat JNICALL Java_java_lang_VMFloat_intBitsToFloat (JNIEnv *env, jclass, jint);
Index: native/jni/java-lang/java_lang_VMFloat.c
===================================================================
RCS file: /sources/classpath/classpath/native/jni/java-lang/java_lang_VMFloat.c,v
retrieving revision 1.8
diff -u -p -r1.8 java_lang_VMFloat.c
--- native/jni/java-lang/java_lang_VMFloat.c 2 Jul 2005 20:32:55 -0000 1.8
+++ native/jni/java-lang/java_lang_VMFloat.c 8 Feb 2008 18:32:18 -0000
@@ -42,28 +42,6 @@ exception statement from your version. *
/*
* Class: java_lang_VMFloat
- * Method: floatToIntBits
- * Signature: (F)I
- */
-JNIEXPORT jint JNICALL
-Java_java_lang_VMFloat_floatToIntBits
- (JNIEnv * env __attribute__ ((__unused__)),
- jclass cls __attribute__ ((__unused__)), jfloat value)
-{
- jvalue u;
- jint e, f;
- u.f = value;
- e = u.i & 0x7f800000;
- f = u.i & 0x007fffff;
-
- if (e == 0x7f800000 && f != 0)
- u.i = 0x7fc00000;
-
- return u.i;
-}
-
-/*
- * Class: java_lang_VMFloat
* Method: floatToRawIntBits
* Signature: (F)I
*/
Index: vm/reference/java/lang/VMFloat.java
===================================================================
RCS file: /sources/classpath/classpath/vm/reference/java/lang/VMFloat.java,v
retrieving revision 1.3
diff -u -p -r1.3 VMFloat.java
--- vm/reference/java/lang/VMFloat.java 11 May 2007 08:07:46 -0000 1.3
+++ vm/reference/java/lang/VMFloat.java 8 Feb 2008 18:32:18 -0000
@@ -67,21 +67,6 @@ final class VMFloat
* Convert the float to the IEEE 754 floating-point "single format" bit
* layout. Bit 31 (the most significant) is the sign bit, bits 30-23
* (masked by 0x7f800000) represent the exponent, and bits 22-0
- * (masked by 0x007fffff) are the mantissa. This function collapses all
- * versions of NaN to 0x7fc00000. The result of this function can be used
- * as the argument to <code>Float.intBitsToFloat(int)</code> to obtain the
- * original <code>float</code> value.
- *
- * @param value the <code>float</code> to convert
- * @return the bits of the <code>float</code>
- * @see #intBitsToFloat(int)
- */
- static native int floatToIntBits(float value);
-
- /**
- * Convert the float to the IEEE 754 floating-point "single format" bit
- * layout. Bit 31 (the most significant) is the sign bit, bits 30-23
- * (masked by 0x7f800000) represent the exponent, and bits 22-0
* (masked by 0x007fffff) 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>Float.intBitsToFloat(int)</code> to