diff options
author | dos-reis <gdr@axiomatics.org> | 2010-05-08 22:01:09 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-05-08 22:01:09 +0000 |
commit | 2c869f999871438dfb1c3efb9eb9f6e398c35d36 (patch) | |
tree | 212c40a23c6157a12252b97bd9b0e155a1e336d5 /src | |
parent | 20462739ac81a89fa81ff9576969c7a8d8952ea3 (diff) | |
download | open-axiom-2c869f999871438dfb1c3efb9eb9f6e398c35d36.tar.gz |
* interp/wi2.boot: Remove more RPLACA and RPLACD uses.
* interp/topics.boot: Likewise.
* interp/slam.boot: Likewise.
* interp/nruncomp.boot: Likewise.
* interp/interop.boot: Likewise.
* interp/i-toplev.boot: Likewise.
* interp/i-spec1.boot: Likewise.
* interp/i-resolv.boot: Likewise.
* interp/i-output.boot: Likewise.
* interp/htsetvar.boot: Likewise.
* interp/g-util.boot: Likewise.
* interp/g-cndata.boot: Likewise.
* interp/functor.boot: Likewise.
* interp/dq.boot: Likewise.
* interp/define.boot: Likewise.
* interp/database.boot: Likewise.
* interp/cparse.boot: Likewise.
* interp/clam.boot: Likewise.
* interp/c-util.boot: Likewise.
* interp/br-op1.boot: Likewise.
* interp/br-data.boot: Likewise.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 24 | ||||
-rw-r--r-- | src/interp/br-data.boot | 7 | ||||
-rw-r--r-- | src/interp/br-op1.boot | 8 | ||||
-rw-r--r-- | src/interp/c-util.boot | 4 | ||||
-rw-r--r-- | src/interp/clam.boot | 2 | ||||
-rw-r--r-- | src/interp/cparse.boot | 2 | ||||
-rw-r--r-- | src/interp/database.boot | 2 | ||||
-rw-r--r-- | src/interp/define.boot | 8 | ||||
-rw-r--r-- | src/interp/dq.boot | 4 | ||||
-rw-r--r-- | src/interp/functor.boot | 2 | ||||
-rw-r--r-- | src/interp/g-cndata.boot | 4 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 2 | ||||
-rw-r--r-- | src/interp/g-util.boot | 2 | ||||
-rw-r--r-- | src/interp/htsetvar.boot | 2 | ||||
-rw-r--r-- | src/interp/i-output.boot | 6 | ||||
-rw-r--r-- | src/interp/i-resolv.boot | 2 | ||||
-rw-r--r-- | src/interp/i-spec1.boot | 2 | ||||
-rw-r--r-- | src/interp/i-toplev.boot | 2 | ||||
-rw-r--r-- | src/interp/interop.boot | 2 | ||||
-rw-r--r-- | src/interp/mark.boot | 2 | ||||
-rw-r--r-- | src/interp/nruncomp.boot | 2 | ||||
-rw-r--r-- | src/interp/slam.boot | 4 | ||||
-rw-r--r-- | src/interp/topics.boot | 4 | ||||
-rw-r--r-- | src/interp/wi2.boot | 4 |
24 files changed, 64 insertions, 39 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4e398ec1..1a452f01 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,27 @@ +2010-05-08 Gabriel Dos Reis <gdr@cse.tamu.edu> + + * interp/wi2.boot: Remove more RPLACA and RPLACD uses. + * interp/topics.boot: Likewise. + * interp/slam.boot: Likewise. + * interp/nruncomp.boot: Likewise. + * interp/interop.boot: Likewise. + * interp/i-toplev.boot: Likewise. + * interp/i-spec1.boot: Likewise. + * interp/i-resolv.boot: Likewise. + * interp/i-output.boot: Likewise. + * interp/htsetvar.boot: Likewise. + * interp/g-util.boot: Likewise. + * interp/g-cndata.boot: Likewise. + * interp/functor.boot: Likewise. + * interp/dq.boot: Likewise. + * interp/define.boot: Likewise. + * interp/database.boot: Likewise. + * interp/cparse.boot: Likewise. + * interp/clam.boot: Likewise. + * interp/c-util.boot: Likewise. + * interp/br-op1.boot: Likewise. + * interp/br-data.boot: Likewise. + 2010-05-08 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/as.boot: Replace uses of RPLACA and RPLACD with explicit diff --git a/src/interp/br-data.boot b/src/interp/br-data.boot index 3c2a0ec0..ba3e191e 100644 --- a/src/interp/br-data.boot +++ b/src/interp/br-data.boot @@ -234,11 +234,12 @@ dbAugmentConstructorDataTable() == cname := INTERN dbName line entry := getCDTEntry(cname,true) => --skip over Mapping, Union, Record [name,abb,:.] := entry - RPLACD(rest entry,PUTALIST(CDDR entry,'dbLineNumber,fp)) + entry.rest.rest := PUTALIST(CDDR entry,'dbLineNumber,fp) -- if xname := constructorHasExamplePage entry then --- RPLACD(rest entry,PUTALIST(CDDR entry,'dbExampleFile,xname)) +-- entry.rest := PUTALIST(CDDR entry,'dbExampleFile,xname) args := IFCDR getConstructorFormFromDB name - if args then RPLACD(rest entry,PUTALIST(CDDR entry,'constructorArgs,args)) + if args then + entry.rest.rest := PUTALIST(CDDR entry,'constructorArgs,args) 'done dbHasExamplePage conname == diff --git a/src/interp/br-op1.boot b/src/interp/br-op1.boot index 2a213f67..6d48665c 100644 --- a/src/interp/br-op1.boot +++ b/src/interp/br-op1.boot @@ -366,22 +366,22 @@ dbGatherData(htPage,opAlist,which,key) == nil newEntry := u := assoc(entry,data) => --key seen before? look on DATA - RPLACA(rest u,second u or exposeFlag)--yes, expose if any 1 is exposed + u.rest.first := second u or exposeFlag --yes, expose if any 1 is exposed u data := [y := [entry,exposeFlag,:tail],:data] y --no, create new entry in DATA if member(key,'(origins conditions)) then r := CDDR newEntry if atom r then r := nil --clear out possible 'ASCONST - RPLACD(rest newEntry, --store op/sigs under key if needed - insert([dbMakeSignature(op,item),exposeFlag,:tail],r)) + newEntry.rest.rest := --store op/sigs under key if needed + insert([dbMakeSignature(op,item),exposeFlag,:tail],r) if member(key,'(origins conditions)) then for entry in data repeat --sort list of entries (after the 2nd) tail := CDDR entry tail := atom tail => tail listSort(function LEXLESSEQP,tail) - RPLACD(rest entry,tail) + entry.rest.rest := tail data := listSort(function LEXLESSEQP,data) data diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index c98f668c..edf903b6 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -1291,7 +1291,7 @@ backendCompileNEWNAM x == u := MAKE_-CLOSEDFN_-NAME() PUSH([u,second x], $CLOSEDFNS) x.first := "FUNCTION" - RPLACA(rest x,u) + x.rest.first := u backendCompileNEWNAM first x backendCompileNEWNAM rest x @@ -1571,7 +1571,7 @@ transformToBackendCode x == fluids := S_+(backendFluidize second x, $SpecialVars) lastdecl := lastDeclarationNode rest x if lastdecl = nil then - RPLACD(rest x, body) + x.rest.rest := body else null fluids => lastdecl.rest := body diff --git a/src/interp/clam.boot b/src/interp/clam.boot index 7b3dde2a..ec519a8b 100644 --- a/src/interp/clam.boot +++ b/src/interp/clam.boot @@ -431,7 +431,7 @@ remHashEntriesWith0Count $hashTable == initCache n == tail:= '(0 . $failed) l:= [[$failed,:tail] for i in 1..n] - RPLACD(LASTNODE l,l) + lastNode(l).rest := l assocCache(x,cacheName,fn) == --fn=equality function; do not SHIFT or COUNT diff --git a/src/interp/cparse.boot b/src/interp/cparse.boot index caeb18b8..93794987 100644 --- a/src/interp/cparse.boot +++ b/src/interp/cparse.boot @@ -116,7 +116,7 @@ npPop2()== npPop3()== a:= third $stack - RPLACD(rest $stack,CDDDR $stack) + $stack.rest.rest := CDDDR $stack a npParenthesized f== diff --git a/src/interp/database.boot b/src/interp/database.boot index f90e5ea6..afd2159e 100644 --- a/src/interp/database.boot +++ b/src/interp/database.boot @@ -701,7 +701,7 @@ getOperationAlistFromLisplib x == if t is [.] then nil else s.rest := QCDDR f else r.rest := QCDR f - else RPLACD(first items,f) + else items.first.rest := f items.first := addConsDB first items u and markUnique u diff --git a/src/interp/define.boot b/src/interp/define.boot index 19fe2bd1..297d4d57 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -1415,7 +1415,7 @@ doIt(item,$predl) == $GENNO: local:= 0 item is ['SEQ,:l,['exit,1,x]] => item.first := "PROGN" - RPLACA(LASTNODE item,x) + lastNode(item).first := x for it1 in rest item repeat $e:= compSingleCapsuleItem(it1,$predl,$e) --This will RPLAC as appropriate isDomainForm(item,$e) => @@ -1472,11 +1472,11 @@ doIt(item,$predl) == [.,.,$e]:= t:= compOrCroak(item,$EmptyMode,$e) item.first := "CodeDefine" --Note that DescendCode, in CodeDefine, is looking for this - RPLACD(second item,[$signatureOfForm]) + second(item).rest := [$signatureOfForm] --This is how the signature is updated for buildFunctor to recognise functionPart:= ['dispatchFunction,t.expr] - RPLACA(CDDR item,functionPart) - RPLACD(CDDR item,nil) + item.rest.rest.first := functionPart + item.rest.rest.rest := nil u:= compOrCroak(item,$EmptyMode,$e) => ([code,.,$e]:= u; item.first := first code; item.rest := rest code) systemErrorHere ["doIt", item] diff --git a/src/interp/dq.boot b/src/interp/dq.boot index 7dbde640..103b9b54 100644 --- a/src/interp/dq.boot +++ b/src/interp/dq.boot @@ -57,7 +57,7 @@ dqAppend(x,y)== else if null y then x else - RPLACD (rest x,first y) + x.rest.rest := first y x.rest := rest y x @@ -76,6 +76,6 @@ dqAddAppend(x,y)== else if null y then nil else - RPLACD (rest x,first y) + x.rest.rest := first y x.rest := rest y x diff --git a/src/interp/functor.boot b/src/interp/functor.boot index 31564fa8..a52b6347 100644 --- a/src/interp/functor.boot +++ b/src/interp/functor.boot @@ -144,7 +144,7 @@ PacPrint v == Sublis:= [[keyItem u,:name],:Sublis] $Sublis:= [first Sublis,:$Sublis] $WhereList:= [[name,:u],:$WhereList] - RPLACD(vv.j,name) + vv.j.rest := name PRETTYPRINT vv DomainPrintSubst(item,Sublis) == diff --git a/src/interp/g-cndata.boot b/src/interp/g-cndata.boot index 0d1771b6..8717259c 100644 --- a/src/interp/g-cndata.boot +++ b/src/interp/g-cndata.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2009, Gabriel Dos Reis. +-- Copyright (C) 2007-2010, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -65,7 +65,7 @@ getCDTEntry(info,isName) == putConstructorProperty(name,prop,val) == null (entry := getCDTEntry(name,true)) => NIL - RPLACD(rest entry,PUTALIST(CDDR entry,prop,val)) + entry.rest.rest := PUTALIST(CDDR entry,prop,val) true attribute? name == diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 73b252f8..a65095d2 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -246,7 +246,7 @@ optMkRecord ["mkRecord",:u] == optCond (x is ['COND,:l]) == if l is [a,[aa,b]] and TruthP aa and b is ["COND",:c] then - RPLACD(rest x,c) + x.rest.rest := c if l is [[p1,:c1],[p2,:c2],:.] then if (p1 is ["NOT",=p2]) or (p2 is ["NOT",=p1]) then l:=[[p1,:c1],['(QUOTE T),:c2]] diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 0e72381a..35fd21f4 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -353,7 +353,7 @@ PUTALIST(alist,prop,val) == -- else we fall over Lucid's read-only storage feature again pair.rest := val alist - QRPLACD(LASTPAIR alist,[[prop,:val]]) + LASTPAIR(alist).rest := [[prop,:val]] alist REMALIST(alist,prop) == diff --git a/src/interp/htsetvar.boot b/src/interp/htsetvar.boot index ab5e9a6b..f788a852 100644 --- a/src/interp/htsetvar.boot +++ b/src/interp/htsetvar.boot @@ -340,7 +340,7 @@ htMakePathKey path == fn(STRCONC(a,'".",PNAME first b),rest b) htMarkTree(tree,n) == - RPLACD(LASTTAIL tree,n) + LASTTAIL(tree).rest := n for branch in tree repeat branch.3 = 'TREE => htMarkTree(branch.5,n + 1) diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot index a42cd712..bdb5c654 100644 --- a/src/interp/i-output.boot +++ b/src/interp/i-output.boot @@ -1066,7 +1066,7 @@ putWidth u == 1 argsWidth:= l is [firstArg,:restArg] => - RPLACA(rest u,putWidth firstArg) + u.rest.first := putWidth firstArg for y in tails restArg repeat y.first := putWidth first y widthFirstArg:= @@ -2336,10 +2336,10 @@ bracketagglist(u, start, linelength, tchr, open, close) == nil or s = -1 => (nextu := nil) EQ(lastx, u) => ((nextu := rest u); u.rest := nil) - true => ((nextu := lastx); RPLACD(PREDECESSOR(lastx, u), nil)) + true => ((nextu := lastx); PREDECESSOR(lastx, u).rest := nil) for x in tails u repeat x.first := LIST('CONCAT, first x, tchr) - if null nextu then RPLACA(CDDR LAST u, close) + if null nextu then LAST(u).rest.rest.first := close x := ASSOCIATER('CONCAT, CONS(ichr, u)) charybdis(ASSOCIATER('CONCAT, u), start, linelength) if $collectOutput then TERPRI $algebraOutputStream diff --git a/src/interp/i-resolv.boot b/src/interp/i-resolv.boot index 111e430e..78c61f88 100644 --- a/src/interp/i-resolv.boot +++ b/src/interp/i-resolv.boot @@ -750,7 +750,7 @@ constructM(c,A) == replaceLast(A,t) == -- replaces the last element of the nonempty list A by t (constructively - nreverse RPLACA(reverse A,t) + nreverse (reverse(A).first := t) destructT(functor)== -- provides a list of booleans, which indicate whether the arguments diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot index 300f181b..6312649b 100644 --- a/src/interp/i-spec1.boot +++ b/src/interp/i-spec1.boot @@ -333,7 +333,7 @@ userDefinedCase(t is [op, lhs, rhs]) == putMode(r, m) putValue(r, objNewWrap(MKQ rhs,m)) putModeSet(r, [m]) - RPLACD(cdr t, [r]) -- fix up contained for rhs. + x.rest.rest := [r] -- fix up contained for rhs. nil -- tell bottomUp to continue. upcase t == diff --git a/src/interp/i-toplev.boot b/src/interp/i-toplev.boot index 86ee6ebc..fd2a5695 100644 --- a/src/interp/i-toplev.boot +++ b/src/interp/i-toplev.boot @@ -371,7 +371,7 @@ setCurrentLine s == null $currentLine => s string? $currentLine => [$currentLine, :(string? s => [s]; s)] - RPLACD(lastNode $currentLine, (string? s => [s]; s)) + lastNode($currentLine).rest := (string? s => [s]; s) $currentLine diff --git a/src/interp/interop.boot b/src/interp/interop.boot index cf26b9d4..b48cd2c5 100644 --- a/src/interp/interop.boot +++ b/src/interp/interop.boot @@ -204,7 +204,7 @@ oldAxiomCategoryLookupExport(catenv, self, op, sig, box, env) == null(pack) => nil if not VECP pack then pack:=apply(pack, CONS(self, rest catform)) - RPLACA(CDDR catenv, pack) + catenv.rest.rest.first := pack fun := basicLookup(op, sig, pack, self) => [fun] nil diff --git a/src/interp/mark.boot b/src/interp/mark.boot index f67c7755..e3c58efd 100644 --- a/src/interp/mark.boot +++ b/src/interp/mark.boot @@ -836,7 +836,7 @@ markFinish(body,T) == SETQ($e,T.env) --if $categoryTranForm then SETQ($t,$categoryTranForm . 1) atom CDDR T => systemError() - RPLACA(CDDR T,$EmptyEnvironment) + T.rest.rest.first := $EmptyEnvironment chk(CDDR T,101) markFinish1() T diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot index b0848142..fdcbcd86 100644 --- a/src/interp/nruncomp.boot +++ b/src/interp/nruncomp.boot @@ -781,7 +781,7 @@ NRTputInHead bod == NRTputInTail rest bod --NOTE: args = COPY of rest bod -- The following test allows function-returning expressions fn is [elt,dom,ind] and not (dom='$) and elt in '(getShellEntry ELT QREFELT CONST) => - k:= NRTassocIndex dom => RPLACA(LASTNODE bod,[$elt,'_$,k]) + k:= NRTassocIndex dom => lastNode(bod).first := [$elt,'_$,k] nil NRTputInHead fn bod diff --git a/src/interp/slam.boot b/src/interp/slam.boot index f458bcb4..b3d2a2e3 100644 --- a/src/interp/slam.boot +++ b/src/interp/slam.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2009, Gabriel Dos Reis. +-- Copyright (C) 2007-2010, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -146,7 +146,7 @@ hashCount table == mkCircularAlist n == l:= [[$failed,:$failed] for i in 1..n] - RPLACD(LASTNODE l,l) + lastNode(l).rest := l countCircularAlist(cal,n) == +/[nodeCount x for x in cal for i in 1..n] diff --git a/src/interp/topics.boot b/src/interp/topics.boot index d47f41fe..ef413b3e 100644 --- a/src/interp/topics.boot +++ b/src/interp/topics.boot @@ -180,7 +180,7 @@ addTopic2Documentation(con,docAlist) == [op,:pairlist] := x code := LASSOC(op,alist) or 0 for sigDoc in pairlist repeat - sigDoc is [.,.] => RPLACD(rest sigDoc,code) + sigDoc is [.,.] => sigDoc.rest.rest := code systemError sigDoc docAlist @@ -239,7 +239,7 @@ transferClassCodes(conform,opAlist) == transferCodeCon(con,opAlist) == for pair in getConstructorDocumentationFromDB con | FIXP (code := myLastAtom pair) repeat - u := ASSOC(QCAR pair,opAlist) => RPLACD(LASTNODE u,code) + u := ASSOC(QCAR pair,opAlist) => lastNode(u).rest := code --======================================================================= -- Filter Operation by Topic diff --git a/src/interp/wi2.boot b/src/interp/wi2.boot index c08ad9c7..ecf59422 100644 --- a/src/interp/wi2.boot +++ b/src/interp/wi2.boot @@ -1012,7 +1012,7 @@ doItIf(item is [.,p,x,y],$predl,$e) == doItSeq item == ['SEQ,:l,['exit,1,x]] := item item.first := "PROGN" - RPLACA(LASTNODE item,x) + lastNode(item).first := x for it1 in rest item repeat $e:= compSingleCapsuleItem(it1,$predl,$e) doItDomain item == @@ -1079,7 +1079,7 @@ doItDef item == chk(item,3) item.first := "CodeDefine" --Note that DescendCode, in CodeDefine, is looking for this - RPLACD(second item,[$signatureOfForm]) + second(item).rest := [$signatureOfForm] chk(item,4) --This is how the signature is updated for buildFunctor to recognise --+ |