[kaffe] CVS kaffe (robilad): Removed global DEBUG field

Kaffe CVS cvs-commits at kaffe.org
Thu Feb 24 05:13:43 PST 2005


PatchSet 5607 
Date: 2005/02/24 13:08:56
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Removed global DEBUG field

2005-02-24  Dalibor Topic  <robilad at kaffe.org>

* libraries/javalib/java/lang/StrictMath.java (DEBUG):
new constant.
(tan, cos, sin, scale, remPiOver2) Use internal debug switch.

* libraries/javalib/java/io/ObjectInputStream.java (DEBUG):
new constant.
(ObjectInputStream, resolveClass) Use internal debug switch.

* libraries/javalib/java/io/ObjectOutputStream.java (DEBUG):
new constant.
(ObjectOutputStream, writeObject) Use internal debug switch.

* libraries/javalib/gnu/java/text/FormatCharacterIterator.java (DEBUG):
new constant.
(debug, dumpTable) Use internal debug switch.

* libraries/javalib/gnu/classpath/Configuration.java.in
(DEBUG) Removed.

Members: 
	ChangeLog:1.3652->1.3653 
	libraries/javalib/gnu/classpath/Configuration.java.in:1.2->1.3 
	libraries/javalib/gnu/java/text/FormatCharacterIterator.java:1.3->1.4 
	libraries/javalib/java/io/ObjectInputStream.java:1.50->1.51 
	libraries/javalib/java/io/ObjectOutputStream.java:1.30->1.31 
	libraries/javalib/java/lang/StrictMath.java:1.6->1.7 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3652 kaffe/ChangeLog:1.3653
--- kaffe/ChangeLog:1.3652	Thu Feb 24 12:00:04 2005
+++ kaffe/ChangeLog	Thu Feb 24 13:08:56 2005
@@ -1,5 +1,26 @@
 2005-02-24  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/java/lang/StrictMath.java (DEBUG): 
+	new constant.
+	(tan, cos, sin, scale, remPiOver2) Use internal debug switch.
+	
+	* libraries/javalib/java/io/ObjectInputStream.java (DEBUG):
+	new constant.
+	(ObjectInputStream, resolveClass) Use internal debug switch.
+
+	* libraries/javalib/java/io/ObjectOutputStream.java (DEBUG):
+	new constant.
+	(ObjectOutputStream, writeObject) Use internal debug switch.
+	
+	* libraries/javalib/gnu/java/text/FormatCharacterIterator.java (DEBUG): 
+	new constant.
+	(debug, dumpTable) Use internal debug switch.
+	
+	* libraries/javalib/gnu/classpath/Configuration.java.in
+	(DEBUG) Removed.
+
+2005-02-24  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/javalib/gnu/classpath/Configuration.java.in
 	(default_awt_peer_toolkit) Removed.
 
