de-eclipseify
[nestedvm.git] / src / org / ibex / nestedvm / RuntimeCompiler.java
index 2aa4305..78b4e9a 100644 (file)
@@ -5,8 +5,9 @@ import java.io.*;
 import org.ibex.nestedvm.util.*;
 
 // FEATURE: This need a lot of work to support binaries spanned across many classes
-public class RuntimeCompiler {          
-    private static final SingleClassLoader singleClassLoader = new SingleClassLoader();
+public class RuntimeCompiler {  
+    // FEATURE: Do we need to periodicly create a new classloader to allow old clases to be GCed?
+    private static SingleClassLoader singleClassLoader = new SingleClassLoader();
     // FEATURE: Is it ok if this overflows?
     private static long nextID = 1;
     private static synchronized String uniqueID() { return Long.toString(nextID++); }
@@ -26,7 +27,7 @@ public class RuntimeCompiler {
     
     private static class SingleClassLoader extends ClassLoader {
         public Class loadClass(String name, boolean resolve) throws ClassNotFoundException {
-                   System.err.println(this + ": loadClass(\"" + name + "," + resolve + ");");
+                System.err.println(this + ": loadClass(\"" + name + "," + resolve + ");");
             return super.loadClass(name,resolve);
         }
         public Class fromBytes(String name, byte[] b) { return fromBytes(name,b,0,b.length); }
@@ -38,8 +39,8 @@ public class RuntimeCompiler {
     }
     
     public static void main(String[] args) throws Exception {
-           if(args.length == 0) {
-                   System.err.println("Usage: RuntimeCompiler mipsbinary");
+            if(args.length == 0) {
+                    System.err.println("Usage: RuntimeCompiler mipsbinary");
             System.exit(1);
         }
         UnixRuntime r = (UnixRuntime) compile(new Seekable.File(args[0])).newInstance();