Changeset 14002
- Timestamp:
- 07/12/12 09:25:37 (9 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/FaslClassLoader.java
r13605 r14002 112 112 113 113 public byte[] getFunctionClassBytes(String name) { 114 Pathname pathname = new Pathname(name.substring("org/armedbear/lisp/".length()) + ". cls");114 Pathname pathname = new Pathname(name.substring("org/armedbear/lisp/".length()) + "." + Lisp._COMPILE_FILE_CLASS_EXTENSION_.symbolValue().getStringValue()); 115 115 return readFunctionBytes(pathname); 116 116 } -
trunk/abcl/src/org/armedbear/lisp/Lisp.java
r13967 r14002 2483 2483 2484 2484 // ### *compile-file-type* 2485 public static final String COMPILE_FILE_TYPE = "abcl";2486 2485 public static final Symbol _COMPILE_FILE_TYPE_ = 2487 internConstant("*COMPILE-FILE-TYPE*", PACKAGE_SYS, 2488 new SimpleString(COMPILE_FILE_TYPE)); 2486 exportSpecial("*COMPILE-FILE-TYPE*", PACKAGE_SYS, new SimpleString("abcl")); 2487 2488 // ### *compile-file-class-extension* 2489 public static final Symbol _COMPILE_FILE_CLASS_EXTENSION_ = 2490 exportSpecial("*COMPILE-FILE-CLASS-EXTENSION*", PACKAGE_SYS, new SimpleString("cls")); 2489 2491 2490 2492 // ### *compile-file-zip* -
trunk/abcl/src/org/armedbear/lisp/Load.java
r13851 r14002 74 74 } 75 75 } 76 final String COMPILE_FILE_TYPE = Lisp._COMPILE_FILE_TYPE_.symbolValue().getStringValue(); 76 77 if (name.type == NIL 77 78 && (name.name != NIL || name.name != null)) { … … 81 82 LispObject lisp = Pathname.truename(lispPathname, false); 82 83 Pathname abclPathname = new Pathname(name); 83 abclPathname.type = new SimpleString( "abcl");84 abclPathname.type = new SimpleString(COMPILE_FILE_TYPE); 84 85 abclPathname.invalidateNamestring(); 85 86 LispObject abcl = Pathname.truename(abclPathname, false); … … 263 264 URL url = null; 264 265 truename = findLoadableFile(mergedPathname); 266 final String COMPILE_FILE_TYPE = Lisp._COMPILE_FILE_TYPE_.symbolValue().getStringValue(); 265 267 if (truename == null || truename.equals(NIL) || bootPath.equals(NIL)) { 266 268 // Make an attempt to use the boot classpath 267 269 String path = pathname.asEntryPath(); 268 url = Lisp.class.getResource(path); 270 url = Lisp.class.getResource(path); 269 271 if (url == null || url.toString().endsWith("/")) { 270 url = Lisp.class.getResource(path.replace('-', '_') + ". abcl");272 url = Lisp.class.getResource(path.replace('-', '_') + "." + COMPILE_FILE_TYPE); 271 273 if (url == null) { 272 274 url = Lisp.class.getResource(path + ".lisp"); … … 477 479 truePathname = new Pathname(((Pathname)truename).getNamestring()); 478 480 String type = truePathname.type.getStringValue(); 479 if (type.equals( COMPILE_FILE_TYPE)481 if (type.equals(Lisp._COMPILE_FILE_TYPE_.symbolValue(thread).getStringValue()) 480 482 || type.equals(COMPILE_FILE_INIT_FASL_TYPE.toString())) { 481 483 Pathname truenameFasl = new Pathname(truePathname); -
trunk/abcl/src/org/armedbear/lisp/compile-file.lisp
r13948 r14002 54 54 (sanitize-class-name 55 55 (%format nil "~A_~D" (pathname-name output-file-pathname) n)))) 56 (namestring (merge-pathnames (make-pathname :name name :type "cls")56 (namestring (merge-pathnames (make-pathname :name name :type *compile-file-class-extension*) 57 57 output-file-pathname)))) 58 58 … … 617 617 (fasl-loader (namestring (merge-pathnames 618 618 (make-pathname :name (fasl-loader-classname) 619 :type "cls")619 :type *compile-file-class-extension*) 620 620 output-file)))) 621 621 (when (probe-file fasl-loader) -
trunk/abcl/src/org/armedbear/lisp/compile-system.lisp
r13710 r14002 87 87 (setf output-path *default-pathname-defaults*)) 88 88 (flet ((do-compile (file) 89 (let ((out (make-pathname :type "abcl"89 (let ((out (make-pathname :type *compile-file-type* 90 90 :defaults (merge-pathnames 91 91 file output-path)))) … … 274 274 t)) 275 275 276 (defun compile-system (&key quit (zip t) output-path) 277 (let ((status -1)) 276 (defun compile-system (&key quit (zip t) (cls-ext *compile-file-class-extension*) (abcl-ext *compile-file-type*) output-path) 277 (let ((status -1) 278 (*compile-file-class-extension* cls-ext) 279 (*compile-file-type* abcl-ext)) 278 280 (check-lisp-home) 279 281 (time -
trunk/abcl/src/org/armedbear/lisp/scripting/AbclScriptEngine.java
r13101 r14002 137 137 138 138 public static boolean isCompiled(String filespec) { 139 if (filespec.endsWith(".abcl")) { 139 final String compiledExt = "." + Lisp._COMPILE_FILE_TYPE_.symbolValue().getStringValue(); 140 if (filespec.endsWith(compiledExt)) { 140 141 return true; 141 142 } … … 145 146 source = new File(filespec); 146 147 compiled = new File(filespec.substring(0, filespec.length() - 5) 147 + ".abcl");148 + compiledExt); 148 149 } else { 149 150 source = new File(filespec + ".lisp"); 150 compiled = new File(filespec + ".abcl");151 compiled = new File(filespec + compiledExt); 151 152 } 152 153 if (!source.exists()) {
Note: See TracChangeset
for help on using the changeset viewer.