[armedbear-cvs] r12255 - in trunk/abcl/src/org/armedbear/lisp: . scripting

Erik Huelsmann ehuelsmann at common-lisp.net
Fri Nov 6 22:36:36 UTC 2009


Author: ehuelsmann
Date: Fri Nov  6 17:36:32 2009
New Revision: 12255

Log:
Rename ConditionThrowable to ControlTransfer and remove
  try/catch blocks which don't have anything to do with
  non-local transfer of control.

Added:
   trunk/abcl/src/org/armedbear/lisp/ControlTransfer.java
      - copied, changed from r12254, /trunk/abcl/src/org/armedbear/lisp/ConditionThrowable.java
Removed:
   trunk/abcl/src/org/armedbear/lisp/ConditionThrowable.java
Modified:
   trunk/abcl/src/org/armedbear/lisp/AbstractBitVector.java
   trunk/abcl/src/org/armedbear/lisp/AbstractString.java
   trunk/abcl/src/org/armedbear/lisp/Autoload.java
   trunk/abcl/src/org/armedbear/lisp/ComplexString.java
   trunk/abcl/src/org/armedbear/lisp/EqualHashTable.java
   trunk/abcl/src/org/armedbear/lisp/EqualpHashTable.java
   trunk/abcl/src/org/armedbear/lisp/FileStream.java
   trunk/abcl/src/org/armedbear/lisp/FillPointerOutputStream.java
   trunk/abcl/src/org/armedbear/lisp/Function.java
   trunk/abcl/src/org/armedbear/lisp/Go.java
   trunk/abcl/src/org/armedbear/lisp/Interpreter.java
   trunk/abcl/src/org/armedbear/lisp/JHandler.java
   trunk/abcl/src/org/armedbear/lisp/JProxy.java
   trunk/abcl/src/org/armedbear/lisp/Java.java
   trunk/abcl/src/org/armedbear/lisp/JavaClass.java
   trunk/abcl/src/org/armedbear/lisp/JavaObject.java
   trunk/abcl/src/org/armedbear/lisp/JavaStackFrame.java
   trunk/abcl/src/org/armedbear/lisp/Lisp.java
   trunk/abcl/src/org/armedbear/lisp/LispThread.java
   trunk/abcl/src/org/armedbear/lisp/Pathname.java
   trunk/abcl/src/org/armedbear/lisp/Profiler.java
   trunk/abcl/src/org/armedbear/lisp/Return.java
   trunk/abcl/src/org/armedbear/lisp/SpecialOperator.java
   trunk/abcl/src/org/armedbear/lisp/StandardGenericFunction.java
   trunk/abcl/src/org/armedbear/lisp/Stream.java
   trunk/abcl/src/org/armedbear/lisp/StringFunctions.java
   trunk/abcl/src/org/armedbear/lisp/Symbol.java
   trunk/abcl/src/org/armedbear/lisp/ThreadDestroyed.java
   trunk/abcl/src/org/armedbear/lisp/Throw.java
   trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngine.java

Modified: trunk/abcl/src/org/armedbear/lisp/AbstractBitVector.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/AbstractBitVector.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/AbstractBitVector.java	Fri Nov  6 17:36:32 2009
@@ -162,17 +162,10 @@
     public int hashCode()
     {
         int hashCode = 1;
-        try {
-            // Consider first 64 bits only.
-            final int limit = Math.min(length(), 64);
-            for (int i = 0; i < limit; i++)
-                hashCode = hashCode * 31 + getBit(i);
-        }
-        // ### fixme exception
-        catch (ConditionThrowable t) {
-            // Shouldn't happen.
-            Debug.trace(t);
-        }
+        // Consider first 64 bits only.
+        final int limit = Math.min(length(), 64);
+        for (int i = 0; i < limit; i++)
+            hashCode = hashCode * 31 + getBit(i);
         return hashCode;
     }
 

Modified: trunk/abcl/src/org/armedbear/lisp/AbstractString.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/AbstractString.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/AbstractString.java	Fri Nov  6 17:36:32 2009
@@ -120,17 +120,12 @@
     }
 
     public String toString() {
-	try {
 	    int length = length();
 	    StringBuilder sb = new StringBuilder(length);
 	    for(int i = 0; i < length; ++i) {
-		sb.append(charAt(i));
+			sb.append(charAt(i));
 	    }
 	    return sb.toString();
-	} catch(ConditionThrowable t) {
-        // ### FIXME exception
-	    throw new Error(t); //Should never happen
-	}
     }
 
 }

