aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog15
-rw-r--r--src/interp/br-op2.boot10
-rw-r--r--src/interp/compiler.boot4
-rw-r--r--src/interp/database.boot5
-rw-r--r--src/interp/define.boot9
-rw-r--r--src/interp/lisplib.boot3
-rw-r--r--src/interp/nruncomp.boot2
-rw-r--r--src/interp/wi1.boot2
-rw-r--r--src/interp/wi2.boot6
9 files changed, 30 insertions, 26 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e54f6b3a..d0cb6a1a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,18 @@
+2009-10-31 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/br-op2.boot (pairlis): Remove.
+ (modemap2Sig): Use pairList.
+ * interp/compiler.boot (applyMapping): Likewise.
+ * interp/database.boot (augLisplibModemapsFromCategory): Likewise.
+ (getOplistForConstructorForm): Likewise.
+ * interp/define.boot (compDefineCategory2): Likewise.
+ (compDefineFunctor1): Likewise.
+ (mkOpVec): Likewise.
+ * interp/lisplib.boot (finalizeLisplib): Likewise.
+ * interp/nruncomp.boot (mkSlot1sublis): Likewise.
+ * interp/wi1.boot (compDefineCategory2): Likewise.
+ * interp/wi2.boot (compDefineFunctor1): Likewise.
+
2009-10-28 Gabriel Dos Reis <gdr@cs.tamu.edu>
* algebra/seg.spad.pamphlet (RangeBinding): New.
diff --git a/src/interp/br-op2.boot b/src/interp/br-op2.boot
index 7ace60c7..266bdb89 100644
--- a/src/interp/br-op2.boot
+++ b/src/interp/br-op2.boot
@@ -568,7 +568,7 @@ modemap2Sig(op,mm) ==
target := dcSig . 1
ntarget := ['Union, target, '"failed"]
dcSig := substitute(ntarget, target, dcSig)
- alist := findSubstitutionOrder? pairlis(vlist, flist) or systemError()
+ alist := findSubstitutionOrder? pairList(vlist, flist) or systemError()
predList := substInOrder(alist, predList)
nsig := substInOrder(alist, sig)
if hasPatternVar nsig or hasPatternVar predList then
@@ -613,11 +613,3 @@ getSigSubst(u, pl, vl, fl) ==
key = 'not => getSigSubst(r, [item, :pl], vl, fl)
systemError()
[pl, vl, fl]
-
-
-pairlis(u,v) ==
- null u or null v => nil
- [[first u,:first v],:pairlis(rest u, rest v)]
-
-
-
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot
index 808e57c3..5022d5dc 100644
--- a/src/interp/compiler.boot
+++ b/src/interp/compiler.boot
@@ -222,7 +222,7 @@ applyMapping([op,:argl],m,e,ml) ==
#argl~=#ml-1 => nil
isCategoryForm(first ml,e) =>
--is op a functor?
- pairlis:= [[v,:a] for a in argl for v in $FormalMapVariableList]
+ pairlis:= pairList($FormalMapVariableList,argl)
ml' := SUBLIS(pairlis, ml)
argl':=
[T.expr for x in argl for m' in rest ml'] where
@@ -240,7 +240,7 @@ applyMapping([op,:argl],m,e,ml) ==
-- Compiler synthetized operators are inline.
u ~= nil and u.expr is ["XLAM",:.] => ["call",u.expr,:argl']
['call,['applyFun,op],:argl']
- pairlis:= [[v,:a] for a in argl' for v in $FormalMapVariableList]
+ pairlis := pairList($FormalMapVariableList,argl')
convert([form,SUBLIS(pairlis,first ml),e],m)
-- This version tends to give problems with #1 and categories
diff --git a/src/interp/database.boot b/src/interp/database.boot
index 10340aab..f30bceec 100644
--- a/src/interp/database.boot
+++ b/src/interp/database.boot
@@ -171,8 +171,7 @@ getConstructorKind ctor ==
--% Functions for manipulating MODEMAP DATABASE
augLisplibModemapsFromCategory(form is [op,:argl],body,signature) ==
- sl := [["$",:"*1"],:[[a,:p] for a in argl
- for p in rest $PatternVariableList]]
+ sl := [["$",:"*1"],:pairList(argl,rest $PatternVariableList)]
form:= SUBLIS(sl,form)
body:= SUBLIS(sl,body)
signature:= SUBLIS(sl,signature)
@@ -711,7 +710,7 @@ getOplistForConstructorForm (form := [op,:argl]) ==
-- where signature-Alist has entries (<signature> . item)
-- where item has form (<slotNumber> <condition> <kind>)
-- where <kind> = ELT | CONST | Subsumed | (XLAM..) ..
- pairlis:= [[fv,:arg] for fv in $FormalMapVariableList for arg in argl]
+ pairlis := pairList($FormalMapVariableList,argl)
opAlist := getOperationAlistFromLisplib op
[:getOplistWithUniqueSignatures(op,pairlis,signatureAlist)
for [op,:signatureAlist] in opAlist]
diff --git a/src/interp/define.boot b/src/interp/define.boot
index b21cdb7e..ce5bf8d7 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -479,7 +479,7 @@ compDefineCategory2(form,signature,specialCases,body,m,e,
sargl:= TAKE(# argl, $TriangleVariableList)
$functorForm:= $form:= [$op,:sargl]
$formalArgList:= [:sargl,:$formalArgList]
- aList:= [[a,:sa] for a in argl for sa in sargl]
+ aList := pairList(argl,sargl)
formalBody:= SUBLIS(aList,body)
signature' := SUBLIS(aList,signature')
--Begin lines for category default definitions
@@ -511,7 +511,7 @@ compDefineCategory2(form,signature,specialCases,body,m,e,
fun:= compile [op',["LAM",sargl,body]]
-- 5. give operator a 'modemap property
- pairlis:= [[a,:v] for a in argl for v in $FormalMapVariableList]
+ pairlis := pairList(argl,$FormalMapVariableList)
parSignature:= SUBLIS(pairlis,signature')
parForm:= SUBLIS(pairlis,form)
-- If we are only interested in the defaults, there is no point
@@ -609,7 +609,7 @@ compDefineFunctor1(df is ['DEF,form,signature,nils,body],
originale:= $e
[$op,:argl]:= form
$formalArgList:= [:argl,:$formalArgList]
- $pairlis := [[a,:v] for a in argl for v in $FormalMapVariableList]
+ $pairlis := pairList(argl,$FormalMapVariableList)
$mutableDomain: local :=
-- all defaulting packages should have caching turned off
isCategoryPackageName $op or MEMQ($op,$mutableDomains)
@@ -858,8 +858,7 @@ genDomainViewList(id,catlist) ==
mkOpVec(dom,siglist) ==
dom:= getPrincipalView dom
- substargs:= [['$,:dom.0],:
- [[a,:x] for a in $FormalMapVariableList for x in rest dom.0]]
+ substargs:= [['$,:dom.0],:pairList($FormalMapVariableList,rest dom.0)]
oplist:= getOperationAlistFromLisplib opOf dom.0
--new form is (<op> <signature> <slotNumber> <condition> <kind>)
ops:= MAKE_-VEC (#siglist)
diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot
index 86512de3..9cd82943 100644
--- a/src/interp/lisplib.boot
+++ b/src/interp/lisplib.boot
@@ -438,8 +438,7 @@ finalizeLisplib libName ==
--lisplibWrite('"attributes",rest opsAndAtts,$libFile)
--if kind='category then NRTgenInitialAttributeAlist rest opsAndAtts
if kind='category then
- $pairlis : local := [[a,:v] for a in rest $lisplibForm
- for v in $FormalMapVariableList]
+ $pairlis : local := pairList($lisplibForm,$FormalMapVariableList)
$NRTslot1PredicateList : local := []
NRTgenInitialAttributeAlist rest opsAndAtts
lisplibWrite('"superDomain",removeZeroOne $lisplibSuperDomain,$libFile)
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index 6454f09f..f69f80b3 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -630,7 +630,7 @@ NRTmakeSlot1Info() ==
[first $form,[addList,:opList]]
mkSlot1sublis argl ==
- [[a,:b] for a in argl for b in $FormalMapVariableList]
+ pairList(argl,$FormalMapVariableList)
slot1Filter opList ==
--include only those ops which are defined within the capsule
diff --git a/src/interp/wi1.boot b/src/interp/wi1.boot
index 1d987854..f97716eb 100644
--- a/src/interp/wi1.boot
+++ b/src/interp/wi1.boot
@@ -1225,7 +1225,7 @@ compDefineCategory2(form,signature,specialCases,body,m,e,
fun:= compile [op',['LAM,sargl,body]]
-- 5. give operator a 'modemap property
- pairlis:= [[a,:v] for a in argl for v in $FormalMapVariableList]
+ pairlis:= pairList(argl,$FormalMapVariableList)
parSignature:= SUBLIS(pairlis,signature')
parForm:= SUBLIS(pairlis,form)
---- lisplibWrite('"compilerInfo",
diff --git a/src/interp/wi2.boot b/src/interp/wi2.boot
index 3a4ef8b4..e3871acb 100644
--- a/src/interp/wi2.boot
+++ b/src/interp/wi2.boot
@@ -78,7 +78,7 @@ compDefineFunctor1(df, m,$e,$prefix,$formalArgList) ==
originale:= $e
[$op,:argl]:= form
$formalArgList:= [:argl,:$formalArgList]
- $pairlis := [[a,:v] for a in argl for v in $FormalMapVariableList]
+ $pairlis := pairList(argl,$FormalMapVariableList)
$mutableDomain: local :=
-- all defaulting packages should have caching turned off
isCategoryPackageName $op or
@@ -470,7 +470,7 @@ applyMapping([op,:argl],m,e,ml) ==
#argl~=#ml-1 => nil
isCategoryForm(first ml,e) =>
--is op a functor?
- pairlis:= [[v,:a] for a in argl for v in $FormalMapVariableList]
+ pairlis:= pairList(argl,$FormalMapVariableList)
ml' := SUBLIS(pairlis, ml)
argl':=
[T.expr for x in argl for m' in rest ml'] where
@@ -493,7 +493,7 @@ applyMapping([op,:argl],m,e,ml) ==
[op',:argl',"$"] where
op':= INTERN STRCONC(encodeItem nprefix,";",encodeItem op)
['call,['applyFun,op],:argl']
- pairlis:= [[v,:a] for a in argl' for v in $FormalMapVariableList]
+ pairlis := pairList(argl',$FormalMapVariableList)
convert([form,SUBLIS(pairlis,first ml),e],m)
compFormWithModemap(form,m,e,modemap) ==