[armedbear-cvs] r12426 - trunk/abcl/src/org/armedbear/lisp

Mark Evenson mevenson at common-lisp.net
Sun Feb 7 09:21:29 UTC 2010


Author: mevenson
Date: Sun Feb  7 04:21:26 2010
New Revision: 12426

Log:
ABCL packed FASLS no longer have to end in ".abcl".

The requirement that packed FASLS had to end in ".abcl" was introduced
in the recent Pathname code as a optimization to avoid opening/closing
an input stream on the assumption that renaming FASLs would not be
expected to work.  But COMPILE-FILE has an :OUTPUT-FILE arg that
certainly can be used, so we relax this restriction.

Found by dmiles in the ANSI test suite.




Modified:
   trunk/abcl/src/org/armedbear/lisp/Load.java

Modified: trunk/abcl/src/org/armedbear/lisp/Load.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Load.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Load.java	Sun Feb  7 04:21:26 2010
@@ -151,34 +151,32 @@
             }
         }
 
-        if (truename.type.getStringValue().equals(COMPILE_FILE_TYPE)
-            && Utilities.checkZipFile(truename)) 
-            {
-                String n = truename.getNamestring();
-                if (n.startsWith("jar:")) {
-                    n = "jar:" + n + "!/" + truename.name.getStringValue() + "."
-                      + COMPILE_FILE_INIT_FASL_TYPE;
+        if (Utilities.checkZipFile(truename)) {
+            String n = truename.getNamestring();
+            if (n.startsWith("jar:")) {
+                n = "jar:" + n + "!/" + truename.name.getStringValue() + "."
+                    + COMPILE_FILE_INIT_FASL_TYPE;
+            } else {
+                n = "jar:file:" + n + "!/" + truename.name.getStringValue() + "."
+                    + COMPILE_FILE_INIT_FASL_TYPE;
+            }
+            mergedPathname = new Pathname(n);
+            LispObject initTruename = Pathname.truename(mergedPathname);
+            if (initTruename == null || initTruename.equals(NIL)) {
+                String errorMessage
+                    = "Loadable FASL not found for"
+                    + "'" + pathname + "'"
+                    + " in "
+                    + "'" + mergedPathname + "'";
+                if (ifDoesNotExist) {
+                    return error(new FileError(errorMessage, mergedPathname));
                 } else {
-                    n = "jar:file:" + n + "!/" + truename.name.getStringValue() + "."
-                      + COMPILE_FILE_INIT_FASL_TYPE;
+                    Debug.trace(errorMessage);
+                    return NIL;
                 }
-                mergedPathname = new Pathname(n);
-                LispObject initTruename = Pathname.truename(mergedPathname);
-                if (initTruename == null || initTruename.equals(NIL)) {
-                    String errorMessage
-                        = "Loadable FASL not found for"
-                          + "'" + pathname + "'"
-                          + " in "
-                          + "'" + mergedPathname + "'";
-                    if (ifDoesNotExist) {
-                        return error(new FileError(errorMessage, mergedPathname));
-                    } else {
-                        Debug.trace(errorMessage);
-                        return NIL;
-                    }
-                }
-                truename = (Pathname)initTruename;
             }
+            truename = (Pathname)initTruename;
+        }
         
         InputStream in = truename.getInputStream();
         Debug.assertTrue(in != null);




More information about the armedbear-cvs mailing list