classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: suggested way to structure changes to String, Float, Double


From: Mark Wielaard
Subject: RE: suggested way to structure changes to String, Float, Double
Date: 16 Jul 2003 14:43:01 +0200

Hi,

On Tue, 2003-07-15 at 01:17, Mark Wielaard wrote:
> On Tue, 2003-07-15 at 00:02, David P Grove wrote:
> >         I submitted a patch (#1686) for this about two weeks ago.  The
> > change to java.lang.String is actually fairly important for Jikes RVM
> 
> I already looked at them and they look OK, but I wanted to test them out
> with at least one other VM before applying them. I will have time
> tomorrow to do some tests and check it in.

OK I tested it with Kissme to see if everything still worked OK and have
checked it in. Also made short NEWS items about it because they change
the VM interface.

2003-07-16  David Grove  <address@hidden
 
        * java/lang/Double.java (doubleToLongBits): No longer native,
        delegates to VMDouble.
        (doubleToRawLongBits): Likewise.
        (longBitsToDouble): Likewise.
        * java/lang/Float.java (static): Moved to VMFloat.
        (floatToIntBits) No longer native, delegates to VMFloat.
        (floatToRawIntBits): Likewise.
        (intBitsToFloat): Likewise.
        * vm/reference/java/lang/VMDouble.java: New class.
        * vm/reference/java/lang/VMFloat.java: New class.
        * native/jni/java-lang/Makefile.am (libjavalang_la_SOURCES): Remove
        java_lang_Float.c, add java_lang_VMFloat.c and java_lang_VMDouble.c.
        * native/jni/java-lang/java_lang_Double.c (doubleToLongBits):
        Removed, moved to java_lang_VMDouble.c.
        (doubleToRawLongBits): Likewise.
        (longBitsToDouble): Likewise.
        * native/jni/java-lang/java_lang_Float.c: Removed file.
        * native/jni/java-lang/java_lang_VMDouble.c: New file.
        * native/jni/java-lang/java_lang_VMFloat.c: New file.
        * include/java_lang_Double.h: Regenerated.
        * include/java_lang_Float.h: Removed.
        * include/java_lang_VMDouble.h: New file.
        * include/java_lang_VMFloat.h: New file.
        * NEWS: Describe new VM Float/Double conversion methods.

News:
        * A VM can now supply its own String.intern() strategy through the
          VMString class. The supplied VMString reference class implements the
          original WeakHashMap strategy.
        * Float and Double to/from bits conversion functions can now be 
supplied by
          the VM through VMFloat and VMDouble. Default JNI conversion methods 
are
          supplied.

If you could also supply a ChangeLog entry with a patch in the future
that would be helpful.

There are still three native methods left in Double which I would like
to also move to VMDouble in the future. (My long, long term goal is to
remove all native methods from public visible classes so VMs are free to
implement them however they want, possibly with our supplied default JNI
methods, but maybe by some completely other mechanism, like java for
JRVM, CNI for gcj or by delegation to some C# library for IKVM.NET.)

Thanks,

Mark





reply via email to

[Prev in Thread] Current Thread [Next in Thread]