diff options
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/algebra/Makefile.in | 1 | ||||
-rw-r--r-- | src/interp/daase.lisp | 8 | ||||
-rw-r--r-- | src/interp/database.boot | 15 | ||||
-rw-r--r-- | src/interp/interop.boot | 4 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 7 | ||||
-rw-r--r-- | src/share/algebra/browse.daase | 2 | ||||
-rw-r--r-- | src/share/algebra/category.daase | 2 | ||||
-rw-r--r-- | src/share/algebra/compress.daase | 2 | ||||
-rw-r--r-- | src/share/algebra/interp.daase | 2 | ||||
-rw-r--r-- | src/share/algebra/operation.daase | 2 |
11 files changed, 42 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 64270250..ffe00cdb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-08-24 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/daase.lisp (dbArity, dbInstanceCache): New accessors. + * interp/database.boot (loadDBIfnecessary): New. + (dbMutable?): Likewise. + * interp/lisplib.boot (finalizeLisplib): Record mutable property. + 2011-08-23 Gabriel Dos Reis <gdr@cs.tamu.edu> * algebra/Makefile.in: Support construction initial DB profile. diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index e4d99011..4db09a9c 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -1862,6 +1862,7 @@ user-stamp: $(axiom_algebra_layer_user_objects) @ $(STAMP) user-stamp +.PRECIOUS: $(SPADFILES) .PHONY: spad-files-stamp spad-files-stamp: $(SPADFILES) @ rm -f spad-files-stamp diff --git a/src/interp/daase.lisp b/src/interp/daase.lisp index 50b6b63e..fcbc1a6a 100644 --- a/src/interp/daase.lisp +++ b/src/interp/daase.lisp @@ -225,7 +225,7 @@ users ; browse. dependents ; browse. superdomain ; interp. - spare ; superstition + instantiations ; nil if mutable constructor ) ; database structure @@ -277,6 +277,12 @@ (defmacro |dbModule| (db) `(database-object ,db)) +(defmacro |dbArity| (db) + `(list-length (cdr (|dbConstructorForm| ,db)))) + +(defmacro |dbInstanceCache| (db) + `(database-instantiations ,db)) + (defun |makeDB| (c) (let ((db (make-database))) (setf (|dbConstructor| db) c) diff --git a/src/interp/database.boot b/src/interp/database.boot index c6f9c50a..3ba37506 100644 --- a/src/interp/database.boot +++ b/src/interp/database.boot @@ -821,3 +821,18 @@ printAllInitdbInfo(srcdir,dbfile) == for path in paths repeat printInitdbInfo(NAMESTRING path,out) finally closeStream out + +--% + +loadDBIfnecessary db == + ctor := dbConstructor db + property(ctor,'LOADED) => db + loadLib ctor or return nil + constructorDB ctor + +++ Returns true if instantiations of the constructor +++ defined by `db' should not be cached. +dbMutable? db == + dbInstanceCache loadDBIfnecessary db = nil + + diff --git a/src/interp/interop.boot b/src/interp/interop.boot index 28408072..c9c0f67d 100644 --- a/src/interp/interop.boot +++ b/src/interp/interop.boot @@ -664,10 +664,6 @@ HasCategory(domain,catform') == opOf(catform) in '(Object Type) or --temporary hack or/[compareSigEqual(catform,cat,domain0,domain) for cat in catlist] ---systemDependentMkAutoload(fn,cnam) == --- FBOUNDP(cnam) => "next" --- symbolFunction(cnam) := mkAutoLoad(fn, cnam) - domainEqual(a,b) == vector? a and vector? b and a.0 = b.0 diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index 057f1b89..d448fd22 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -552,6 +552,11 @@ writeOperations(ctor,ops,file) == writeConstructorModemap(ctor,mm,file) == writeInfo(ctor,mm,'constructorModemap,'dbConstructorModemap,file) +writeInstanceCache(ctor,file) == + insn := ['%store,['dbInstanceCache,mkCtorDBForm ctor],'%true] + LAM_,FILEACTQ('instanceCache,expandToVMForm insn) + lisplibWrite('"instanceCache",'T,file) + ++ If compilation produces an error, issue inform user and ++ return to toplevel reader. leaveIfErrors(libName,kind) == @@ -568,6 +573,8 @@ finalizeLisplib(ctor,libName) == writeConstructorForm(ctor,form,$libFile) writeKind(ctor,kind,$libFile) writeConstructorModemap(ctor,removeZeroOne mm,$libFile) + if not $mutableDomains then + writeInstanceCache(ctor,$libFile) $lisplibCategory := $lisplibCategory or mm.mmTarget -- set to target of mm for package/domain constructors; -- to the right-hand sides (the definition) for category constructors diff --git a/src/share/algebra/browse.daase b/src/share/algebra/browse.daase index 978e41dc..92b9b756 100644 --- a/src/share/algebra/browse.daase +++ b/src/share/algebra/browse.daase @@ -1,5 +1,5 @@ -(2276906 . 3523030432) +(2276906 . 3523190732) (-18 A S) ((|constructor| (NIL "One-dimensional-array aggregates serves as models for one-dimensional arrays. Categorically,{} these aggregates are finite linear aggregates with the \\spadatt{shallowlyMutable} property,{} that is,{} any component of the array may be changed without affecting the identity of the overall array. Array data structures are typically represented by a fixed area in storage and therefore cannot efficiently grow or shrink on demand as can list structures (see however \\spadtype{FlexibleArray} for a data structure which is a cross between a list and an array). Iteration over,{} and access to,{} elements of arrays is extremely fast (and often can be optimized to open-code). Insertion and deletion however is generally slow since an entirely new data structure must be created for the result."))) NIL diff --git a/src/share/algebra/category.daase b/src/share/algebra/category.daase index e77f2056..97a4430d 100644 --- a/src/share/algebra/category.daase +++ b/src/share/algebra/category.daase @@ -1,5 +1,5 @@ -(205468 . 3523030436) +(205468 . 3523190736) ((((-877)) . T)) ((((-877)) . T)) ((((-877)) . T)) diff --git a/src/share/algebra/compress.daase b/src/share/algebra/compress.daase index 1d84b356..9209b962 100644 --- a/src/share/algebra/compress.daase +++ b/src/share/algebra/compress.daase @@ -1,5 +1,5 @@ -(30 . 3523030430) +(30 . 3523190731) (4428 |Enumeration| |Mapping| |Record| |Union| |ofCategory| |isDomain| ATTRIBUTE |package| |domain| |category| CATEGORY |nobranch| AND |Join| |ofType| SIGNATURE "failed" "algebra" |OneDimensionalArrayAggregate&| diff --git a/src/share/algebra/interp.daase b/src/share/algebra/interp.daase index a4d9ac2e..4a3d15c1 100644 --- a/src/share/algebra/interp.daase +++ b/src/share/algebra/interp.daase @@ -1,5 +1,5 @@ -(2872409 . 3523030445) +(2872409 . 3523190745) ((-1935 ((#1=(-114) #2=(-1 #1# |#2| |#2|) $) 86 T ELT) ((#1# $) NIL T ELT)) (-1933 (($ #2# $) 18 T ELT) (#3=($ $) NIL T ELT)) (-4218 #4=((|#2| $ #5=(-558) |#2|) NIL T ELT) ((|#2| $ #6=(-1255 #5#) |#2|) 44 T ELT)) (-2510 (#3# 80 T ELT)) (-4272 ((|#2| #7=(-1 |#2| |#2| |#2|) $ |#2| |#2|) 52 T ELT) ((|#2| #7# $ |#2|) 50 T ELT) ((|#2| #7# $) 49 T ELT)) (-3839 ((#5# #8=(-1 #1# |#2|) $) 27 T ELT) ((#5# |#2| $) NIL T ELT) ((#5# |#2| $ #5#) 96 T ELT)) (-3290 ((#9=(-661 |#2|) $) 13 T ELT)) (-3938 (($ #2# $ $) 64 T ELT) (#10=($ $ $) NIL T ELT)) (-2160 (#11=($ (-1 |#2| |#2|) $) 37 T ELT)) (-4388 (#11# NIL T ELT) (($ #7# $ $) 60 T ELT)) (-2517 (($ |#2| $ #5#) NIL T ELT) (#12=($ $ $ #5#) 67 T ELT)) (-1468 (((-3 |#2| "failed") #8# $) 29 T ELT)) (-2158 (#13=(#1# #8# $) 23 T ELT)) (-4230 #4# ((|#2| $ #5#) NIL T ELT) (#14=($ $ #6#) 66 T ELT)) (-2518 (($ $ #5#) 76 T ELT) (#14# 75 T ELT)) (-2157 ((#15=(-791) #8# $) 34 T ELT) ((#15# |#2| $) NIL T ELT)) (-1934 (#12# 69 T ELT)) (-3820 (#3# 68 T ELT)) (-3950 (($ #9#) 73 T ELT)) (-4232 (($ $ |#2|) NIL T ELT) (($ |#2| $) NIL T ELT) (#10# 87 T ELT) (($ (-661 $)) 85 T ELT)) (-4376 (((-877) $) 92 T ELT)) (-2159 (#13# 22 T ELT)) (-3454 (#16=(#1# $ $) 95 T ELT)) (-3086 (#16# 99 T ELT))) (((-18 |#1| |#2|) (-10 -8 (-15 -3454 #1=(#2=(-114) |#1| |#1|)) (-15 -4376 ((-877) |#1|)) (-15 -3086 #1#) (-15 -1933 #3=(|#1| |#1|)) (-15 -1933 (|#1| #4=(-1 #2# |#2| |#2|) |#1|)) (-15 -2510 #3#) (-15 -1934 #5=(|#1| |#1| |#1| #6=(-558))) (-15 -1935 (#2# |#1|)) (-15 -3938 #7=(|#1| |#1| |#1|)) (-15 -3839 (#6# |#2| |#1| #6#)) (-15 -3839 (#6# |#2| |#1|)) (-15 -3839 (#6# #8=(-1 #2# |#2|) |#1|)) (-15 -1935 (#2# #4# |#1|)) (-15 -3938 (|#1| #4# |#1| |#1|)) (-15 -4218 (|#2| |#1| #9=(-1255 #6#) |#2|)) (-15 -2517 #5#) (-15 -2517 (|#1| |#2| |#1| #6#)) (-15 -2518 #10=(|#1| |#1| #9#)) (-15 -2518 (|#1| |#1| #6#)) (-15 -4388 (|#1| #11=(-1 |#2| |#2| |#2|) |#1| |#1|)) (-15 -4232 (|#1| (-661 |#1|))) (-15 -4232 #7#) (-15 -4232 (|#1| |#2| |#1|)) (-15 -4232 (|#1| |#1| |#2|)) (-15 -4230 #10#) (-15 -3950 (|#1| #12=(-661 |#2|))) (-15 -1468 ((-3 |#2| "failed") #8# |#1|)) (-15 -4272 (|#2| #11# |#1|)) (-15 -4272 (|#2| #11# |#1| |#2|)) (-15 -4272 (|#2| #11# |#1| |#2| |#2|)) (-15 -4230 (|#2| |#1| #6#)) (-15 -4230 #13=(|#2| |#1| #6# |#2|)) (-15 -4218 #13#) (-15 -2157 (#14=(-791) |#2| |#1|)) (-15 -3290 (#12# |#1|)) (-15 -2157 (#14# #8# |#1|)) (-15 -2158 #15=(#2# #8# |#1|)) (-15 -2159 #15#) (-15 -2160 #16=(|#1| (-1 |#2| |#2|) |#1|)) (-15 -4388 #16#) (-15 -3820 #3#)) (-19 |#2|) (-1238)) (T -18)) NIL diff --git a/src/share/algebra/operation.daase b/src/share/algebra/operation.daase index 00a4ac36..a255645d 100644 --- a/src/share/algebra/operation.daase +++ b/src/share/algebra/operation.daase @@ -1,5 +1,5 @@ -(719417 . 3523030433) +(719417 . 3523190733) (((*1 *2 *3 *4) (|partial| -12 (-5 *3 (-1288 *4)) (-4 *4 (-13 (-1070) (-658 (-558)))) (-5 *2 (-1288 (-419 (-558)))) (-5 *1 (-1317 *4))))) |