Hi all,
I've implemented doubleToLongBits without requring a VMDouble method of
the same name. It would let us remove one method from the VM interface
for the next version, and the corresoponding native code. OK to commit?
(I'd do the equivalent patch for Float, too).
* java/lang/Double.java (doubleToLongBits): Simplified.
cheers,
dalibor topic
### Eclipse Workspace Patch 1.0
#P classpath
Index: java/lang/Double.java
===================================================================
RCS file: /sources/classpath/classpath/java/lang/Double.java,v
retrieving revision 1.43
diff -u -r1.43 Double.java
--- java/lang/Double.java 12 Oct 2007 08:50:50 -0000 1.43
+++ java/lang/Double.java 8 Feb 2008 00:18:01 -0000
@@ -518,7 +518,10 @@
*/
public static long doubleToLongBits(double value)
{
- return VMDouble.doubleToLongBits(value);
+ if (isNaN(value))
+ return 0x7ff8000000000000L;
+ else
+ return VMDouble.doubleToRawLongBits(value);
}
/**