Index: kaffe/libraries/javalib/gnu/classpath/Configuration.java.in
diff -u kaffe/libraries/javalib/gnu/classpath/Configuration.java.in:1.2 kaffe/libraries/javalib/gnu/classpath/Configuration.java.in:1.3
--- kaffe/libraries/javalib/gnu/classpath/Configuration.java.in:1.2	Thu Feb 24 12:00:08 2005
+++ kaffe/libraries/javalib/gnu/classpath/Configuration.java.in	Thu Feb 24 13:09:00 2005
@@ -59,15 +59,6 @@
   String CLASSPATH_VERSION = "@VERSION@";
 
   /**
-   * The value of DEBUG is substituted according to whether the
-   * "--enable-debug" argument was passed to configure. Code
-   * which is made conditional based on the value of this flag - typically 
-   * code that generates debugging output - will be removed by the optimizer 
-   * in a non-debug build.
-   */
-  boolean DEBUG = @LIBDEBUG@;
-
-  /**
    * The value of LOAD_LIBRARY is substituted according to whether the
    * "--enable-load-library" or "--disable-load-library" argument was passed 
    * to configure.  By default, configure should define this is as true.
Index: kaffe/libraries/javalib/gnu/java/text/FormatCharacterIterator.java
diff -u kaffe/libraries/javalib/gnu/java/text/FormatCharacterIterator.java:1.3 kaffe/libraries/javalib/gnu/java/text/FormatCharacterIterator.java:1.4
--- kaffe/libraries/javalib/gnu/java/text/FormatCharacterIterator.java:1.3	Fri Jan  7 18:40:29 2005
+++ kaffe/libraries/javalib/gnu/java/text/FormatCharacterIterator.java	Thu Feb 24 13:09:00 2005
@@ -65,7 +65,8 @@
   private int attributeIndex;
   private int[] ranges;
   private HashMap[] attributes;
-  
+  private static final boolean DEBUG = false;
+
   /**
    * This constructor builds an empty iterated strings. The attributes
    * are empty and so is the string. However you may append strings
@@ -496,7 +497,7 @@
 
   private void debug(String s)
   {
-    if (Configuration.DEBUG)
+    if (DEBUG)
       System.out.println(s);
   }
 
@@ -504,7 +505,7 @@
   {
     int start_range = 0;
     
-    if (!Configuration.DEBUG)
+    if (!DEBUG)
       return;
 
     System.out.println("Dumping internal table:");
Index: kaffe/libraries/javalib/java/io/ObjectInputStream.java
diff -u kaffe/libraries/javalib/java/io/ObjectInputStream.java:1.50 kaffe/libraries/javalib/java/io/ObjectInputStream.java:1.51
--- kaffe/libraries/javalib/java/io/ObjectInputStream.java:1.50	Wed Feb 23 20:41:55 2005
+++ kaffe/libraries/javalib/java/io/ObjectInputStream.java	Thu Feb 24 13:09:00 2005
@@ -75,7 +75,7 @@
   public ObjectInputStream(InputStream in)
     throws IOException, StreamCorruptedException
   {
-    if (Configuration.DEBUG)
+    if (DEBUG)
       {
 	String val = System.getProperty("gcj.dumpobjects");
 	if (dump == false && val != null && !val.equals(""))
@@ -773,7 +773,7 @@
     if (callersClassLoader == null)
       {
 	callersClassLoader = currentLoader ();
-	if (Configuration.DEBUG && dump)
+	if (DEBUG && dump)
 	  {
 	    dumpElementln ("CallersClassLoader = " + callersClassLoader);
 	  }
@@ -1935,6 +1935,8 @@
 
   // The nesting depth for debugging output
   private int depth = 0;
+
+  private static final boolean DEBUG = false;
 
   private void dumpElement (String msg)
   {
Index: kaffe/libraries/javalib/java/io/ObjectOutputStream.java
diff -u kaffe/libraries/javalib/java/io/ObjectOutputStream.java:1.30 kaffe/libraries/javalib/java/io/ObjectOutputStream.java:1.31
--- kaffe/libraries/javalib/java/io/ObjectOutputStream.java:1.30	Wed Feb 23 20:41:55 2005
+++ kaffe/libraries/javalib/java/io/ObjectOutputStream.java	Thu Feb 24 13:09:00 2005
@@ -146,7 +146,7 @@
     useSubclassMethod = false;
     writeStreamHeader();
 
-    if (Configuration.DEBUG)
+    if (DEBUG)
       {
 	String val = System.getProperty("gcj.dumpobjects");
 	if (val != null && !val.equals(""))
@@ -378,7 +378,7 @@
 	setBlockDataMode(false);
 	try
 	  {
-	    if (Configuration.DEBUG)
+	    if (DEBUG)
 	      {
 		e.printStackTrace(System.out);
 	      }
@@ -389,7 +389,7 @@
 	    StreamCorruptedException ex = 
 	      new StreamCorruptedException
 	      (ioe + " thrown while exception was being written to stream.");
-	    if (Configuration.DEBUG)
+	    if (DEBUG)
 	      {
 		ex.printStackTrace(System.out);
 	      }
@@ -1565,6 +1565,8 @@
 
   // Set if we're generating debugging dumps
   private boolean dump = false;
+
+  private static final boolean DEBUG = false;
 
   static
   {
Index: kaffe/libraries/javalib/java/lang/StrictMath.java
diff -u kaffe/libraries/javalib/java/lang/StrictMath.java:1.6 kaffe/libraries/javalib/java/lang/StrictMath.java:1.7
--- kaffe/libraries/javalib/java/lang/StrictMath.java:1.6	Thu Oct 14 22:02:27 2004
+++ kaffe/libraries/javalib/java/lang/StrictMath.java	Thu Feb 24 13:09:01 2005
@@ -75,6 +75,8 @@
  */
 public final strictfp class StrictMath
 {
+  private static final boolean DEBUG = false;
+
   /**
    * StrictMath is non-instantiable.
    */
@@ -1443,7 +1445,7 @@
     x = abs(x);
     double z;
     int n;
-    if (Configuration.DEBUG && (x <= PI / 4 || x != x
+    if (DEBUG && (x <= PI / 4 || x != x
                                 || x == Double.POSITIVE_INFINITY))
       throw new InternalError("Assertion failure");
     if (x < 3 * PI / 4) // If |x| is small.
@@ -1710,7 +1712,7 @@
    */
   private static double scale(double x, int n)
   {
-    if (Configuration.DEBUG && abs(n) >= 2048)
+    if (DEBUG && abs(n) >= 2048)
       throw new InternalError("Assertion failure");
     if (x == 0 || x == Double.NEGATIVE_INFINITY
         || ! (x < Double.POSITIVE_INFINITY) || n == 0)
@@ -1745,7 +1747,7 @@
    */
   private static double sin(double x, double y)
   {
-    if (Configuration.DEBUG && abs(x + y) > 0.7854)
+    if (DEBUG && abs(x + y) > 0.7854)
       throw new InternalError("Assertion failure");
     if (abs(x) < 1 / TWO_27)
       return x;  // If |x| ~< 2**-27, already know answer.
@@ -1767,7 +1769,7 @@
    */
   private static double cos(double x, double y)
   {
-    if (Configuration.DEBUG && abs(x + y) > 0.7854)
+    if (DEBUG && abs(x + y) > 0.7854)
       throw new InternalError("Assertion failure");
     x = abs(x);
     if (x < 1 / TWO_27)
@@ -1794,7 +1796,7 @@
   private static double tan(double x, double y, boolean invert)
   {
     // PI/2 is irrational, so no double is a perfect multiple of it.
-    if (Configuration.DEBUG && (abs(x + y) > 0.7854 || (x == 0 && invert)))
+    if (DEBUG && (abs(x + y) > 0.7854 || (x == 0 && invert)))
       throw new InternalError("Assertion failure");
     boolean negative = x < 0;
     if (negative)




More information about the kaffe mailing list