aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interp/br-prof.boot4
-rw-r--r--src/interp/c-util.boot5
-rw-r--r--src/interp/define.boot2
-rw-r--r--src/interp/i-output.boot2
-rw-r--r--src/interp/interop.boot10
-rw-r--r--src/interp/lisplib.boot4
-rw-r--r--src/interp/newfort.boot12
-rw-r--r--src/interp/sys-driver.boot8
-rw-r--r--src/interp/sys-utility.boot4
9 files changed, 26 insertions, 25 deletions
diff --git a/src/interp/br-prof.boot b/src/interp/br-prof.boot
index 8cb80ce6..149e63a0 100644
--- a/src/interp/br-prof.boot
+++ b/src/interp/br-prof.boot
@@ -82,8 +82,8 @@ dbShowInfoOp(htPage,op,sig,alist) ==
conform
faTypes := CDDAR getConstructorModemapFromDB conname
- conArgTypes :=
- applySubst(pairList(TAKE(#faTypes,$FormalMapVariableList),IFCDR conform),faTypes)
+ conArgTypes :=
+ applySubst(pairList($FormalMapVariableList,IFCDR conform),faTypes)
conform := htpProperty(htPage,'conform)
conname := opOf conform
--argTypes := reverse ASSOCRIGHT symbolLassoc('arguments,alist)
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index bb67ffd7..5b8ec150 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -1486,7 +1486,8 @@ massageBackendCode x ==
second x is ["FLUID",:.] =>
PUSH(CADADR x, $FluidVars)
x.rest.first := CADADR x
- MAPC(function pushLocalVariable, LISTOFATOMS second x)
+ for v in LISTOFATOMS second x repeat
+ pushLocalVariable v
-- Even if user used Lisp-level instructions to assign to
-- this variable, we still want to note that it is a Lisp-level
-- special variable.
@@ -1634,7 +1635,7 @@ backendCompile1 x ==
[[fname,lamex],:$CLOSEDFNS]
backendCompile l ==
- MAPCAR(function backendCompile2, MAPCAN(function backendCompile1,l))
+ [backendCompile2 f2 for f2 in [:backendCompile1(f1) for f1 in l]]
compileFileQuietly path ==
quietlyIfInteractive COMPILE_-FILE path
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 4cc81d97..4ab517d8 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -812,7 +812,7 @@ compDefineCategory2(form,signature,specialCases,body,m,e,
['MAKEPROP,['QUOTE,op'],'(QUOTE NILADIC),true])
-- 6. put modemaps into InteractiveModemapFrame
- $domainShell := eval [op',:MAPCAR('MKQ,sargl)]
+ $domainShell := eval [op',:[MKQ f for f in sargl]]
$lisplibCategory:= formalBody
if $LISPLIB then
$lisplibForm:= form
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index 712a3005..113aeed7 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -2385,7 +2385,7 @@ qTWidth(u) ==
remWidth(x) ==
atom x => x
true => [(atom first x => first x; true => CAAR x),
- :MMAPCAR(function remWidth, rest x)]
+ :[remWidth y for y in rest x]]
subSub(u) ==
height CDDR u
diff --git a/src/interp/interop.boot b/src/interp/interop.boot
index 1b2992ff..20c4c920 100644
--- a/src/interp/interop.boot
+++ b/src/interp/interop.boot
@@ -68,16 +68,16 @@ DNameToSExpr1 dname ==
args := rest rest dname
name0 is '_-_> =>
froms := first args
- froms := MAPCAR(function DNameToSExpr, rest froms)
+ froms := [DNameToSExpr x for x in rest froms]
ret := second args -- a tuple
ret := DNameToSExpr second ret -- contents
['Mapping,:[ret,:froms]]
name0 is 'Union or name0 is 'Record =>
- sxs := MAPCAR(function DNameToSExpr, rest first args)
+ sxs := [DNameToSExpr x for x in rest first args]
[name0,:sxs]
name0 is 'Enumeration =>
- [name0,:MAPCAR(function DNameFixEnum, rest first args)]
- [name0,:MAPCAR(function DNameToSExpr, args)]
+ [name0,:[DNameFixEnum x for x in rest first args]]
+ [name0,:[DNameToSExpr x for x in args]]
DNameToSExpr dname ==
first dname = DNameOtherID =>
@@ -104,7 +104,7 @@ SExprToDName(sexpr, cosigVal) ==
[DNameTupleID,: [ SExprToDName(sx,true) for sx in rest sexpr]]]
newCosig := rest getDualSignatureFromDB first sexpr
[DNameApplyID, name0,
- : MAPCAR(function SExprToDName, rest sexpr, newCosig)]
+ :[SExprToDName(x,f) for x in rest sexpr for f in newCosig]]
-- local garbage because Compiler strings are null terminated
StringToCompStr(str) ==
diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot
index be1ba09b..afc696d6 100644
--- a/src/interp/lisplib.boot
+++ b/src/interp/lisplib.boot
@@ -769,8 +769,8 @@ getConstructorSignature ctor ==
-- Note: constructors are not overloadable.
rest getmode(ctor,$e)
-getSlotFromCategoryForm ([op,:argl],index) ==
- u:= eval [op,:MAPCAR('MKQ,TAKE(#argl,$FormalMapVariableList))]
+getSlotFromCategoryForm (x,index) ==
+ u:= eval [x.op,:[MKQ f for f in $FormalMapVariableList for . in 1..#x.args]]
not vector? u =>
systemErrorHere '"getSlotFromCategoryForm"
u . index
diff --git a/src/interp/newfort.boot b/src/interp/newfort.boot
index 1dc6f1ac..47e9ac1d 100644
--- a/src/interp/newfort.boot
+++ b/src/interp/newfort.boot
@@ -492,7 +492,7 @@ mkMat(args) ==
mkFortFn(op,args,nargs) ==
[fortranifyFunctionName(STRINGIMAGE op,nargs),
- :MAPCAR(function fortPre1 , args) ]
+ :[fortPre1 x for x in args]]
fortranifyFunctionName(op,nargs) ==
op = '"<" => '".LT."
@@ -889,19 +889,19 @@ fortExpSize e ==
-- (+ x (+ y z)) will be printed as "x+(y+z)" rather than "x+y+z"
-- which is the actual case.
atom e => # STRINGIMAGE e
- #e > 3 => 2+fortSize MAPCAR(function fortExpSize, e)
- #e < 3 => 2+fortSize MAPCAR(function fortExpSize, e)
+ #e > 3 => 2+fortSize [fortExpSize x for x in e]
+ #e < 3 => 2+fortSize [fortExpSize x for x in e]
[op,arg1,arg2] := e
op := STRINGIMAGE op
op = '"CMPLX" => 3+fortSize [fortExpSize arg1,fortExpSize arg2]
narys := ['"+",'"*"] -- those nary ops we changed to binary
member(op,narys) =>
LISTP arg1 and not(op=STRINGIMAGE first arg1) =>
- 2+fortSize MAPCAR(function fortExpSize, e)
+ 2+fortSize [fortExpSize x for x in e]
LISTP arg2 and not(op=STRINGIMAGE first arg2) =>
- 2+fortSize MAPCAR(function fortExpSize, e)
+ 2+fortSize [fortExpSize x for x in e]
1+fortSize [fortExpSize arg1,fortExpSize arg2]
- 2+fortSize MAPCAR(function fortExpSize, e)
+ 2+fortSize [fortExpSize x for x in e]
fortSize e ==
+/[elen u for u in e] where
diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot
index f622bf5d..efa77eba 100644
--- a/src/interp/sys-driver.boot
+++ b/src/interp/sys-driver.boot
@@ -111,10 +111,10 @@ $defaultMsgDatabaseName := nil
++
REROOT: () -> %Thing
REROOT() ==
- $DIRECTORY_-LIST := MAPCAR(function makeAbsoluteFilename,
- $RELATIVE_-DIRECTORY_-LIST)
- $LIBRARY_-DIRECTORY_-LIST := MAPCAR(function makeAbsoluteFilename,
- $RELATIVE_-LIBRARY_-DIRECTORY_-LIST)
+ $DIRECTORY_-LIST :=
+ [makeAbsoluteFilename d for d in $RELATIVE_-DIRECTORY_-LIST]
+ $LIBRARY_-DIRECTORY_-LIST :=
+ [makeAbsoluteFilename d for d in $RELATIVE_-LIBRARY_-DIRECTORY_-LIST]
$defaultMsgDatabaseName := PATHNAME
makeAbsoluteFilename '"share/msgs/s2-us.msgs"
$msgDatabaseName := nil
diff --git a/src/interp/sys-utility.boot b/src/interp/sys-utility.boot
index b12c4734..88c6ac6a 100644
--- a/src/interp/sys-utility.boot
+++ b/src/interp/sys-utility.boot
@@ -135,14 +135,14 @@ CONTAINED(x,y) == main where
ASSOCLEFT: %Thing -> %Thing
ASSOCLEFT x ==
atom x => x
- MAPCAR(function first,x)
+ [first p for p in x]
++ Returns all the datums of association list `x'.
-- ??? Should not this be named `alistAllValues'?
ASSOCRIGHT: %Thing -> %Thing
ASSOCRIGHT x ==
atom x => x
- MAPCAR(function rest,x)
+ [rest p for p in x]
++ Put the association list pair `(x . y)' into `l', erasing any
++ previous association for `x'.