aboutsummaryrefslogtreecommitdiff
path: root/src/interp/c-util.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-08-13 15:05:20 +0000
committerdos-reis <gdr@axiomatics.org>2011-08-13 15:05:20 +0000
commit57348f16a89792d9730e7d5694e3d0acc98157bc (patch)
tree551a14d42a5836ea8abc627036906d9ac89fbdf4 /src/interp/c-util.boot
parent64a0eb226331be7e41848a7d807c5caa4f248ffa (diff)
downloadopen-axiom-57348f16a89792d9730e7d5694e3d0acc98157bc.tar.gz
* interp/c-util.boot (instantiationArgs): New.
(domainDirectory): Likewise. (domainLookupFunction): Likewise. (domainOperatorTable): Likewise. (domainAttributes): Likewise. (domainPredicates): Likewise. (domainData): Likewise. * interp/buildom.boot: Use new domain accessors. * interp/functor.boot: Likewise. * interp/interop.boot: Likewise. * interp/nruncomp.boot: Likewise. * interp/nrunfast.boot: Likewise.
Diffstat (limited to 'src/interp/c-util.boot')
-rw-r--r--src/interp/c-util.boot28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index f7fd2dc4..db2c8554 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -73,6 +73,10 @@ macro instantiationCtor d ==
macro instantiationArgs d ==
canonicalForm(d).args
+++ Return the number of arguments used to instantiate a domain object.
+macro instantiationArity d ==
+ # instantiationArgs d
+
++ Return the list of operations exported by a category object
macro categoryExports d ==
categoryRef(d,1)
@@ -85,11 +89,33 @@ macro categoryAttributes d ==
macro categoryHierarchy c ==
categoryRef(c,4)
+++ Reference a 3-list
+++ [lookupFunction,thisDomain,optable]
+++ necessary for function lookup in a domain:
+macro domainDirectory d ==
+ domainRef(d,1)
+
+++ Reference the lookup function of a domain object
+macro domainLookupFunction d ==
+ first domainDirectory d
+
+++ Reference the operator-code table of a domain object.
+macro domainOperatorTable d ==
+ third domainDirectory d
+
+++ Reference the list of (attribute, predIndex) pairs for this domain.
+macro domainAttributes d ==
+ domainRef(d,2)
+
++ Return the predicate values associated with the domain object.
++ This is an integer interpreted as bit vector
macro domainPredicates d ==
domainRef(d,3)
+++ Return a 3-element dotted list of address data for a domain.
+macro domainData d ==
+ domainRef(d,4)
+
--%
++ List of category constructors that do not have entries in the
@@ -268,7 +294,7 @@ declareUnusedParameters x == (augment x; x) where
devaluate d ==
not vector? d => d
- QVSIZE d > 5 and vectorRef(d,3) is ['Category] => canonicalForm d
+ categoryObject? d => canonicalForm d
QVSIZE d > 0 =>
d' := canonicalForm d
isFunctor d' => d'