diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 12 | ||||
-rw-r--r-- | src/interp/c-util.boot | 10 | ||||
-rw-r--r-- | src/interp/compiler.boot | 16 | ||||
-rw-r--r-- | src/interp/define.boot | 14 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 6 | ||||
-rw-r--r-- | src/interp/lisplib.boot | 4 | ||||
-rw-r--r-- | src/interp/wi1.boot | 2 |
7 files changed, 37 insertions, 27 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1a452f01..24b08eb3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,14 @@ -2010-05-08 Gabriel Dos Reis <gdr@cse.tamu.edu> +2010-05-08 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/c-util.boot: Replace uses of rplac with explicit + assignments to first and rest fields. + * interp/compiler.boot: Likewise. + * interp/define.boot: Likewise. + * interp/g-opt.boot: Likewise. + * interp/lisplib.boot: Likewise. + * interp/wi1.boot: Likewise. + +2010-05-08 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/wi2.boot: Remove more RPLACA and RPLACD uses. * interp/topics.boot: Likewise. diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index edf903b6..b5bcf197 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -671,7 +671,7 @@ adjExitLevel(x,seqnum,inc) == x is [op,:l] and op in '(SEQ REPEAT COLLECT) => for u in l repeat adjExitLevel(u,seqnum+1,inc) x is ["exit",n,u] => - (adjExitLevel(u,seqnum,inc); seqnum>n => x; rplac(second x,n+inc)) + (adjExitLevel(u,seqnum,inc); seqnum>n => x; x.rest.first := n+inc) x is [op,:l] => for u in l repeat adjExitLevel(u,seqnum,inc) wrapSEQExit l == @@ -1047,7 +1047,7 @@ mutateLETFormWithUnaryFunction(form,fun) == for defs in tails inits repeat def := first defs atom def => nil -- no initializer - rplac(second def, FUNCALL(fun, second def)) + def.rest.first := FUNCALL(fun, second def) for stmts in tails body repeat stmts.first := FUNCALL(fun, first stmts) form @@ -1213,8 +1213,8 @@ foldExportedFunctionReferences defs == body := replaceSimpleFunctions foldSpadcall body form := expandableDefinition?(vars,body) => registerFunctionReplacement(name,form) - rplac(second fun, ["LAM",vars,["DECLARE",["IGNORE",last vars]],body]) - rplac(third lamex,body) + fun.rest.first := ["LAM",vars,["DECLARE",["IGNORE",last vars]],body] + lamex.rest.rest.first := body defs ++ record optimizations permitted at level `level'. @@ -1494,7 +1494,7 @@ mutateToBackendCode x == IDENTP second x => pushLocalVariable second x second x is ["FLUID",:.] => PUSH(CADADR x, $FluidVars) - rplac(second x, CADADR x) + x.rest.first := CADADR x MAPC(function pushLocalVariable, LISTOFATOMS second x) IDENTP u and GET(u,"ILAM") ~= nil => x.first := eval u diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 45b8300d..79735fab 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -1022,16 +1022,16 @@ replaceExitEtc(x,tag,opFlag,opMode) == atom x => nil x is ["QUOTE",:.] => nil x is [ =opFlag,n,t] => - rplac(CAADDR x,replaceExitEtc(CAADDR x,tag,opFlag,opMode)) + third(x).first := replaceExitEtc(CAADDR x,tag,opFlag,opMode) n=0 => $finalEnv:= --bound in compSeq1 and compDefineCapsuleFunction $finalEnv => intersectionEnvironment($finalEnv,t.env) t.env x.first := "THROW" - rplac(second x,tag) - rplac(third x,(convertOrCroak(t,opMode)).expr) - true => rplac(second x,second x-1) + x.rest.first := tag + x.rest.rest.first := convertOrCroak(t,opMode).expr + true => x.rest.first := second x-1 x is [key,n,t] and key in '(TAGGEDreturn TAGGEDexit) => t.first := replaceExitEtc(first t,tag,opFlag,opMode) replaceExitEtc(first x,tag,opFlag,opMode) @@ -1578,7 +1578,7 @@ tryCourtesyCoercion(T,m) == keyedSystemError("S2GE0016",['"coerce", '"function coerce called from the interpreter."]) if $useRepresentationHack then - rplac(second T,MSUBST("$",$Rep,second T)) + T.rest.first := MSUBST("$",$Rep,second T) T':= coerceEasy(T,m) => T' T':= coerceSubset(T,m) => T' T':= coerceHard(T,m) => T' @@ -1719,7 +1719,7 @@ coerceSuperset: (%Triple, %Mode) -> %Maybe %Triple coerceSuperset(T,sub) == sub = "$" => T' := coerceSuperset(T,$functorForm) or return nil - rplac(second T',"$") + T'.rest.first := "$" T' pred := isSubset(sub,T.mode,T.env) => [["%Retract",T.expr,sub,pred],sub,T.env] @@ -2440,7 +2440,7 @@ compPer(["per",x],m,e) == [T.expr,"$",e] coerceSuperset(T,"$") or return nil else - rplac(second T,"$") + T.rest.first := "$" coerce(T,m) ++ Compile the form `rep x' under the mode `m'. @@ -2449,7 +2449,7 @@ compPer(["per",x],m,e) == compRep(["rep",x],m,e) == $useRepresentationHack => nil T := comp(x,"$",e) or return nil - rplac(second T,getRepresentation e or return nil) + T.rest.first := getRepresentation e or return nil coerce(T,m) --% diff --git a/src/interp/define.boot b/src/interp/define.boot index 5e881828..a08df9de 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -1496,17 +1496,17 @@ doItConditionally(item,predl) == item isnt ["IF",p,x,y] => systemErrorHere ["doItConditionally",item] p is ["not",p'] => -- swap branches and recurse for positive interpretation. - rplac(second item,p') - rplac(third item,y) - rplac(fourth item,x) + item.rest.first := p' + item.rest.rest.first := y + item.rest.rest.rest.first := x doItConditionally(item,predl) p is ["and",p',p''] => - rplac(second item,p') - rplac(third item,["IF",p'',x,COPY y]) + item.rest.first := p' + item.rest.rest.first := ["IF",p'',x,COPY y] doItConditionally(item,predl) p is ["or",p',p''] => - rplac(second item, p') - rplac(fourth item, ["IF",p'',COPY x,y]) + item.rest.first := p' + item.rest.rest.rest.first := ["IF",p'',COPY x,y] doItConditionally(item,predl) doItIf(item,predl,$e) diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 10a6eb74..95210266 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -484,8 +484,8 @@ optLET u == nil -- remove this initialization [init] -- otherwwise keep it. null inits => body - rplac(second u,inits) - rplac(third u,body) + u.rest.first := inits + u.rest.rest.first := body -- Avoid initialization forms that may not be floatable. not(and/[isFloatableVMForm init for [.,init] in inits]) => u -- Identity function. @@ -509,7 +509,7 @@ optLET u == not isSimpleVMForm test => continue := false clause.first := SUBLIS(substPairs,test) isSimpleVMForm stmt => - rplac(second clause,SUBLIS(substPairs,stmt)) + clause.rest.first := SUBLIS(substPairs,stmt) continue := false continue => body u diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index 3f2653f9..9e7530a5 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -721,9 +721,9 @@ compDefineExports(form,ops,sig,e) == fixupSigloc entry == [opsig,pred,funsel] := entry if pred ~= 'T then - rplac(second entry, simpBool pred) + entry.rest.first := simpBool pred funsel is [op,a,:.] and op in '(ELT CONST) => - rplac(third entry,[op,a,nil]) + entry.rest.rest.first := [op,a,nil] ops := listSort(function GGREATERP, ops, function first) libName := getConstructorAbbreviation op exportsFile := strconc(STRING libName,'".sig") diff --git a/src/interp/wi1.boot b/src/interp/wi1.boot index bb772e94..d3a43e8f 100644 --- a/src/interp/wi1.boot +++ b/src/interp/wi1.boot @@ -808,7 +808,7 @@ coerce(T,m) == '"function coerce called from the interpreter."]) --==================> changes <====================== --The following line is inappropriate for our needs::: ---rplac(second T,substitute("$",$Rep,second T)) +--T.rest.first := substitute("$",$Rep,second T) T' := coerce0(T,m) => T' T := [T.expr,fullSubstitute("$",$Representation,T.mode),T.env] --==================> changes <====================== |