aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog14
-rw-r--r--src/interp/br-util.boot3
-rw-r--r--src/interp/daase.lisp10
-rw-r--r--src/interp/database.boot7
-rw-r--r--src/interp/i-syscmd.boot2
-rw-r--r--src/interp/lisplib.boot32
-rw-r--r--src/interp/nrunfast.boot3
-rw-r--r--src/interp/showimp.boot2
8 files changed, 45 insertions, 28 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b6ef1435..441c39dd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,16 @@
-2011-09-05 Gabriel Dos Reis <gdr@cse.tamu.edu>
+2011-09-05 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ Stop using LOADED symbol property of constructors.
+ * interp/daase.lisp (DATABASE) [LOAD-PATH]: New field.
+ (dbLoadPath): New accessor.
+ (INITIAL-GETDATABASE): Tidy.
+ * interp/database.boot: Use dbLoadPath and dbLoaded?.
+ * interp/lisplib.boot: Likewise.
+ * interp/nrunfast.boot: Likewise.
+ * interp/showimp.boot: Likewise.
+ * interp/br-util.boot (isLoaded?): Remove as unused.
+
+2011-09-05 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/define.boot: Remove $LISPLIB.
* interp/functor.boot: Likewise.
diff --git a/src/interp/br-util.boot b/src/interp/br-util.boot
index 7e8f6830..c20e5d23 100644
--- a/src/interp/br-util.boot
+++ b/src/interp/br-util.boot
@@ -504,9 +504,6 @@ emptySearchPage(kind,filter,:options) ==
htSay '"}}"
htShowPage()
-isLoaded? conform ==
- property(getConstructorAbbreviationFromDB opOf conform,'LOADED)
-
string2Integer s ==
and/[digit? (s.i) for i in 0..maxIndex s] => readInteger s
nil
diff --git a/src/interp/daase.lisp b/src/interp/daase.lisp
index 96582c61..f017756e 100644
--- a/src/interp/daase.lisp
+++ b/src/interp/daase.lisp
@@ -227,6 +227,7 @@
superdomain ; interp.
instantiations ; nil if mutable constructor
being-defined ; T is definition of constructor is being processed
+ load-path ; full object path name, when loaded.
) ; database structure
@@ -290,6 +291,9 @@
(defmacro |dbBeingDefined?| (db)
`(database-being-defined ,db))
+(defmacro |dbLoadPath| (db)
+ `(database-load-path ,db))
+
(defun |makeDB| (c)
(let ((db (make-database)))
(setf (|dbConstructor| db) c)
@@ -593,8 +597,8 @@
(format t " preloading ~a.." c))
(if (probe-file c)
(progn
- (put con 'loaded c)
(|loadModule| c con)
+ (setf (|dbLoadPath| (|constructorDB| con)) c)
(when |$verbose|
(format t "loaded.~%")))
(when |$verbose|
@@ -1122,12 +1126,12 @@
(setf (|dbDualSignature| dbstruct)
(cons nil (mapcar #'|categoryForm?|
(cddar (|dbConstructorModemap| dbstruct)))))
- (remprop key 'loaded)
+ (setf (|dbLoadPath| (|constructorDB| key)) nil)
(if (null noexpose)
(|setExposeAddConstr| (cons key nil)))
(setf (symbol-function key) ; sets the autoload property for cname
#'(lambda (&rest args)
- (unless (get key 'loaded)
+ (unless (|dbLoaded?| (|constructorDB| key))
(|startTimingProcess| '|load|)
(|loadLibNoUpdate| key key object)) ; used to be cname key
(apply key args)))
diff --git a/src/interp/database.boot b/src/interp/database.boot
index c65f2c42..22af0aac 100644
--- a/src/interp/database.boot
+++ b/src/interp/database.boot
@@ -643,7 +643,7 @@ updateDatabase(fname,cname,systemdir?) ==
if oldFname := getConstructorAbbreviationFromDB cname then
clearClams()
clearAllSlams []
- if property(cname, 'LOADED) then
+ if dbLoaded? constructorDB cname then
clearConstructorCaches()
if $forceDatabaseUpdate or not systemdir? then
clearClams()
@@ -826,8 +826,11 @@ printAllInitdbInfo(srcdir,dbfile) ==
--%
+dbLoaded? db ==
+ dbLoadPath db ~= nil
+
loadDBIfnecessary db ==
ctor := dbConstructor db
- property(ctor,'LOADED) => db
+ dbLoaded? db => db
loadLib ctor or return nil
constructorDB ctor
diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot
index c3940cf4..9c12ef1f 100644
--- a/src/interp/i-syscmd.boot
+++ b/src/interp/i-syscmd.boot
@@ -1981,7 +1981,7 @@ loadSpad2Cmd args ==
-- for lib in args repeat
-- lib := object2Identifier lib
-- justWondering =>
--- GETL(lib,'LOADED) => sayKeyedMsg("S2IZ0028",[lib])
+-- dbLoaded? constructorDB lib => sayKeyedMsg("S2IZ0028",[lib])
-- sayKeyedMsg("S2IZ0029",[lib])
-- null getConstructorModuleFromDB lib and
-- null (lib := getConstructorFullNameFromDB lib) =>
diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot
index a2841b70..eed097b4 100644
--- a/src/interp/lisplib.boot
+++ b/src/interp/lisplib.boot
@@ -299,10 +299,10 @@ findModule cname ==
systemError ['"missing module for ",:bright cname]
loadLibIfNotLoaded libName ==
- -- replaces old SpadCondLoad
-- loads is library is not already loaded
$PrintOnly => nil
- property(libName,'LOADED) => nil
+ db := constructorDB libName or return nil
+ dbLoaded? db => nil
loadLib libName
loadLib cname ==
@@ -320,7 +320,7 @@ loadLib cname ==
updateDatabase(cname,cname,systemdir?)
installConstructor(cname,kind)
updateCategoryTable(cname,kind)
- property(cname,'LOADED) := fullLibName
+ dbLoadPath(constructorDB cname) := fullLibName
if $InteractiveMode then $CategoryFrame := $EmptyEnvironment
stopTimingProcess 'load
'T
@@ -332,7 +332,7 @@ loadLibNoUpdate(cname, libName, fullLibName) ==
loadModule(fullLibName,cname)
clearConstructorCache cname
installConstructor(cname,kind)
- property(cname,'LOADED) := fullLibName
+ dbLoadPath(constructorDB cname) := fullLibName
if $InteractiveMode then $CategoryFrame := $EmptyEnvironment
stopTimingProcess 'load
'T
@@ -342,7 +342,7 @@ loadIfNecessary u ==
cons? u => loadIfNecessary first u
value:=
functionp(u) or macrop(u) => u
- property(u,'LOADED) => u
+ dbLoaded? constructorDB u => u
loadLib u => u
not $InteractiveMode and (null (y:= getProplist(u,$CategoryFrame))
or (null symbolLassoc('isFunctor,y)) and (null symbolLAssoc('isCategory,y))) =>
@@ -358,11 +358,11 @@ loadDB db ==
try
startTimingProcess 'load
dbBeingDefined? db => nil
+ dbLoaded? db => db
ctor := dbConstructor db
- property(ctor,'LOADED) => db --FIXME: this should be a db operation
lib := findModule ctor or return nil
loadModule(lib,ctor)
- property(ctor,'LOADED) := lib
+ dbLoadPath(db) := lib
finally stopTimingProcess 'load
convertOpAlist2compilerInfo(opalist) ==
@@ -395,7 +395,8 @@ loadFunctor u ==
makeConstructorsAutoLoad() ==
for cnam in allConstructors() repeat
builtinCategoryName? cnam => nil
- property(cnam,'LOADED) := nil
+ if db := constructorDB cnam then
+ dbLoadPath(db) := nil
systemDependentMkAutoload(getConstructorAbbreviationFromDB cnam,cnam)
systemDependentMkAutoload(fn,cnam) ==
@@ -409,20 +410,19 @@ autoLoad cname ==
-- builtin constructors are always loaded. By definition, there
-- is no way to unload them and load them again.
builtinConstructor? cname => cname
- if constructorDB cname = nil then
- makeDB cname
- if property(cname,'LOADED) = nil then
+ db := constructorDB cname or makeDB cname
+ if not dbLoaded? db then
loadLib cname
symbolFunction cname
-setAutoLoadProperty(name) ==
- property(name,'LOADED) := nil
+setAutoLoadProperty name ==
+ if db := constructorDB name then
+ dbLoadPath(db) := nil
symbolFunction(name) := mkAutoLoad name
unloadOneConstructor cnam ==
- property(cnam,'LOADED) := nil
- symbolFunction(cnam) := mkAutoLoad cnam
- --FIXME: should not we clear other fields too?
+ setAutoLoadProperty cnam
+ --FIXME: should not we clear other fields too?
--% Compilation
diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot
index ca246a3c..e6dcba83 100644
--- a/src/interp/nrunfast.boot
+++ b/src/interp/nrunfast.boot
@@ -289,7 +289,8 @@ newLookupInCategories(op,sig,dom,dollar) ==
ident? entry =>
cat := vectorRef(catVec,i)
packageForm := nil
- if property(entry,'LOADED) = nil then loadLib entry
+ if not dbLoaded? constructorDB entry then
+ loadLib entry
infovec := property(entry,'infovec)
success :=
[.,opvec,:.] := infovec
diff --git a/src/interp/showimp.boot b/src/interp/showimp.boot
index b776e748..48075d7c 100644
--- a/src/interp/showimp.boot
+++ b/src/interp/showimp.boot
@@ -298,7 +298,7 @@ dcOpLatchPrint(op,index) ==
getInfovec name ==
u := property(name,'infovec) => u
- property(name,'LOADED) => nil
+ dbLoaded? constructorDB name => nil
fullLibName := getConstructorModuleFromDB name or return nil
startTimingProcess 'load
loadLibNoUpdate(name, name, fullLibName)