aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/interp/c-util.boot6
-rw-r--r--src/interp/define.boot8
3 files changed, 15 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 04edac55..7e4ed5e1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
2011-11-02 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/c-util.boot (dbSubstituteAllQuantified): New.
+ * interp/define.boot (NRTmakeCategoryAlist): Use it.
+ (compDefineFunctor1): Likewise.
+
+2011-11-02 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
Add compiler support for implicit parameters.
* interp/compiler.boot (bindPredicateExistentials): Rename from
constructorCondition. Now return a substitution on success,
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()