Pekka Enberg | 12 Mar 2012 22:38
Gravatar

[RFC/PATCH] Add missing Java 1.6 java/lang/Math.getExponent() methods

While at it, also add missing Java 1.6 java/lang package constants.

Signed-off-by: Pekka Enberg <penberg <at> kernel.org>
---
 java/lang/Double.java                              |   17 ++++++-
 java/lang/Float.java                               |   15 ++++++
 java/lang/Math.java                                |   26 ++++++++++
 native/fdlibm/fdlibm.h                             |    1 -
 native/fdlibm/namespace.h                          |    1 -
 native/jni/java-lang/Makefile.am                   |    1 +
 .../jni/java-lang/java_lang_VMDouble_getExponent.c |   50 ++++++++++++++++++++
 native/jni/java-lang/java_lang_VMFloat.c           |   10 ++++
 scripts/math_symbols                               |    1 -
 vm/reference/java/lang/VMDouble.java               |    2 +
 vm/reference/java/lang/VMFloat.java                |    2 +
 11 files changed, 122 insertions(+), 4 deletions(-)
 create mode 100644 native/jni/java-lang/java_lang_VMDouble_getExponent.c

diff --git a/java/lang/Double.java b/java/lang/Double.java
index 3ae1b01..674e9f1 100644
--- a/java/lang/Double.java
+++ b/java/lang/Double.java
 <at>  <at>  -96,7 +96,22  <at>  <at>  public final class Double extends Number implements Comparable<Double>
    */
   public static final int SIZE = 64;

- /**
+  /**
+   *  <at> since 1.6
+   */
(Continue reading)

Andrew Hughes | 13 Mar 2012 15:02
Picon
Favicon

Re: [RFC/PATCH] Add missing Java 1.6 java/lang/Math.getExponent() methods

----- Original Message -----
> While at it, also add missing Java 1.6 java/lang package constants.
> 
> Signed-off-by: Pekka Enberg <penberg <at> kernel.org>
> ---
>  java/lang/Double.java                              |   17 ++++++-
>  java/lang/Float.java                               |   15 ++++++
>  java/lang/Math.java                                |   26 ++++++++++
>  native/fdlibm/fdlibm.h                             |    1 -
>  native/fdlibm/namespace.h                          |    1 -
>  native/jni/java-lang/Makefile.am                   |    1 +
>  .../jni/java-lang/java_lang_VMDouble_getExponent.c |   50
>  ++++++++++++++++++++
>  native/jni/java-lang/java_lang_VMFloat.c           |   10 ++++
>  scripts/math_symbols                               |    1 -
>  vm/reference/java/lang/VMDouble.java               |    2 +
>  vm/reference/java/lang/VMFloat.java                |    2 +
>  11 files changed, 122 insertions(+), 4 deletions(-)
>  create mode 100644
>  native/jni/java-lang/java_lang_VMDouble_getExponent.c
> 
> diff --git a/java/lang/Double.java b/java/lang/Double.java
> index 3ae1b01..674e9f1 100644
> --- a/java/lang/Double.java
> +++ b/java/lang/Double.java
>  <at>  <at>  -96,7 +96,22  <at>  <at>  public final class Double extends Number
> implements Comparable<Double>
>     */
>    public static final int SIZE = 64;
>  
(Continue reading)

Pekka Enberg | 13 Mar 2012 15:55
Gravatar

Re: [RFC/PATCH] Add missing Java 1.6 java/lang/Math.getExponent() methods

On Tue, Mar 13, 2012 at 4:02 PM, Andrew Hughes <ahughes <at> redhat.com> wrote:
> Couple of questions:
>
> 1.  What is the reason for the removal of frexp?

That was a leftover which I've dropped locally.

> 2.  How are you compiling this?  IcedTea contains a patch
> which was required to make things like MIN/MAX_VALUE with hex
> digits work on ecj + Classpath:
>
> --- openjdk-ecj.orig/jdk/src/share/classes/java/lang/Double.java        2010-05-26
09:32:38.000000000 +0100
> +++ openjdk-ecj/jdk/src/share/classes/java/lang/Double.java     2010-05-26
15:02:51.000000000 +0100
>  <at>  <at>  -76,7 +76,7  <at>  <at> 
>      * { <at> code 0x1.fffffffffffffP+1023} and also equal to
>      * { <at> code Double.longBitsToDouble(0x7fefffffffffffffL)}.
>      */
> -    public static final double MAX_VALUE = 0x1.fffffffffffffP+1023; // 1.7976931348623157e+308
> +    public static final double MAX_VALUE = 1.7976931348623157e+308;
>
> We don't want to be in a situation where we can't compile ourselves!

Good point. I'm building with OpenJDK + ECJ because Ubuntu no longer
ships GNU Classpath. I'll convert all of them to non-hex constants.

                         Pekka

(Continue reading)

Andrew Hughes | 14 Mar 2012 12:44
Picon
Favicon

Re: [RFC/PATCH] Add missing Java 1.6 java/lang/Math.getExponent() methods

----- Original Message -----
> On Tue, Mar 13, 2012 at 4:02 PM, Andrew Hughes <ahughes <at> redhat.com>
> wrote:
> > Couple of questions:
> >
> > 1.  What is the reason for the removal of frexp?
> 
> That was a leftover which I've dropped locally.
> 
> > 2.  How are you compiling this?  IcedTea contains a patch
> > which was required to make things like MIN/MAX_VALUE with hex
> > digits work on ecj + Classpath:
> >
> > --- openjdk-ecj.orig/jdk/src/share/classes/java/lang/Double.java
> >        2010-05-26 09:32:38.000000000 +0100
> > +++ openjdk-ecj/jdk/src/share/classes/java/lang/Double.java
> >     2010-05-26 15:02:51.000000000 +0100
> >  <at>  <at>  -76,7 +76,7  <at>  <at> 
> >      * { <at> code 0x1.fffffffffffffP+1023} and also equal to
> >      * { <at> code Double.longBitsToDouble(0x7fefffffffffffffL)}.
> >      */
> > -    public static final double MAX_VALUE =
> > 0x1.fffffffffffffP+1023; // 1.7976931348623157e+308
> > +    public static final double MAX_VALUE =
> > 1.7976931348623157e+308;
> >
> > We don't want to be in a situation where we can't compile
> > ourselves!
> 
> Good point. I'm building with OpenJDK + ECJ because Ubuntu no longer
(Continue reading)

Pekka Enberg | 14 Mar 2012 19:04
Gravatar

Re: [RFC/PATCH] Add missing Java 1.6 java/lang/Math.getExponent() methods

On Wed, Mar 14, 2012 at 1:44 PM, Andrew Hughes <ahughes <at> redhat.com> wrote:
>> Good point. I'm building with OpenJDK + ECJ because Ubuntu no longer
>> ships GNU Classpath. I'll convert all of them to non-hex constants.
>
> Why not Jato & a CVS build of Classpath? :-D

I'm mostly hacking on GNU Classpath on x86-64 these days and sadly
Jato's x86-64 JIT still needs more work to run real applications.

                        Pekka


Gmane