Modified: trunk/abcl/src/org/armedbear/lisp/Autoload.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Autoload.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Autoload.java	Fri Nov  6 17:36:32 2009
@@ -79,13 +79,7 @@
     {
         Symbol symbol = intern(symbolName.toUpperCase(), pkg);
         if (pkg != PACKAGE_CL && exported) {
-            try {
-                pkg.export(symbol);
-            }
-            catch (ConditionThrowable t) {
-                // ### FIXME exception
-                Debug.assertTrue(false);
-            }
+            pkg.export(symbol);
         }
         if (symbol.getSymbolFunction() == null)
             symbol.setSymbolFunction(new Autoload(symbol, null,

Modified: trunk/abcl/src/org/armedbear/lisp/ComplexString.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/ComplexString.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/ComplexString.java	Fri Nov  6 17:36:32 2009
@@ -526,15 +526,7 @@
     final int limit = length();
     for (int i = 0; i < limit; i++)
       {
-        try
-          {
-            hashCode += charAt(i);
-          }
-        catch (ConditionThrowable t)
-          {
-            // ### FIXME exception
-            Debug.trace(t);
-          }
+        hashCode += charAt(i);
         hashCode += (hashCode << 10);
         hashCode ^= (hashCode >> 6);
       }
@@ -552,15 +544,7 @@
     final int limit = length();
     for (int i = 0; i < limit; i++)
       {
-        try
-          {
-            hashCode += Character.toUpperCase(charAt(i));
-          }
-        catch (ConditionThrowable t)
-          {
-            // ### FIXME exception
-            Debug.trace(t);
-          }
+        hashCode += Character.toUpperCase(charAt(i));
         hashCode += (hashCode << 10);
         hashCode ^= (hashCode >> 6);
       }

Copied: trunk/abcl/src/org/armedbear/lisp/ControlTransfer.java (from r12254, /trunk/abcl/src/org/armedbear/lisp/ConditionThrowable.java)
==============================================================================
--- /trunk/abcl/src/org/armedbear/lisp/ConditionThrowable.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/ControlTransfer.java	Fri Nov  6 17:36:32 2009
@@ -1,5 +1,5 @@
 /*
- * ConditionThrowable.java
+ * ControlTransfer.java
  *
  * Copyright (C) 2003-2005 Peter Graves
  * $Id$
@@ -33,13 +33,13 @@
 
 package org.armedbear.lisp;
 
-abstract public class ConditionThrowable extends RuntimeException
+abstract public class ControlTransfer extends RuntimeException
 {
-    public ConditionThrowable()
+    public ControlTransfer()
     {
     }
     /**
-     * Overridden in order to make ConditionThrowable construct
+     * Overridden in order to make ControlTransfer construct
      * faster. This avoids gathering stack trace information.
      */
     @Override
@@ -48,7 +48,7 @@
 	return this;
     }
 
-    public ConditionThrowable(String message)
+    public ControlTransfer(String message)
     {
         super(message);
     }

Modified: trunk/abcl/src/org/armedbear/lisp/EqualHashTable.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/EqualHashTable.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/EqualHashTable.java	Fri Nov  6 17:36:32 2009
@@ -56,16 +56,8 @@
     HashEntry e = buckets[key.sxhash() & mask];
     while (e != null)
       {
-        try
-          {
-            if (key == e.key || key.equal(e.key))
-              return e.value;
-          }
-        // ### FIXME exception
-        catch (ConditionThrowable t)
-          {
-            Debug.trace(t);
-          }
+        if (key == e.key || key.equal(e.key))
+          return e.value;
         e = e.next;
       }
     return null;

Modified: trunk/abcl/src/org/armedbear/lisp/EqualpHashTable.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/EqualpHashTable.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/EqualpHashTable.java	Fri Nov  6 17:36:32 2009
@@ -54,16 +54,8 @@
     HashEntry e = buckets[index];
     while (e != null)
       {
-        try
-          {
-            if (key.equalp(e.key))
-              return e.value;
-          }
-        // ### FIXME exception
-        catch (ConditionThrowable t)
-          {
-            Debug.trace(t);
-          }
+        if (key.equalp(e.key))
+          return e.value;
         e = e.next;
       }
     return null;

Modified: trunk/abcl/src/org/armedbear/lisp/FileStream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/FileStream.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/FileStream.java	Fri Nov  6 17:36:32 2009
@@ -116,13 +116,7 @@
 	    }
         } else {
             isBinaryStream = true;
-            int width;
-            try {
-                width = Fixnum.getValue(elementType.cadr());
-            }
-            catch (ConditionThrowable t) {
-                width = 8;
-            }
+            int width = Fixnum.getValue(elementType.cadr());
             bytesPerUnit = width / 8;
 	    if (isInputStream) {
 		initAsBinaryInputStream(racf.getInputStream());

Modified: trunk/abcl/src/org/armedbear/lisp/FillPointerOutputStream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/FillPointerOutputStream.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/FillPointerOutputStream.java	Fri Nov  6 17:36:32 2009
@@ -74,23 +74,9 @@
             int fp = string.getFillPointer();
             if (fp >= 0) {
                 final int limit = Math.min(cbuf.length, off + len);
-                try {
-                    string.ensureCapacity(fp + limit);
-                }
-                catch (ConditionThrowable t) {
-                    // ### FIXME exception
-                    // Shouldn't happen.
-                    Debug.trace(t);
-                }
+                string.ensureCapacity(fp + limit);
                 for (int i = off; i < limit; i++) {
-                    try {
-                        string.setCharAt(fp, cbuf[i]);
-                    }
-                    catch (ConditionThrowable t) {
-                        // ### FIXME exception
-                        // Shouldn't happen.
-                        Debug.trace(t);
-                    }
+                    string.setCharAt(fp, cbuf[i]);
                     ++fp;
                 }
             }

Modified: trunk/abcl/src/org/armedbear/lisp/Function.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Function.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Function.java	Fri Nov  6 17:36:32 2009
@@ -68,13 +68,8 @@
         setLambdaName(symbol);
         setLambdaList(new SimpleString(arglist));
         if (docstring != null) {
-            try {
-                symbol.setDocumentation(Symbol.FUNCTION,
-                                        new SimpleString(docstring));
-            }
-            catch (ConditionThrowable t) {
-                Debug.assertTrue(false);
-            }
+            symbol.setDocumentation(Symbol.FUNCTION,
+                                    new SimpleString(docstring));
         }
     }
 
@@ -106,23 +101,18 @@
         if (arglist instanceof String)
             setLambdaList(new SimpleString(arglist));
         if (name != null) {
-            try {
-                Symbol symbol;
-                if (exported)
-                    symbol = pkg.internAndExport(name.toUpperCase());
-                else
-                    symbol = pkg.intern(name.toUpperCase());
-                symbol.setSymbolFunction(this);
-                if (cold)
-                    symbol.setBuiltInFunction(true);
-                setLambdaName(symbol);
-                if (docstring != null)
-                    symbol.setDocumentation(Symbol.FUNCTION,
-                                            new SimpleString(docstring));
-            }
-            catch (ConditionThrowable t) {
-                Debug.assertTrue(false);
-            }
+            Symbol symbol;
+            if (exported)
+                symbol = pkg.internAndExport(name.toUpperCase());
+            else
+                symbol = pkg.intern(name.toUpperCase());
+            symbol.setSymbolFunction(this);
+            if (cold)
+                symbol.setBuiltInFunction(true);
+            setLambdaName(symbol);
+            if (docstring != null)
+                symbol.setDocumentation(Symbol.FUNCTION,
+                                        new SimpleString(docstring));
         }
     }
 

Modified: trunk/abcl/src/org/armedbear/lisp/Go.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Go.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Go.java	Fri Nov  6 17:36:32 2009
@@ -33,7 +33,7 @@
 
 package org.armedbear.lisp;
 
