Ticket #35: ikvm-existing.patch
File ikvm-existing.patch, 5.2 KB (added by , 16 years ago) |
---|
-
src/org/armedbear/lisp/Complex.java
304 304 305 305 private static Method hypotMethod = null; 306 306 static { try { 307 if (!IkvmSite.isIKVM()) 307 308 hypotMethod = 308 309 Class.forName("java.lang.Math") 309 310 .getMethod("hypot", new Class[] { Double.TYPE, Double.TYPE }); -
src/org/armedbear/lisp/Nil.java
35 35 36 36 public final class Nil extends Symbol 37 37 { 38 static final Nil NIL = new Nil(PACKAGE_CL); 38 39 public Nil(Package pkg) 39 40 { 40 41 super("NIL", pkg); -
src/org/armedbear/lisp/Lisp.java
80 80 // ### nil 81 81 // Constructing NIL forces the Symbol class to be loaded (since Nil extends 82 82 // Symbol). 83 public static final LispObject NIL = new Nil(PACKAGE_CL);83 public static final LispObject NIL = Nil.NIL; 84 84 85 85 // We need NIL before we can call usePackage(). 86 86 static … … 1023 1023 zipFileName = zipFileName.substring(1); 1024 1024 } 1025 1025 zipFileName = URLDecoder.decode(zipFileName, "UTF-8"); 1026 ZipFile zipFile = new ZipFile( zipFileName);1026 ZipFile zipFile = new ZipFile(IkvmSite.ikvmFile(zipFileName)); 1027 1027 try 1028 1028 { 1029 1029 ZipEntry entry = zipFile.getEntry(entryName); … … 1059 1059 return error(new LispError("Unable to load " + namestring)); 1060 1060 } 1061 1061 Pathname pathname = new Pathname(namestring); 1062 final File file = Utilities.getFile(pathname, defaultPathname); 1062 File file = Utilities.getFile(pathname, defaultPathname); 1063 if (file != null && !file.isFile()) { 1064 // maybe IKVM? 1065 file = IkvmSite.ikvmFileSafe(file); 1066 } 1063 1067 if (file != null && file.isFile()) 1064 1068 { 1065 1069 // The .cls file exists. … … 1087 1091 { 1088 1092 LispObject loadTruename = Symbol.LOAD_TRUENAME.symbolValue(thread); 1089 1093 String zipFileName = ((Pathname)loadTruename).getNamestring(); 1090 ZipFile zipFile = new ZipFile( zipFileName);1094 ZipFile zipFile = new ZipFile(IkvmSite.ikvmFile(zipFileName)); 1091 1095 try 1092 1096 { 1093 1097 ZipEntry entry = zipFile.getEntry(namestring); -
src/org/armedbear/lisp/Load.java
64 64 String extension = getExtension(filename); 65 65 if (extension == null) { 66 66 // No extension specified. Try appending ".lisp" or ".abcl". 67 File lispFile = new File(dir, filename.concat(".lisp"));68 File abclFile = new File(dir, filename.concat(".abcl"));67 File lispFile = IkvmSite.ikvmFileSafe(new File(dir, filename.concat(".lisp"))); 68 File abclFile = IkvmSite.ikvmFileSafe(new File(dir, filename.concat(".abcl"))); 69 69 if (lispFile.isFile() && abclFile.isFile()) { 70 70 if (abclFile.lastModified() > lispFile.lastModified()) { 71 71 return abclFile; … … 246 246 final String dir = Site.getLispHome(); 247 247 try { 248 248 if (dir != null) { 249 File file = new File(dir, s);249 File file = IkvmSite.ikvmFileSafe(new File(dir, s)); 250 250 if (file.isFile()) { 251 251 // File exists. For system files, we know the extension 252 252 // will be .abcl if it is a compiled file. … … 336 336 } 337 337 return error(new LispError("File not found: " + filename)); 338 338 } 339 339 340 340 // ### *fasl-version* 341 341 // internal symbol 342 342 private static final Symbol _FASL_VERSION_ = -
src/org/armedbear/lisp/Pathname.java
88 88 init(s.substring(5)); 89 89 return; 90 90 } 91 } else if ("ikvmres".equals(protocol)) { 92 String s = url.getPath(); 93 if (s != null && s.startsWith("file:")) { 94 init(s.substring(5)); 95 return; 96 } //Else 97 init(s); 98 return; 91 99 } 92 100 error(new LispError("Unsupported URL: \"" + url.toString() + '"')); 93 101 } … … 1330 1338 if (originalNamestring != null && newNamestring != null) { 1331 1339 final File source = new File(originalNamestring); 1332 1340 final File destination = new File(newNamestring); 1333 if (Utilities.isPlatformWindows ) {1341 if (Utilities.isPlatformWindows || IkvmSite.isIKVM()) { 1334 1342 if (destination.isFile()) 1335 1343 destination.delete(); 1336 1344 }