aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-11-02 12:55:19 +0000
committerdos-reis <gdr@axiomatics.org>2011-11-02 12:55:19 +0000
commitc3dea39d035f24533e2aa65309214f7ce2aa9ae6 (patch)
tree3ff0c7970b5224c993d91be3997ada85f7eed5b0 /src/interp
parent50b4173dde564f17b40c4ec8f84b4e361d889d6b (diff)
downloadopen-axiom-c3dea39d035f24533e2aa65309214f7ce2aa9ae6.tar.gz
* interp/c-util.boot (dbSubstituteAllQuantified): New.
* interp/define.boot (NRTmakeCategoryAlist): Use it. (compDefineFunctor1): Likewise.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/c-util.boot6
-rw-r--r--src/interp/define.boot8
2 files changed, 9 insertions, 5 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index 815d791f..34cc5546 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -172,10 +172,14 @@ dbImplicitConstraints db ==
macro dbSubstituteFormals(db,x) ==
applySubst(dbFormalSubst db,x)
-++ Apply the query substitution of`db' to the form `x'.
+++ Apply the query substitution of `db' to the form `x'.
macro dbSubstituteQueries(db,x) ==
applySubst(dbQuerySubst db,x)
+++ Apply both query and formal variable substitutions of `db' to `x'.
+dbSubstituteAllQuantified(db,x) ==
+ applySubst([:dbQuerySubst db,:dbFormalSubst db],x)
+
--%
$SetCategory ==
'(SetCategory)
diff --git a/src/interp/define.boot b/src/interp/define.boot
index a90d49fc..d728d512 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -476,7 +476,7 @@ NRTmakeCategoryAlist(db,e) ==
$levelAlist: local := depthAssocList [CAAR x for x in pcAlist]
opcAlist := reverse! SORTBY(function NRTcatCompare,pcAlist)
newPairlis := [[5 + i,:b] for [.,:b] in dbFormalSubst db for i in 1..]
- slot1 := [[a,:k] for [a,:b] in dbSubstituteFormals(db,opcAlist)
+ slot1 := [[a,:k] for [a,:b] in dbSubstituteAllQuantified(db,opcAlist)
| (k := predicateBitIndex(b,e)) ~= -1]
slot0 := [hasDefaultPackage opOf a for [a,:b] in slot1]
sixEtc := [5 + i for i in 1..dbArity db]
@@ -1416,8 +1416,8 @@ compDefineFunctor1(df is ['DEF,form,signature,body],
$e := augModemapsFromCategory('_$,'_$,target,$e)
$e := put('$,'%form,form,$e)
$signature := signature'
- parSignature := dbSubstituteFormals(db,dbSubstituteQueries(db,signature'))
- parForm := dbSubstituteFormals(db,form)
+ parSignature := dbSubstituteAllQuantified(db,signature')
+ parForm := dbSubstituteAllQuantified(db,form)
-- 3. give operator a 'modemap property
modemap := [[parForm,:parSignature],[buildConstructorCondition db,$op]]
@@ -1454,7 +1454,7 @@ compDefineFunctor1(df is ['DEF,form,signature,body],
'SPADSLAM
fun := compile dbSubstituteFormals(db,[op',[lamOrSlam,argl,body']])
--The above statement stops substitutions gettting in one another's way
- operationAlist := dbSubstituteFormals(db,$lisplibOperationAlist)
+ operationAlist := dbSubstituteAllQuantified(db,$lisplibOperationAlist)
dbModemaps(db) := modemapsFromFunctor(db,parForm,operationAlist)
reportOnFunctorCompilation()