--- /home/cpdev/src/classpath/java/io/ObjectInputStream.java	2005-07-11 05:32:32.000000000 +0000
+++ java/io/ObjectInputStream.java	2005-06-30 05:34:35.000000000 +0000
@@ -75,7 +75,7 @@
   public ObjectInputStream(InputStream in)
     throws IOException, StreamCorruptedException
   {
-    if (DEBUG)
+    if (Configuration.DEBUG)
       {
 	String val = System.getProperty("gcj.dumpobjects");
 	if (dump == false && val != null && !val.equals(""))
@@ -773,7 +773,7 @@
     if (callersClassLoader == null)
       {
 	callersClassLoader = currentLoader ();
-	if (DEBUG && dump)
+	if (Configuration.DEBUG && dump)
 	  {
 	    dumpElementln ("CallersClassLoader = " + callersClassLoader);
 	  }
@@ -786,10 +786,8 @@
    * Returns the most recent user defined ClassLoader on the execution stack
    * or null if none is found.
    */
-  private ClassLoader currentLoader()
-  {
-    return VMObjectInputStream.currentClassLoader();
-  }
+  // GCJ LOCAL: native method.
+  private native ClassLoader currentLoader();
 
   /**
    * Lookup a class stored in the local hashtable. If it is not
@@ -1825,7 +1823,7 @@
         throw new InvalidClassException("Missing accessible no-arg base class constructor for " + real_class.getName()); 
     try
       {
-	return VMObjectInputStream.allocateObject(real_class, constructor.getDeclaringClass(), constructor);
+	return allocateObject(real_class, constructor.getDeclaringClass(), constructor);
       }
     catch (InstantiationException e)
       {
@@ -1884,6 +1882,9 @@
     prereadFields = null;
   }
     
+  private native Object allocateObject(Class clazz, Class constr_clazz, Constructor constructor)
+    throws InstantiationException;
+
   private static final int BUFFER_SIZE = 1024;
 
   private DataInputStream realInputStream;
@@ -1911,8 +1912,6 @@
   // The nesting depth for debugging output
   private int depth = 0;
 
-  private static final boolean DEBUG = false;
-
   private void dumpElement (String msg)
   {
     System.out.print(msg);
