[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Primitive types 1.4 updates
From: |
Mark Wielaard |
Subject: |
Primitive types 1.4 updates |
Date: |
Tue, 10 Jul 2001 01:22:29 +0200 |
User-agent: |
Mutt/1.3.18i |
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?
Cheers,
Mark
--
Stuff to read:
<http://www.toad.com/gnu/whatswrong.html>
What's Wrong with Copy Protection, by John Gilmore
primitive.diff
Description: Text document
- Primitive types 1.4 updates,
Mark Wielaard <=