-public final class Go extends ConditionThrowable
+public final class Go extends ControlTransfer
 {
     public final LispObject tagbody;
     public final LispObject tag;

Modified: trunk/abcl/src/org/armedbear/lisp/Interpreter.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Interpreter.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Interpreter.java	Fri Nov  6 17:36:32 2009
@@ -160,16 +160,7 @@
     public static synchronized void initializeLisp()
     {
         if (!initialized) {
-            try {
-                Load.loadSystemFile("boot.lisp", false, false, false);
-            }
-            catch (ConditionThrowable c) {
-                // ### FIXME exception
-                reportError(c, LispThread.currentThread());
-            }
-            catch (Throwable t) {
-                t.printStackTrace();
-            }
+            Load.loadSystemFile("boot.lisp", false, false, false);
             initialized = true;
         }
     }
@@ -184,11 +175,8 @@
                 Class.forName("org.armedbear.j.LispAPI");
                 Load.loadSystemFile("j.lisp");
             }
-            catch (ConditionThrowable c) {
-                // ### FIXME exception
-                reportError(c, LispThread.currentThread());
-            }
             catch (Throwable t) {
+                // ### FIXME exception
                 t.printStackTrace();
             }
             initialized = true;
@@ -277,8 +265,7 @@
                         try {
                             evaluate(args[i + 1]);
                         }
-                        catch (ConditionThrowable c) {
-                            // ### FIXME exception
+                        catch (UnhandledCondition c) {
                             final String separator =
                                 System.getProperty("line.separator");
                             FastStringBuffer sb = new FastStringBuffer();
@@ -305,22 +292,12 @@
                 } else if (arg.equals("--load") ||
                            arg.equals("--load-system-file")) {
                     if (i + 1 < args.length) {
-                        try {
-                            if (arg.equals("--load"))
-                                Load.load(new Pathname(args[i + 1]),
-                                          args[i + 1],
-                                          false, false, true);
-                            else
-                                Load.loadSystemFile(args[i + 1]);
-                        }
-                        catch (ConditionThrowable c) {
-                            // ### FIXME exception
-                            System.err.println("Caught condition: " +
-                                               c.getCondition().writeToString() +
-                                               " while loading: " +
-                                               args[i+1]);
-                            System.exit(2);
-                        }
+                        if (arg.equals("--load"))
+                            Load.load(new Pathname(args[i + 1]),
+                                      args[i + 1],
+                                      false, false, true);
+                        else
+                            Load.loadSystemFile(args[i + 1]);
                         ++i;
                     } else {
                         // Shouldn't happen.
@@ -387,8 +364,9 @@
                     getStandardInput().clearInput();
                     out._writeLine("Stack overflow");
                 }
-                catch (ConditionThrowable c) {
-                    // ### FIXME exception
+                catch (ControlTransfer c) {
+                    // We're on the toplevel, if this occurs,
+                    // we're toast...
                     reportError(c, thread);
                 }
                 catch (Throwable t) {
@@ -403,7 +381,24 @@
         }
     }
 
-    private static void reportError(ConditionThrowable c, LispThread thread)
+    private static void reportError(ControlTransfer c, LispThread thread)
+    {
+        try {
+            getStandardInput().clearInput();
+            Stream out = getStandardOutput();
+            out.freshLine();
+            Condition condition = (Condition) c.getCondition();
+            out._writeLine("Error: unhandled condition: " +
+                           condition.writeToString());
+            if (thread != null)
+                thread.printBacktrace();
+        }
+        catch (Throwable t) {
+            
+        }
+    }
+
+    private static void reportError(UnhandledCondition c, LispThread thread)
     {
         try {
             getStandardInput().clearInput();

Modified: trunk/abcl/src/org/armedbear/lisp/JHandler.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/JHandler.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/JHandler.java	Fri Nov  6 17:36:32 2009
@@ -81,13 +81,7 @@
                 LispObject lispAsVector = new SimpleVector(lispAs);
                 LispObject[] args = new LispObject[] //FIXME: count -> seq_num
                 { data, new JavaObject(o), lispAiVector, lispAsVector, Keyword.internKeyword(s), count };
-                try {
-                    f.execute(args);
-                }
-                catch (ConditionThrowable t) {
-                    // ### FIXME exception
-                    t.printStackTrace();
-                }
+                f.execute(args);
             }
         }
     }

Modified: trunk/abcl/src/org/armedbear/lisp/JProxy.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/JProxy.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/JProxy.java	Fri Nov  6 17:36:32 2009
@@ -94,23 +94,15 @@
           Function f = entry.getLispMethod(methodName);
           if (f != null)
             {
-              try
+              LispObject lispArgs = NIL;
+              if (args != null)
                 {
-                  LispObject lispArgs = NIL;
-                  if (args != null)
-                    {
-                      for (int i = args.length - 1 ; 0 <= i  ; i--)
-                        lispArgs = lispArgs.push(new JavaObject(args[i]));
-                    }
-                  LispObject result = evalCall(f, lispArgs, new Environment(),
-                                               LispThread.currentThread());
-                  return (method.getReturnType() == void.class ? null : result.javaInstance());
-                }
-              // ### FIXME exception
-              catch (ConditionThrowable t)
-                {
-                  t.printStackTrace();
+                  for (int i = args.length - 1 ; 0 <= i  ; i--)
+                    lispArgs = lispArgs.push(new JavaObject(args[i]));
                 }
+              LispObject result = evalCall(f, lispArgs, new Environment(),
+                                           LispThread.currentThread());
+              return (method.getReturnType() == void.class ? null : result.javaInstance());
             }
         }
       return null;

Modified: trunk/abcl/src/org/armedbear/lisp/Java.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Java.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Java.java	Fri Nov  6 17:36:32 2009
@@ -277,7 +277,7 @@
             catch (NoSuchMethodException e) {
                 error(new LispError("no such constructor"));
             }
