classpath
[Top][All Lists]
Advanced

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

Question about Boolean


From: Tom Tromey
Subject: Question about Boolean
Date: 19 Jul 2001 12:06:46 -0600

Today I looked at merging Boolean and Integer with libgcj.

There's one patch I'd like to make but I don't know how valid it is.
It is appended.

This looks odd, but it works with both gcj and javac.  Also it lets
gcj generate TYPE as a symbol reference and not something that
requires runtime initialization.

Is there any reason not to put this into Classpath?
Similar changes could be made for Integer, Long, etc.


For Boolean, if this change goes in, we'll just use the Classpath
version.  The two are very similar, but Classpath has javadoc.
For Integer, there is a bit more merging to do.  In some ways I find
the libgcj implementation easier to understand.  It is also more
efficient in some minor ways.

Tom

Index: java/lang/Boolean.java
===================================================================
RCS file: /cvs/classpath/java/lang/Boolean.java,v
retrieving revision 1.16
diff -u -r1.16 Boolean.java
--- java/lang/Boolean.java 2001/07/17 23:06:09 1.16
+++ java/lang/Boolean.java 2001/07/19 17:36:10
@@ -60,7 +60,7 @@
      * The primitive type <code>boolean</code> is represented by this 
      * <code>Class</code> object.
      */
-    public static final Class TYPE = 
VMClassLoader.getPrimitiveClass("boolean");
+    public static final Class TYPE = boolean.class;
     
     /**
      * The immutable value of this Boolean.



reply via email to

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