Changeset 15455
- Timestamp:
- 10/29/20 16:54:53 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Load.java
r15408 r15455 259 259 260 260 private static final Symbol FASL_LOADER = PACKAGE_SYS.intern("*FASL-LOADER*"); 261 /** A file with this type in a packed FASL denotes the initial loader */ 261 262 static final LispObject COMPILE_FILE_INIT_FASL_TYPE = new SimpleString("_"); 262 263 … … 524 525 if (!truename.equals(NIL)) { 525 526 if (truename instanceof Pathname) { 526 truePathname = Pathname.create((Pathname)truename); 527 if (truename instanceof JarPathname) { 528 truePathname = new JarPathname(); 529 } else if (truename instanceof URLPathname) { 530 truePathname = new URLPathname(); 531 } else { 532 truePathname = new Pathname(); 533 } 534 truePathname.copyFrom((Pathname)truename); 527 535 } else if (truename instanceof AbstractString) { 528 536 truePathname = (Pathname)Pathname.create(truename.getStringValue()); … … 530 538 Debug.assertTrue(false); 531 539 } 532 String type = truePathname.getType().getStringValue(); 533 if (type.equals(Lisp._COMPILE_FILE_TYPE_.symbolValue(thread).getStringValue()) 534 || type.equals(COMPILE_FILE_INIT_FASL_TYPE.toString())) { 540 if (truePathname.getType().equal(Lisp._COMPILE_FILE_TYPE_.symbolValue(thread)) 541 || truePathname.getType().equal(COMPILE_FILE_INIT_FASL_TYPE)) { 535 542 Pathname truenameFasl = Pathname.create(truePathname); 536 543 thread.bindSpecial(Symbol.LOAD_TRUENAME_FASL, truenameFasl); 537 544 } 538 if (truePathname.getType().getStringValue() 539 .equals(COMPILE_FILE_INIT_FASL_TYPE.getStringValue()) 545 if (truePathname.getType().equal(COMPILE_FILE_INIT_FASL_TYPE) 540 546 && truePathname.isJar()) { 541 if (truePathname.getDevice().cdr() != NIL ) { 542 // We set *LOAD-TRUENAME* to the argument that 543 // a user would pass to LOAD. 544 Pathname enclosingJar = (Pathname)truePathname.getDevice().cdr().car(); 545 truePathname.setDevice(new Cons(truePathname.getDevice().car(), NIL)); 546 truePathname.setHost(NIL); 547 truePathname.setDirectory(enclosingJar.getDirectory()); 548 if (truePathname.getDirectory().car().equals(Keyword.RELATIVE)) { 549 truePathname.getDirectory().setCar(Keyword.ABSOLUTE); 550 } 551 truePathname.setName(enclosingJar.getName()); 552 truePathname.setType(enclosingJar.getType()); 547 // We set *LOAD-TRUENAME* to the argument that a 548 // user would pass to LOAD. 549 truePathname = (Pathname)probe_file.PROBE_FILE.execute(pathname); 550 /* 551 if (truePathname.getDevice().cdr() != NIL ) { 552 Pathname enclosingJar = (Pathname)truePathname.getDevice().cdr().car(); 553 truePathname.setDevice(new Cons(truePathname.getDevice().car(), NIL)); 554 truePathname.setHost(NIL); 555 truePathname.setDirectory(enclosingJar.getDirectory()); 556 if (truePathname.getDirectory().car().equals(Keyword.RELATIVE)) { 557 truePathname.getDirectory().setCar(Keyword.ABSOLUTE); 558 } 559 truePathname.setName(enclosingJar.getName()); 560 truePathname.setType(enclosingJar.getType()); 553 561 } else { 554 562 // XXX There is something fishy in the asymmetry … … 556 564 // cases but this currently passes the tests. 557 565 if (!(truePathname.device.car() instanceof AbstractString)) { 558 assert truePathname.getDevice().car() instanceof Pathname;559 Pathname p = Pathname.create((Pathname)truePathname.getDevice().car());566 // assert truePathname.getDevice().car() instanceof Pathname; 567 // Pathname p = Pathname.create((Pathname)truePathname.getDevice().car()); 560 568 truePathname 561 = (Pathname) probe_file.PROBE_FILE.execute(p );569 = (Pathname) probe_file.PROBE_FILE.execute(pathname); 562 570 } 563 571 } 564 thread.bindSpecial(Symbol.LOAD_TRUENAME, truePathname); 572 */ 573 thread.bindSpecial(Symbol.LOAD_TRUENAME, truePathname); 565 574 } else { 566 575 thread.bindSpecial(Symbol.LOAD_TRUENAME, truename);
Note: See TracChangeset
for help on using the changeset viewer.