-            catch (ConditionThrowable e) {
+            catch (ControlTransfer e) {
                 throw e;
             }
             catch (Throwable t) {
@@ -335,7 +335,7 @@
                 sb.append(')');
                 error(new LispError(sb.toString()));
             }
-            catch (ConditionThrowable e) {
+            catch (ControlTransfer e) {
                 throw e;
             }
             catch (Throwable t) {
@@ -648,7 +648,7 @@
             return JavaObject.getInstance(method.invoke(instance, methodArgs),
                                           translate);
         }
-        catch (ConditionThrowable t) {
+        catch (ControlTransfer t) {
             throw t;
         }
         catch (Throwable t) {

Modified: trunk/abcl/src/org/armedbear/lisp/JavaClass.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/JavaClass.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/JavaClass.java	Fri Nov  6 17:36:32 2009
@@ -44,25 +44,21 @@
 
 	private void initCPL() {
 		LispObject cpl = Lisp.NIL;
-		try {
-			cpl = cpl.push(BuiltInClass.CLASS_T);
-			cpl = cpl.push(BuiltInClass.JAVA_OBJECT);
-			Set<Class<?>> alreadySeen = new HashSet<Class<?>>();
-			Stack<JavaClass> stack = new Stack<JavaClass>();
-			Class<?> theClass = javaClass;
-			boolean stop = false;
-			while(!stop && theClass != null) {
-				stop = addClass(alreadySeen, stack, theClass);
-				for(Class<?> c : theClass.getInterfaces()) {
-					stop = addClass(alreadySeen, stack, c) && stop; //watch out for short-circuiting!
-				}
-				theClass = theClass.getSuperclass();
+		cpl = cpl.push(BuiltInClass.CLASS_T);
+		cpl = cpl.push(BuiltInClass.JAVA_OBJECT);
+		Set<Class<?>> alreadySeen = new HashSet<Class<?>>();
+		Stack<JavaClass> stack = new Stack<JavaClass>();
+		Class<?> theClass = javaClass;
+		boolean stop = false;
+		while(!stop && theClass != null) {
+			stop = addClass(alreadySeen, stack, theClass);
+			for(Class<?> c : theClass.getInterfaces()) {
+				stop = addClass(alreadySeen, stack, c) && stop; //watch out for short-circuiting!
 			}
-			while(!stack.isEmpty()) {
-				cpl = cpl.push(stack.pop());
-			}
-		} catch (ConditionThrowable e) {
-			throw new Error("Cannot push class in class precedence list", e);
+			theClass = theClass.getSuperclass();
+		}
+		while(!stack.isEmpty()) {
+			cpl = cpl.push(stack.pop());
 		}
 		setCPL(cpl);
 	}

Modified: trunk/abcl/src/org/armedbear/lisp/JavaObject.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/JavaObject.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/JavaObject.java	Fri Nov  6 17:36:32 2009
@@ -223,7 +223,7 @@
     @Override
     public String writeToString()
     {
-        if (obj instanceof ConditionThrowable)
+        if (obj instanceof ControlTransfer)
             return obj.toString();
 	final String s;
 	if(obj != null) {

Modified: trunk/abcl/src/org/armedbear/lisp/JavaStackFrame.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/JavaStackFrame.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/JavaStackFrame.java	Fri Nov  6 17:36:32 2009
@@ -53,18 +53,9 @@
 
   @Override
   public String writeToString() { 
-    String result = null;
     final String JAVA_STACK_FRAME = "JAVA-STACK-FRAME";
-    try {
-      result = unreadableString(JAVA_STACK_FRAME + " " 
-				+ toLispString().toString()); 
-    } catch (ConditionThrowable t) {
-        // ### FIXME exception
-      Debug.trace("Implementation error: ");
-      Debug.trace(t);
-      result = unreadableString(JAVA_STACK_FRAME);
-    }
-    return result;
+    return unreadableString(JAVA_STACK_FRAME + " "
+				+ toLispString().toString());
   }
 
   @Override

Modified: trunk/abcl/src/org/armedbear/lisp/Lisp.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Lisp.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Lisp.java	Fri Nov  6 17:36:32 2009
@@ -1453,14 +1453,9 @@
 
   public static final String safeWriteToString(LispObject obj)
   {
-    try
-      {
+    try {
         return obj.writeToString();
       }
-    catch (ConditionThrowable t)
-      {
-        return obj.toString();
-      }
     catch (NullPointerException e)
       {
         Debug.trace(e);
@@ -2173,14 +2168,7 @@
                                            LispObject value)
   {
     Symbol symbol = pkg.intern(name);
-    try
-      {
-        pkg.export(symbol); // FIXME Inefficient!
-      }
-    catch (ConditionThrowable t)
-      {
-        Debug.trace(t);
-      }
+    pkg.export(symbol); // FIXME Inefficient!
     symbol.setSpecial(true);
     symbol.setSymbolValue(value);
     return symbol;
@@ -2190,14 +2178,7 @@
                                             LispObject value)
   {
     Symbol symbol = pkg.intern(name);
-    try
-      {
-        pkg.export(symbol); // FIXME Inefficient!
-      }
-    catch (ConditionThrowable t)
-      {
-        Debug.trace(t);
-      }
+    pkg.export(symbol); // FIXME Inefficient!
     symbol.initializeConstant(value);
     return symbol;
   }

Modified: trunk/abcl/src/org/armedbear/lisp/LispThread.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/LispThread.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/LispThread.java	Fri Nov  6 17:36:32 2009
@@ -90,12 +90,7 @@
                 }
                 catch (Throwable t) {
                     if (isInterrupted()) {
-                        try {
-                            processThreadInterrupts();
-                        }
-                        catch (ConditionThrowable c) {
-                            Debug.trace(c);
-                        }
+                        processThreadInterrupts();
                     }
                 }
                 finally {
@@ -107,14 +102,8 @@
         javaThread = new Thread(r);
         this.name = name;
         map.put(javaThread, this);
-        try {
-            if (name != NIL)
-                javaThread.setName(name.getStringValue());
-        } catch (ConditionThrowable ex) {
-            // ### FIXME exception
-            Debug.trace("Failed to set thread name:");
-	    Debug.trace(ex);
-        }
+        if (name != NIL)
+            javaThread.setName(name.getStringValue());
         javaThread.setDaemon(true);
         javaThread.start();
     }
@@ -765,38 +754,32 @@
         }
         // Object doesn't fit.
         if (obj instanceof Cons) {
-            try {
-                boolean newlineBefore = false;
-                LispObject[] array = obj.copyToArray();
-                if (array.length > 0) {
-                    LispObject first = array[0];
-                    if (first == Symbol.LET) {
-                        newlineBefore = true;
-                    }
-                }
-                int charPos = stream.getCharPos();
-                if (newlineBefore && charPos != indentBy) {
-                    stream.terpri();
-                    charPos = stream.getCharPos();
+            boolean newlineBefore = false;
+            LispObject[] array = obj.copyToArray();
+            if (array.length > 0) {
+                LispObject first = array[0];
+                if (first == Symbol.LET) {
+                    newlineBefore = true;
                 }
-                if (charPos < indentBy) {
-                    StringBuffer sb = new StringBuffer();
-                    for (int i = charPos; i < indentBy; i++)
-                        sb.append(' ');
-                    stream._writeString(sb.toString());
-                }
-                stream.print('(');
-                for (int i = 0; i < array.length; i++) {
-                    pprint(array[i], indentBy + 2, stream);
-                    if (i < array.length - 1)
-                        stream.print(' ');
-                }
-                stream.print(')');
             }
-            catch (ConditionThrowable t) {
-                // ### FIXME exception
-                Debug.trace(t);
+            int charPos = stream.getCharPos();
+            if (newlineBefore && charPos != indentBy) {
+                stream.terpri();
+                charPos = stream.getCharPos();
+            }
+            if (charPos < indentBy) {
+                StringBuffer sb = new StringBuffer();
+                for (int i = charPos; i < indentBy; i++)
+                    sb.append(' ');
+                stream._writeString(sb.toString());
+            }
+            stream.print('(');
+            for (int i = 0; i < array.length; i++) {
+                pprint(array[i], indentBy + 2, stream);
+                if (i < array.length - 1)
+                   stream.print(' ');
             }
+            stream.print(')');
         } else {
             stream.terpri();
             StringBuffer sb = new StringBuffer();
@@ -1054,18 +1037,14 @@
     static {
         //FIXME: this block has been added for pre-0.16 compatibility
         // and can be removed the latest at release 0.22
-        try {
-            PACKAGE_EXT.export(Symbol.intern("MAKE-THREAD", PACKAGE_THREADS));
-            PACKAGE_EXT.export(Symbol.intern("THREADP", PACKAGE_THREADS));
-            PACKAGE_EXT.export(Symbol.intern("THREAD-ALIVE-P", PACKAGE_THREADS));
-            PACKAGE_EXT.export(Symbol.intern("THREAD-NAME", PACKAGE_THREADS));
-            PACKAGE_EXT.export(Symbol.intern("MAPCAR-THREADS", PACKAGE_THREADS));
-            PACKAGE_EXT.export(Symbol.intern("DESTROY-THREAD", PACKAGE_THREADS));
-            PACKAGE_EXT.export(Symbol.intern("INTERRUPT-THREAD", PACKAGE_THREADS));
-            PACKAGE_EXT.export(Symbol.intern("CURRENT-THREAD", PACKAGE_THREADS));
-        }
-        // ### FIXME exception
-        catch (ConditionThrowable ct) { }
+        PACKAGE_EXT.export(Symbol.intern("MAKE-THREAD", PACKAGE_THREADS));
+        PACKAGE_EXT.export(Symbol.intern("THREADP", PACKAGE_THREADS));
+        PACKAGE_EXT.export(Symbol.intern("THREAD-ALIVE-P", PACKAGE_THREADS));
+        PACKAGE_EXT.export(Symbol.intern("THREAD-NAME", PACKAGE_THREADS));
+        PACKAGE_EXT.export(Symbol.intern("MAPCAR-THREADS", PACKAGE_THREADS));
+        PACKAGE_EXT.export(Symbol.intern("DESTROY-THREAD", PACKAGE_THREADS));
+        PACKAGE_EXT.export(Symbol.intern("INTERRUPT-THREAD", PACKAGE_THREADS));
+        PACKAGE_EXT.export(Symbol.intern("CURRENT-THREAD", PACKAGE_THREADS));
     }
 
     // ### use-fast-calls

Modified: trunk/abcl/src/org/armedbear/lisp/Pathname.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Pathname.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Pathname.java	Fri Nov  6 17:36:32 2009
@@ -490,90 +490,85 @@
     @Override
     public String writeToString()
     {
+        final LispThread thread = LispThread.currentThread();
+        boolean printReadably = (Symbol.PRINT_READABLY.symbolValue(thread) != NIL);
+        boolean printEscape = (Symbol.PRINT_ESCAPE.symbolValue(thread) != NIL);
+        boolean useNamestring;
+        String s = null;
         try {
-            final LispThread thread = LispThread.currentThread();
-            boolean printReadably = (Symbol.PRINT_READABLY.symbolValue(thread) != NIL);
-            boolean printEscape = (Symbol.PRINT_ESCAPE.symbolValue(thread) != NIL);
-            boolean useNamestring;
-            String s = null;
-            try {
-                s = getNamestring();
-            }
-            catch (Throwable t) {}
-            if (s != null) {
-                useNamestring = true;
-                if (printReadably) {
-                    // We have a namestring. Check for pathname components that
-                    // can't be read from the namestring.
-                    if (host != NIL || version != NIL) {
+            s = getNamestring();
+        }
+        // ### FIXME exception
+        catch (Throwable t) {}
+        if (s != null) {
+            useNamestring = true;
+            if (printReadably) {
+                // We have a namestring. Check for pathname components that
+                // can't be read from the namestring.
+                if (host != NIL || version != NIL) {
+                    useNamestring = false;
+                } else if (name instanceof AbstractString) {
+                    String n = name.getStringValue();
+                    if (n.equals(".") || n.equals(".."))
+                        useNamestring = false;
+                    else if (n.indexOf(File.separatorChar) >= 0)
                         useNamestring = false;
-                    } else if (name instanceof AbstractString) {
-                        String n = name.getStringValue();
-                        if (n.equals(".") || n.equals(".."))
-                            useNamestring = false;
-                        else if (n.indexOf(File.separatorChar) >= 0)
-                            useNamestring = false;
-                    }
-                }
-            } else
-                useNamestring = false;
-            FastStringBuffer sb = new FastStringBuffer();
-            if (useNamestring) {
-                if (printReadably || printEscape)
-                    sb.append("#P\"");
-                final int limit = s.length();
-                for (int i = 0; i < limit; i++) {
-                    char c = s.charAt(i);
-                    if (printReadably || printEscape) {
-                        if (c == '\"' || c == '\\')
-                            sb.append('\\');
-                    }
-                    sb.append(c);
-                }
-                if (printReadably || printEscape)
-                    sb.append('"');
-            } else {
-                sb.append("#P(");
-                if (host != NIL) {
-                    sb.append(":HOST ");
-                    sb.append(host.writeToString());
-                    sb.append(' ');
-                }
-                if (device != NIL) {
-                    sb.append(":DEVICE ");
-                    sb.append(device.writeToString());
-                    sb.append(' ');
-                }
-                if (directory != NIL) {
-                    sb.append(":DIRECTORY ");
-                    sb.append(directory.writeToString());
-                    sb.append(" ");
-                }
-                if (name != NIL) {
-                    sb.append(":NAME ");
-                    sb.append(name.writeToString());
-                    sb.append(' ');
-                }
-                if (type != NIL) {
-                    sb.append(":TYPE ");
-                    sb.append(type.writeToString());
-                    sb.append(' ');
                 }
-                if (version != NIL) {
-                    sb.append(":VERSION ");
-                    sb.append(version.writeToString());
-                    sb.append(' ');
+            }
+        } else
+           useNamestring = false;
+        FastStringBuffer sb = new FastStringBuffer();
+        if (useNamestring) {
+            if (printReadably || printEscape)
+                sb.append("#P\"");
+            final int limit = s.length();
+            for (int i = 0; i < limit; i++) {
+                char c = s.charAt(i);
+                if (printReadably || printEscape) {
+                    if (c == '\"' || c == '\\')
+                        sb.append('\\');
                 }
-                if (sb.charAt(sb.length() - 1) == ' ')
-                    sb.setLength(sb.length() - 1);
-                sb.append(')');
-            }
-            return sb.toString();
-        }
-        catch (ConditionThrowable t) {
-            // ### FIXME exception
-            return unreadableString("PATHNAME");
-        }
+                sb.append(c);
+            }
+            if (printReadably || printEscape)
+                sb.append('"');
+        } else {
+            sb.append("#P(");
+            if (host != NIL) {
+                sb.append(":HOST ");
+                sb.append(host.writeToString());
+                sb.append(' ');
+           }
+           if (device != NIL) {
+               sb.append(":DEVICE ");
+               sb.append(device.writeToString());
+               sb.append(' ');
+            }
+            if (directory != NIL) {
+                sb.append(":DIRECTORY ");
+                sb.append(directory.writeToString());
+                sb.append(" ");
+            }
+           if (name != NIL) {
+                sb.append(":NAME ");
+                sb.append(name.writeToString());
+                sb.append(' ');
+            }
+            if (type != NIL) {
+                sb.append(":TYPE ");
+                sb.append(type.writeToString());
+                sb.append(' ');
+            }
+            if (version != NIL) {
+                sb.append(":VERSION ");
+                sb.append(version.writeToString());
+                sb.append(' ');
+            }
+            if (sb.charAt(sb.length() - 1) == ' ')
+                sb.setLength(sb.length() - 1);
+            sb.append(')');
+         }
+         return sb.toString();
     }
 
     // A logical host is represented as the string that names it.

Modified: trunk/abcl/src/org/armedbear/lisp/Profiler.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Profiler.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Profiler.java	Fri Nov  6 17:36:32 2009
@@ -97,9 +97,6 @@
                                 catch (InterruptedException e) {
                                     Debug.trace(e);
                                 }
-                                catch (ConditionThrowable e) {
-                                    break;
-                                }
                             }
                         }
                     };

Modified: trunk/abcl/src/org/armedbear/lisp/Return.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Return.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Return.java	Fri Nov  6 17:36:32 2009
@@ -33,7 +33,7 @@
 
 package org.armedbear.lisp;
 
-public final class Return extends ConditionThrowable
+public final class Return extends ControlTransfer
 {
     public final LispObject tag;
     public final LispObject block;

Modified: trunk/abcl/src/org/armedbear/lisp/SpecialOperator.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/SpecialOperator.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/SpecialOperator.java	Fri Nov  6 17:36:32 2009
@@ -54,20 +54,14 @@
     public SpecialOperator(String name, Package pkg, boolean exported,
                            String arglist)
     {
-        try {
-            Symbol symbol;
-            if (exported)
-                symbol = pkg.internAndExport(name.toUpperCase());
-            else
-                symbol = pkg.intern(name.toUpperCase());
-            symbol.setSymbolFunction(this);
-            setLambdaName(symbol);
-            setLambdaList(new SimpleString(arglist));
-        }
-        catch (ConditionThrowable t) {
-            // ### FIXME exception
-            Debug.assertTrue(false);
-        }
+        Symbol symbol;
+        if (exported)
+           symbol = pkg.internAndExport(name.toUpperCase());
+        else
+           symbol = pkg.intern(name.toUpperCase());
+        symbol.setSymbolFunction(this);
+        setLambdaName(symbol);
+        setLambdaList(new SimpleString(arglist));
     }
 
     @Override

Modified: trunk/abcl/src/org/armedbear/lisp/StandardGenericFunction.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/StandardGenericFunction.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/StandardGenericFunction.java	Fri Nov  6 17:36:32 2009
@@ -55,42 +55,34 @@
                                  LispObject specializers)
   {
     this();
-    try
-      {
-        Symbol symbol;
-        if (exported)
-          symbol = pkg.internAndExport(name.toUpperCase());
-        else
-          symbol = pkg.intern(name.toUpperCase());
-        symbol.setSymbolFunction(this);
-        this.function = function;
-        slots[StandardGenericFunctionClass.SLOT_INDEX_NAME] = symbol;
-        slots[StandardGenericFunctionClass.SLOT_INDEX_LAMBDA_LIST] =
-          lambdaList;
-        slots[StandardGenericFunctionClass.SLOT_INDEX_REQUIRED_ARGS] =
-          lambdaList;
-        numberOfRequiredArgs = lambdaList.length();
-        slots[StandardGenericFunctionClass.SLOT_INDEX_INITIAL_METHODS] =
-          NIL;
-        StandardMethod method =
-          new StandardMethod(this, function, lambdaList, specializers);
-        slots[StandardGenericFunctionClass.SLOT_INDEX_METHODS] =
-          list(method);
-        slots[StandardGenericFunctionClass.SLOT_INDEX_METHOD_CLASS] =
-          StandardClass.STANDARD_METHOD;
-        slots[StandardGenericFunctionClass.SLOT_INDEX_METHOD_COMBINATION] =
-          Symbol.STANDARD;
-        slots[StandardGenericFunctionClass.SLOT_INDEX_ARGUMENT_PRECEDENCE_ORDER] =
-          NIL;
-        slots[StandardGenericFunctionClass.SLOT_INDEX_CLASSES_TO_EMF_TABLE] =
-          NIL;
-        slots[StandardGenericFunctionClass.SLOT_INDEX_DOCUMENTATION] = NIL;
-      }
-    catch (ConditionThrowable t)
-      {
-        // ### FIXME exception
-        Debug.assertTrue(false);
-      }
+    Symbol symbol;
+    if (exported)
+      symbol = pkg.internAndExport(name.toUpperCase());
+    else
+      symbol = pkg.intern(name.toUpperCase());
+    symbol.setSymbolFunction(this);
+    this.function = function;
+    slots[StandardGenericFunctionClass.SLOT_INDEX_NAME] = symbol;
+    slots[StandardGenericFunctionClass.SLOT_INDEX_LAMBDA_LIST] =
+      lambdaList;
+    slots[StandardGenericFunctionClass.SLOT_INDEX_REQUIRED_ARGS] =
+      lambdaList;
+    numberOfRequiredArgs = lambdaList.length();
+    slots[StandardGenericFunctionClass.SLOT_INDEX_INITIAL_METHODS] =
+      NIL;
+    StandardMethod method =
+      new StandardMethod(this, function, lambdaList, specializers);
+    slots[StandardGenericFunctionClass.SLOT_INDEX_METHODS] =
+      list(method);
+    slots[StandardGenericFunctionClass.SLOT_INDEX_METHOD_CLASS] =
+      StandardClass.STANDARD_METHOD;
+    slots[StandardGenericFunctionClass.SLOT_INDEX_METHOD_COMBINATION] =
+      Symbol.STANDARD;
+    slots[StandardGenericFunctionClass.SLOT_INDEX_ARGUMENT_PRECEDENCE_ORDER] =
+      NIL;
+    slots[StandardGenericFunctionClass.SLOT_INDEX_CLASSES_TO_EMF_TABLE] =
+      NIL;
+    slots[StandardGenericFunctionClass.SLOT_INDEX_DOCUMENTATION] = NIL;
   }
 
   private void finalizeInternal()

Modified: trunk/abcl/src/org/armedbear/lisp/Stream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Stream.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Stream.java	Fri Nov  6 17:36:32 2009
@@ -281,53 +281,48 @@
       return;
     }
       
-    try {
-      LispObject enc;
-      boolean encIsCp = false;
-      
-      if (format instanceof Cons) {
-          // meaning a non-empty list
-          enc = format.car();
-
-          if (enc == keywordCodePage) {
-              encIsCp = true;
+    LispObject enc;
+    boolean encIsCp = false;
+    
+    if (format instanceof Cons) {
+        // meaning a non-empty list
+        enc = format.car();
+        if (enc == keywordCodePage) {
+            encIsCp = true;
 
-              enc = LispObject.getf(format.cdr(), keywordID, null);
-          }
-          
-          LispObject eol = LispObject.getf(format.cdr(), keywordEolStyle, keywordRAW);
-          if (eol == keywordCR)
-              eolStyle = EolStyle.CR;
-          else if (eol == keywordLF)
-              eolStyle = EolStyle.LF;
-          else if (eol == keywordCRLF)
-              eolStyle = EolStyle.CRLF;
-          else if (eol != keywordRAW)
-              ; //###FIXME: raise an error
+            enc = LispObject.getf(format.cdr(), keywordID, null);
+        }
           
-      } else
-        enc = format;
-      
-      if (enc.numberp())
-          encoding = enc.toString();
-      else if (enc instanceof AbstractString)
-          encoding = enc.getStringValue();
-      else if (enc == keywordDefault)
-          // This allows the user to use the encoding determined by
-          // Java to be the default for the current environment
-          // while still being able to set other stream options
-          // (e.g. :EOL-STYLE)
-          encoding = null;
-      else if (enc instanceof Symbol)
-          encoding = ((Symbol)enc).getName();
-      else
-          ; //###FIXME: raise an error!
-      
-      if (encIsCp)
-          encoding = "Cp" + encoding;
-    }
-    // ### FIXME exception
-    catch (ConditionThrowable ct) { }
+        LispObject eol = LispObject.getf(format.cdr(), keywordEolStyle, keywordRAW);
+        if (eol == keywordCR)
+            eolStyle = EolStyle.CR;
+        else if (eol == keywordLF)
+            eolStyle = EolStyle.LF;
+        else if (eol == keywordCRLF)
+            eolStyle = EolStyle.CRLF;
+        else if (eol != keywordRAW)
+            ; //###FIXME: raise an error
+        
+    } else
+      enc = format;
+    
+    if (enc.numberp())
+        encoding = enc.toString();
+    else if (enc instanceof AbstractString)
+        encoding = enc.getStringValue();
+    else if (enc == keywordDefault)
+        // This allows the user to use the encoding determined by
+        // Java to be the default for the current environment
+        // while still being able to set other stream options
+        // (e.g. :EOL-STYLE)
+        encoding = null;
+    else if (enc instanceof Symbol)
+        encoding = ((Symbol)enc).getName();
+    else
+        ; //###FIXME: raise an error!
+    
+    if (encIsCp)
+        encoding = "Cp" + encoding;
     
     eolChar = (eolStyle == EolStyle.CR) ? '\r' : '\n';
     externalFormat = format;

Modified: trunk/abcl/src/org/armedbear/lisp/StringFunctions.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/StringFunctions.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/StringFunctions.java	Fri Nov  6 17:36:32 2009
@@ -601,8 +601,7 @@
     {
         @Override
         public LispObject execute(LispObject first, LispObject second,
-                                  LispObject third) throws
-        ConditionThrowable
+                                  LispObject third)
         {
             LispObject s = first.STRING();
             final int length = s.length();

Modified: trunk/abcl/src/org/armedbear/lisp/Symbol.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Symbol.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Symbol.java	Fri Nov  6 17:36:32 2009
@@ -42,18 +42,9 @@
 
   public static final Symbol addFunction(String name, LispObject obj)
   {
-    try
-      {
-        Symbol symbol = PACKAGE_CL.internAndExport(name);
-        symbol.function = obj;
-        return symbol;
-      }
-    catch (ConditionThrowable t)
-      {
-        // ### FIXME exception
-        Debug.trace(t); // Shouldn't happen.
-        return null;
-      }
+    Symbol symbol = PACKAGE_CL.internAndExport(name);
+    symbol.function = obj;
+    return symbol;
   }
 
   public final SimpleString name;

Modified: trunk/abcl/src/org/armedbear/lisp/ThreadDestroyed.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/ThreadDestroyed.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/ThreadDestroyed.java	Fri Nov  6 17:36:32 2009
@@ -33,7 +33,7 @@
 
 package org.armedbear.lisp;
 
-public class ThreadDestroyed extends ConditionThrowable
+public class ThreadDestroyed extends ControlTransfer
 {
     public ThreadDestroyed()
     {

Modified: trunk/abcl/src/org/armedbear/lisp/Throw.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Throw.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Throw.java	Fri Nov  6 17:36:32 2009
@@ -33,7 +33,7 @@
 
 package org.armedbear.lisp;
 
-public final class Throw extends ConditionThrowable
+public final class Throw extends ControlTransfer
 {
     public final LispObject tag;
     private final LispObject result;

Modified: trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngine.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngine.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngine.java	Fri Nov  6 17:36:32 2009
@@ -75,7 +75,7 @@
 	    compileScript = (Function) this.findSymbol("COMPILE-SCRIPT", "ABCL-SCRIPT").getSymbolFunction();
 	    evalCompiledScript = (Function) this.findSymbol("EVAL-COMPILED-SCRIPT", "ABCL-SCRIPT").getSymbolFunction();
 	    evalFunction = (Function) this.findSymbol("EVAL-FUNCTION", "ABCL-SCRIPT").getSymbolFunction();
-	} catch (ConditionThrowable e) {
+	} catch (ControlTransfer e) {
 	    throw new RuntimeException(e);
 	}
     }
@@ -110,13 +110,13 @@
 	return b.toString();
     }
 
-	public LispObject loadFromClasspath(String classpathResource) throws ConditionThrowable {
+	public LispObject loadFromClasspath(String classpathResource) throws ControlTransfer {
 		InputStream istream = getClass().getResourceAsStream(classpathResource);
 		Stream stream = new Stream(istream, Symbol.CHARACTER);
 		return load(stream);
 	}
 
-	public LispObject load(Stream stream) throws ConditionThrowable {
+	public LispObject load(Stream stream) throws ControlTransfer {
 		Symbol keyword_verbose = Lisp.internKeyword("VERBOSE");
 		Symbol keyword_print = Lisp.internKeyword("PRINT");
 		/*
@@ -129,11 +129,11 @@
 						Lisp.T, Keyword.EXTERNAL_FORMAT, Keyword.DEFAULT });
 	}
 
-	public LispObject load(String filespec) throws ConditionThrowable {
+	public LispObject load(String filespec) throws ControlTransfer {
 		return load(filespec, true);
 	}
 
-	public LispObject load(String filespec, boolean compileIfNecessary)	throws ConditionThrowable {
+	public LispObject load(String filespec, boolean compileIfNecessary)	throws ControlTransfer {
 		if (isCompiled(filespec) || !compileIfNecessary) {
 			return interpreter.eval("(load \"" + escape(filespec) + "\")");
 		} else {
@@ -162,11 +162,11 @@
 				&& compiled.lastModified() >= source.lastModified();
 	}
 
-	public LispObject compileFile(String filespec) throws ConditionThrowable {
+	public LispObject compileFile(String filespec) throws ControlTransfer {
 		return interpreter.eval("(compile-file \"" + escape(filespec) + "\")");
 	}
 
-	public LispObject compileAndLoad(String filespec) throws ConditionThrowable {
+	public LispObject compileAndLoad(String filespec) throws ControlTransfer {
 		return interpreter.eval("(load (compile-file \"" + escape(filespec)	+ "\"))");
 	}
 
@@ -174,7 +174,7 @@
 		return obj instanceof Function;
 	}
 
-	public JavaObject jsetq(String symbol, Object value) throws ConditionThrowable {
+	public JavaObject jsetq(String symbol, Object value) throws ControlTransfer {
 		Symbol s = findSymbol(symbol);
 		JavaObject jo;
 		if (value instanceof JavaObject) {
@@ -186,7 +186,7 @@
 		return jo;
 	}
 
-	public Symbol findSymbol(String name, String pkg) throws ConditionThrowable {
+	public Symbol findSymbol(String name, String pkg) throws ControlTransfer {
 		Cons values = (Cons) (interpreter.eval("(cl:multiple-value-list (find-symbol (symbol-name '#:"
 											   + escape(name) + ")" + (pkg == null ? "" : " :" + escape(pkg))
 											   + "))"));
@@ -197,7 +197,7 @@
 		}
 	}
 
-	public Symbol findSymbol(String name) throws ConditionThrowable {
+	public Symbol findSymbol(String name) throws ControlTransfer {
 		//Known bug: doesn't handle escaped ':' e.g. |a:b|
 		int i = name.indexOf(':');
 		if(i < 0) { 
@@ -211,7 +211,7 @@
 		}
 	}
 	
-	public Function findFunction(String name) throws ConditionThrowable {
+	public Function findFunction(String name) throws ControlTransfer {
 		return (Function) interpreter.eval("#'" + name);
 	}
 
@@ -220,7 +220,7 @@
 		return new SimpleBindings();
 	}
 
-	private static LispObject makeBindings(Bindings bindings) throws ConditionThrowable {
+	private static LispObject makeBindings(Bindings bindings) throws ControlTransfer {
 		if (bindings == null || bindings.size() == 0) {
 			return Lisp.NIL;
 		}
@@ -247,7 +247,7 @@
 				       inStream, outStream,
 				       code, new JavaObject(ctx));
 	    return retVal.javaInstance();
-	} catch (ConditionThrowable e) {
+	} catch (ControlTransfer e) {
 	    throw new ScriptException(new Exception(e));
 	} catch (IOException e) {
 	    throw new ScriptException(e);
@@ -300,7 +300,7 @@
 			Symbol s = findSymbol("jmake-proxy", "JAVA");
 			JavaObject iface = new JavaObject(clasz);
 			return (T) ((JavaObject) s.execute(iface, (LispObject) thiz)).javaInstance();
-		} catch (ConditionThrowable e) {
+		} catch (ControlTransfer e) {
 			throw new Error(e);
 		}
 	}	
@@ -329,7 +329,7 @@
 	    } else {
 		throw new NoSuchMethodException(name);
 	    }
-	} catch (ConditionThrowable e) {
+	} catch (ControlTransfer e) {
 	    throw new ScriptException(new RuntimeException(e));
 	}
     }
@@ -365,7 +365,7 @@
 		try {
 		    Function f = (Function) compileScript.execute(new SimpleString(script));
 		    return new AbclCompiledScript(f);
-		} catch (ConditionThrowable e) {
+		} catch (ControlTransfer e) {
 			throw new ScriptException(new Exception(e));
 		} catch(ClassCastException e) {
 			throw new ScriptException(e);




More information about the armedbear-cvs mailing list