aboutsummaryrefslogtreecommitdiff
path: root/src/interp/c-util.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-08-29 17:32:37 +0000
committerdos-reis <gdr@axiomatics.org>2011-08-29 17:32:37 +0000
commit57dff7bf047f7364a8ffe27453d7f66de0b159f5 (patch)
treed753642e52449b0475594716189c8ddfb8debb7f /src/interp/c-util.boot
parent6a9b7788dfb5df94343bdb7e5fa2031e388cf356 (diff)
downloadopen-axiom-57dff7bf047f7364a8ffe27453d7f66de0b159f5.tar.gz
* interp/lisplib.boot (laodIfNecessaryAndExists): Remove as unused.
(loadLibIfnecessary): Fold definition into loadIfNecessary. (loadDB): New. (writeAttributes): Likewise. (finalizeLisplib): Use it. * interp/daase.lisp (MAKE-DATABASES): Fix SQUEEZE snafu. * interp/c-util.boot (extendsCategoryForm): Prefer existing translation of category definition to re-evaluation on the fly.
Diffstat (limited to 'src/interp/c-util.boot')
-rw-r--r--src/interp/c-util.boot9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index 24a3a041..ecc72c79 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -1027,7 +1027,14 @@ extendsCategoryForm(domain,form,form') ==
domain = "$" and form = $definition =>
extendsCategoryForm(domain, $currentCategoryBody, form')
isCategoryForm(form,$EmptyEnvironment) =>
- --Constructs the associated vector
+ -- If we have an existing definition for this category, use it.
+ (db := constructorDB form.op) and loadDB db =>
+ form' is ['SIGNATURE,op,types,:.] => assoc([op,args],dbOperations db)
+ form' is ['ATTRIBUTE,a] => assoc(a,dbAttributes db)
+ subst := pairList(dbConstructorForm(db).args,form.args)
+ or/[extendsCategoryForm(domain,applySubst(subst,cat),form')
+ for [cat,:.] in dbAncestors db]
+ -- Otherwise constructs the associated domain shell
formVec:=(compMakeCategoryObject(form,$e)).expr
--Must be $e to pick up locally bound domains
form' is ["SIGNATURE",op,args,:.] =>