[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Primitive types 1.4 updates
From: |
Brian Jones |
Subject: |
Re: Primitive types 1.4 updates |
Date: |
09 Jul 2001 19:41:06 -0400 |
User-agent: |
Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 |
Mark Wielaard <address@hidden> writes:
> Hi,
>
> The following patch adds new 1.4 functionality to the Boolean, Double
> and Float classes. It also makes Boolean a little bit more efficient
> by always returning the predefined TRUE or FALSE instances when
> possible.
>
> 2001-07-10 Mark Wielaard <address@hidden>
> * java/lang/Boolean.java (valueOf boolean): new 1.4 method
> (toString boolean): idem
> (valueOf String): return one of the predefined Boolean instances
> * java/lang/Double.java (compare double double): new 1.4 method
> (compareTo Double): call new method
> * java/lang/Float.java (compare float float): new 1.4 method
> (compareTo Float): call new method
>
> Is there any reason the primitive classes have not been merged with
> libgcj? Some of those classes, like Boolean, are pure java. The only
> difference seems to be the way they define the TYPE instance variable.
> We use VMClassLoader.getPrimitiveClass("boolean") and libgcj seems to
> use some compiler magic to set this field. Maybe we could just add a
> VMClassLoader class to libgcj that does the magic?
Is it possible to move the VMClassLoader call to inside of the
static{} block so we can place it inside the if
(Configuration.INIT_LOAD_LIBRARY clause?). I have started merging
java/lang/Double and java/lang/Float. I still need to test what I've
done and maybe move the common .c libs to a new directory outside of
both the cni directory and the jni directory so that both
implementations can use it from one place. I checked in my changes to
both classes a few weeks ago.
Brian
--
Brian Jones <address@hidden>