diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 10 | ||||
-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 | ||||
-rw-r--r-- | src/lisp/core.lisp.in | 1 |
6 files changed, 36 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f0d0fc46..f6e3e453 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2008-03-10 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * lisp/core.lisp.in ("$faslType"): Export. + * interp/sys-driver.boot (algebraBootstrapDir): New. + * interp/lisplib.boot (findModule): New. + (loadLib): Use it. + * interp/daase.lisp (localdatabase): Make sure loadable modules + have proper extensions. + * interp/sys-utility.boot (existingFile?): New. + 2008-03-09 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/parse.boot (parseDollarGreaterThan): Remove. 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 + diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index ab21a70c..23b119ac 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -70,6 +70,7 @@ "$buildPlatform" "$targetPlatform" + "$faslType" "$systemInstallationDirectory" "getCommandLineArguments" |