Double.java (doubleToRawLongBits): Now native.
* java/lang/Double.java (doubleToRawLongBits): Now native. * java/lang/Float.java (floatToRawIntBits): Likewise. * java/lang/natDouble.cc (doubleToRawLongBits): New method. * java/lang/natFloat.cc (floatToRawIntBits): Likewise. From-SVN: r39572
This commit is contained in:
parent
30f87f1a70
commit
0e206b71aa
5 changed files with 27 additions and 17 deletions
|
@ -1,3 +1,10 @@
|
|||
2001-02-09 Bryce McKinlay <bryce@albatross.co.nz>
|
||||
|
||||
* java/lang/Double.java (doubleToRawLongBits): Now native.
|
||||
* java/lang/Float.java (floatToRawIntBits): Likewise.
|
||||
* java/lang/natDouble.cc (doubleToRawLongBits): New method.
|
||||
* java/lang/natFloat.cc (floatToRawIntBits): Likewise.
|
||||
|
||||
2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
|
||||
|
||||
* java/io/File.java (java.net): Imported.
|
||||
|
|
|
@ -138,13 +138,7 @@ public final class Double extends Number implements Comparable
|
|||
}
|
||||
|
||||
public static native long doubleToLongBits (double value);
|
||||
|
||||
public static long doubleToRawLongBits (double value)
|
||||
{
|
||||
// FIXME: Check that this is correct with respect to NaN values.
|
||||
return doubleToLongBits (value);
|
||||
}
|
||||
|
||||
public static native long doubleToRawLongBits (double value);
|
||||
public static native double longBitsToDouble (long bits);
|
||||
|
||||
public int compareTo (Double d)
|
||||
|
|
|
@ -145,14 +145,7 @@ public final class Float extends Number implements Comparable
|
|||
}
|
||||
|
||||
public static native int floatToIntBits (float value);
|
||||
|
||||
public static int floatToRawIntBits (float value)
|
||||
{
|
||||
// FIXME: Is this supposed to be different? NaN values seem to be handled
|
||||
// the same in the JDK.
|
||||
return floatToIntBits (value);
|
||||
}
|
||||
|
||||
public static native int floatToRawIntBits (float value);
|
||||
public static native float intBitsToFloat (int bits);
|
||||
|
||||
public int compareTo (Float d)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// natDouble.cc - Implementation of java.lang.Double native methods.
|
||||
|
||||
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -48,6 +48,14 @@ java::lang::Double::doubleToLongBits(jdouble value)
|
|||
return u.l;
|
||||
}
|
||||
|
||||
jlong
|
||||
java::lang::Double::doubleToRawLongBits(jdouble value)
|
||||
{
|
||||
union u u;
|
||||
u.d = value;
|
||||
return u.l;
|
||||
}
|
||||
|
||||
jdouble
|
||||
java::lang::Double::longBitsToDouble(jlong bits)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// natFloat.cc - Implementation of java.lang.Float native methods.
|
||||
|
||||
/* Copyright (C) 1998, 1999 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2001 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -33,6 +33,14 @@ java::lang::Float::floatToIntBits(jfloat value)
|
|||
return u.l;
|
||||
}
|
||||
|
||||
jint
|
||||
java::lang::Float::floatToRawIntBits(jfloat value)
|
||||
{
|
||||
union u u;
|
||||
u.d = value;
|
||||
return u.l;
|
||||
}
|
||||
|
||||
jfloat
|
||||
java::lang::Float::intBitsToFloat(jint bits)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue