diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/daase.lisp | 3 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 17 | ||||
-rw-r--r-- | src/interp/sys-driver.boot | 7 | ||||
-rw-r--r-- | src/interp/sys-utility.boot | 4 |
4 files changed, 25 insertions, 6 deletions
diff --git a/src/interp/daase.lisp b/src/interp/daase.lisp index ea9bebd3..00525246 100644 --- a/src/interp/daase.lisp +++ b/src/interp/daase.lisp @@ -924,7 +924,8 @@ (dolist (file libs) (|addInputLibrary| (truename file))) (dolist (file (nreverse nrlibs)) (setq key (pathname-name (first (last (pathname-directory file))))) - (setq object (concatenate 'string (directory-namestring file) "code")) + (setq object (concatenate 'string (directory-namestring file) + "code." |$faslType|)) (localnrlib key file object make-database? noexpose)) (dolist (file (nreverse asys)) (setq object diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index f111df8f..cd3b728d 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -127,6 +127,18 @@ isNestedInstantiation(form,deps) == false --% Loading + +++ Return a path to the loadable module that contains the +++ definition of the constructor indicated by `cname'. +++ Error if the file container of the module does not exist. +findModule cname == + m := GETDATABASE(cname,'OBJECT) or return nil + existingFile? m => m + strap := algebraBootstrapDir() => + m := CONCAT(strap,PATHNAME_-NAME m,'".",$faslType) + existingFile? m => m + systemError ['"missing module for ",:bright cname] + systemError ['"missing module for ",:bright cname] loadLibIfNotLoaded libName == -- replaces old SpadCondLoad @@ -137,7 +149,7 @@ loadLibIfNotLoaded libName == loadLib cname == startTimingProcess 'load - fullLibName := GETDATABASE(cname,'OBJECT) or return nil + fullLibName := findModule cname or return nil systemdir? := isSystemDirectory(pathnameDirectory fullLibName) update? := $forceDatabaseUpdate or not systemdir? not update? => @@ -691,6 +703,3 @@ isFunctor x == else updateCategoryFrameForConstructor op get(op,'isFunctor,$CategoryFrame) nil - - - diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot index 9b35d618..35681028 100644 --- a/src/interp/sys-driver.boot +++ b/src/interp/sys-driver.boot @@ -78,7 +78,6 @@ systemRootDirectory() == ensureTrailingSlash cdr dir $systemInstallationDirectory - +++ Returns the system algebra directory, as specified on command +++ line. nil, otherwise. systemAlgebraDirectory() == @@ -86,6 +85,12 @@ systemAlgebraDirectory() == ensureTrailingSlash cdr dir nil ++++ Returns a path to the directory containing algebra bootstsrap files. +algebraBootstrapDir() == + dir := ASSOC(Option '"strap",%systemOptions()) => + ensureTrailingSlash rest dir + nil + ++ stdStreamIsTerminal: ++ returns 1 if the standard stream is attached to a terminal; ++ otherwise 0. diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot index faf4708d..2e8502dd 100644 --- a/src/interp/sys-utility.boot +++ b/src/interp/sys-utility.boot @@ -132,3 +132,7 @@ makeAbsoluteFilename: %String -> %String makeAbsoluteFilename name == CONCATENATE("STRING",systemRootDirectory(),name) +++ returns true if `file' exists as a pathname. +existingFile? file == + PROBE_-FILE file + |