diff options
author | dos-reis <gdr@axiomatics.org> | 2010-06-24 05:20:27 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-06-24 05:20:27 +0000 |
commit | 68639c56f45afe2df802235f50b4ab8b3886dca4 (patch) | |
tree | 240ecbb8391f60cf2a008f3a22031b3751829f5d | |
parent | dac28fb009d9c27cb8e0f9e453feb8a630b7e145 (diff) | |
download | open-axiom-68639c56f45afe2df802235f50b4ab8b3886dca4.tar.gz |
* interp/c-util.boot: Cleanup.
* interp/compiler.boot: Likewise.
* interp/functor.boot: Likewise.
* interp/g-opt.boot: Likewise.
* interp/mark.boot: Likewise.
* interp/nrunfast.boot: Likewise.
* interp/wi1.boot: Likewise.
* interp/wi2.boot: Likewise.
-rw-r--r-- | src/ChangeLog | 11 | ||||
-rw-r--r-- | src/interp/c-util.boot | 2 | ||||
-rw-r--r-- | src/interp/compiler.boot | 28 | ||||
-rw-r--r-- | src/interp/functor.boot | 4 | ||||
-rw-r--r-- | src/interp/g-opt.boot | 6 | ||||
-rw-r--r-- | src/interp/mark.boot | 12 | ||||
-rw-r--r-- | src/interp/nrunfast.boot | 2 | ||||
-rw-r--r-- | src/interp/wi1.boot | 8 | ||||
-rw-r--r-- | src/interp/wi2.boot | 2 |
9 files changed, 43 insertions, 32 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 58568c3a..751d31bc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2010-06-24 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/c-util.boot: Cleanup. + * interp/compiler.boot: Likewise. + * interp/functor.boot: Likewise. + * interp/g-opt.boot: Likewise. + * interp/mark.boot: Likewise. + * interp/nrunfast.boot: Likewise. + * interp/wi1.boot: Likewise. + * interp/wi2.boot: Likewise. + 2010-06-23 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/sys-constants.boot ($SystemInlinableConstructorNames): diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index c2c55b14..dc3ba3af 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -1510,7 +1510,7 @@ il2OldForm x == e.first := op ilTransformInsns rest e e - ["%Call",:ilTransformInsns e] + ['%call,:ilTransformInsns e] otherwise => ilTransformInsns x ++ Subroutines of il2OldForm to walk sequence of IL instructions. diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index d5febb66..0603ba9a 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -236,8 +236,8 @@ applyMapping([op,:argl],m,e,ml) == atom op and not(op in $formalArgList) and null (u := get(op,"value",e)) => emitLocalCallInsn(op,argl',e) -- Compiler synthetized operators are inline. - u ~= nil and u.expr is ["XLAM",:.] => ["%Call",u.expr,:argl'] - ["%Call",['applyFun,op],:argl'] + u ~= nil and u.expr is ["XLAM",:.] => ['%call,u.expr,:argl'] + ['%call,['applyFun,op],:argl'] pairlis := pairList($FormalMapVariableList,argl') convert([form,SUBLIS(pairlis,first ml),e],m) @@ -260,7 +260,7 @@ applyMapping([op,:argl],m,e,ml) == -- not MEMQ(op,$formalArgList) and atom op => -- [op',:argl',"$"] where -- op':= INTERN strconc(STRINGIMAGE $prefix,";",STRINGIMAGE op) --- ["%Call",["applyFun",op],:argl'] +-- ['%call,["applyFun",op],:argl'] -- pairlis:= [[v,:a] for a in argl' for v in $FormalMapVariableList] -- convert([form,SUBLIS(pairlis,first ml),e],m) @@ -374,7 +374,7 @@ compWithMappingMode(x,m is ["Mapping",m',:sl],oldE) == [finishLambdaExpression(fun,e),m,oldE] extractCodeAndConstructTriple(u, m, oldE) == - u is ["%Call",fn,:.] => + u is ['%call,fn,:.] => if fn is ["applyFun",a] then fn := a [fn,m,oldE] [op,:.,env] := u @@ -625,7 +625,7 @@ compFormWithModemap(form,m,e,modemap) == -- first is a full tag, as placed by getInverseEnvironment -- second is what getSuccessEnvironment will place there ['%tail,z] - ["%Call",:form'] + ['%call,:form'] e':= Tl => (LAST Tl).env e @@ -709,7 +709,7 @@ compApplication(op,argl,m,T) == not (MEMQ(op,$formalArgList) or MEMQ(T.expr,$formalArgList)) and null get(T.expr,"value",e) => emitLocalCallInsn(T.expr,[a.expr for a in argTl],e) - ["%Call", ['applyFun, T.expr], :[a.expr for a in argTl]] + ['%call, ['applyFun, T.expr], :[a.expr for a in argTl]] coerce([form, retm, e],resolve(retm,m)) op = 'elt => nil eltForm := ['elt, op, :argl] @@ -1165,7 +1165,7 @@ compElt(form,m,E) == [sig,[pred,val]]:= modemap #sig ~= 2 and val isnt ["CONST",:.] => nil val := genDeltaEntry([opOf anOp,:modemap],E) - convert([["%Call",val],second sig,E], m) + convert([['%call,val],second sig,E], m) compForm(form,m,E) --% HAS @@ -1497,8 +1497,8 @@ compCase1(x,m,e) == fn := genDeltaEntry(["case",:fn],e) -- user-defined `case' functions really are binary, as opposed to -- the compiler-synthetized versions for Union instances. - not isUnionMode(m',e') => [["%Call",fn,x',MKQ m],$Boolean,e'] - [["%Call",fn,x'],$Boolean,e'] + not isUnionMode(m',e') => [['%call,fn,x',MKQ m],$Boolean,e'] + [['%call,fn,x'],$Boolean,e'] ++ For `case' operation implemented in library, the second operand @@ -1767,7 +1767,7 @@ coerceByModemap([x,m,e],m') == --mm:= (or/[mm for (mm:=[.,[cond,.]]) in u | cond=true]) or return nil mm:=first u -- patch for non-trival conditons fn := genDeltaEntry(['coerce,:mm],e) - [["%Call",fn,x],m',e] + [['%call,fn,x],m',e] autoCoerceByModemap([x,source,e],target) == u:= @@ -1779,11 +1779,11 @@ autoCoerceByModemap([x,source,e],target) == source is ["Union",:l] and member(target,l) => (y:= get(x,"condition",e)) and (or/[u is ["case",., =target] for u in y]) - => [["%Call",genDeltaEntry(["autoCoerce", :fn],e),x],target,e] + => [['%call,genDeltaEntry(["autoCoerce", :fn],e),x],target,e] x="$fromCoerceable$" => nil stackMessage('"cannot coerce %1b of mode %2pb to %3pb without a case statement", [x,source,target]) - [["%Call",genDeltaEntry(["autoCoerce", :fn],e),x],target,e] + [['%call,genDeltaEntry(["autoCoerce", :fn],e),x],target,e] ++ Compile a comma separated expression list. These typically are @@ -1933,7 +1933,7 @@ compResolveCall(op,argTs,m,$e) == tryMM() == not coerceable(mm.mmTarget,m,$e) =>nil compViableModemap(op,argTs,mm,$e) isnt [f,Ts] => nil - coerce([["%Call",f,:[T.expr for T in Ts]],mm.mmTarget,$e],m) + coerce([['%call,f,:[T.expr for T in Ts]],mm.mmTarget,$e],m) #outcomes ~= 1 => nil first outcomes @@ -2351,7 +2351,7 @@ compRepeatOrCollect(form,m,e) == -- for (modemap:= [map,cexpr]) in getModemapList("construct",1,e) | map is [ -- .,t,s] and modeEqual(t,target) and modeEqual(s,source)] or return nil -- fn:= (or/[selfn for [cond,selfn] in u | cond=true]) or return nil --- [["%Call",fn,x],target,e] +-- [['%call,fn,x],target,e] listOrVectorElementMode x == x is [a,b,:.] and member(a,'(PrimitiveArray Vector List)) => b diff --git a/src/interp/functor.boot b/src/interp/functor.boot index f2c028c0..f79a8fb2 100644 --- a/src/interp/functor.boot +++ b/src/interp/functor.boot @@ -388,7 +388,7 @@ mkTypeForm x == ['LIST,MKQ 'Record,:[mkTypeForm y for y in argl]] x is ['Join,:argl] => ['LIST,MKQ 'Join,:[mkTypeForm y for y in argl]] - x is ["%Call",:argl] => ['MKQ, optCall x] + x is ['%call,:argl] => ['MKQ, optCall x] --The previous line added JHD/BMT 20/3/84 --Necessary for proper compilation of DPOLY SPAD x is [op] => MKQ x @@ -625,7 +625,7 @@ DescendCode(code,flag,viewAssoc,EnvToPass) == code is ['LIST,:.] => nil code is ['devaluate,:.] => nil code is ['MDEF,:.] => nil - code is ["%Call",:.] => code + code is ['%call,:.] => code code is ["setShellEntry",:.] => code -- can be generated by doItIf code is ['SETELT,:.] => systemErrorHere ["DescendCode",code] code is ['QSETREFV,:.] => systemErrorHere ["DescendCode",code] diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index a78abadd..7187fe42 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -221,10 +221,10 @@ optSPADCALL(form is ['SPADCALL,:argl]) == null $InteractiveMode => form -- last arg is function/env, but may be a form argl is [:argl,fun] and fun is ["ELT",dom,slot] => - optCall ["%Call",['ELT,dom,slot],:argl] + optCall ['%call,['ELT,dom,slot],:argl] form -optCall (x is ["%Call",:u]) == +optCall (x is ['%call,:u]) == -- destructively optimizes this new x x:= optimize [u] -- next should happen only as result of macro expansion @@ -667,7 +667,7 @@ lispize x == first optimize [x] --% optimizer hash table -for x in '( (%Call optCall) _ +for x in '( (%call optCall) _ (SEQ optSEQ)_ (LET optLET)_ (LET_* optLET_*)_ diff --git a/src/interp/mark.boot b/src/interp/mark.boot index 00d66e9b..07a670c0 100644 --- a/src/interp/mark.boot +++ b/src/interp/mark.boot @@ -152,7 +152,7 @@ markAutoWas(x,T) == markCallCoerce(x,m,T) == tcheck T - [mkWi("%Call",'WI,["::",x,m], T.expr),: rest T] + [mkWi('%call,'WI,["::",x,m], T.expr),: rest T] markCoerceByModemap(x,source,target,T, killColonColon?) == tcheck T @@ -263,14 +263,14 @@ markRepeat(form, T) == [mkWi("repeat", 'WI,form,first T), :rest T] markTran(form,form',[dc,:sig],env) == --from compElt/compFormWithModemap - dc ~= 'Rep or not ('_$ in sig) => mkWi('markTran,'WI,form,["%Call",:form']) + dc ~= 'Rep or not ('_$ in sig) => mkWi('markTran,'WI,form,['%call,:form']) argl := [u for t in rest sig for arg in rest form'] where u() == t='_$ => argSource := getSourceWI arg IDENTP argSource and getmode(argSource,env) = 'Rep => arg markRepper('rep,arg) arg - form' := ["%Call",first form',:argl] + form' := ['%call,first form',:argl] wi := mkWi('markTran,'WI,form,form') first sig = '_$ => markRepper('per,wi) wi @@ -681,7 +681,7 @@ markPaths(x,y,s) == --x < y; find location s of x in y (initially s=nil) nil)) => markCons(p,s) -- x is ['exit,a,b] and y is ['exit,a,c] and (p := mymy markPathsEqual(b,c)) => -- markCons(p,s) - y is ["%Call",:r] => markPaths(x,r,s) --for loops + y is ['%call,:r] => markPaths(x,r,s) --for loops y is [fn,m,y1] and fn in '(PART CATCH THROW) => markPaths(x,y1,s) or append/[markPaths(x,u,markCons(i,s)) for u in y1 for i in 0..] append/[markPaths(x,u,markCons(i,s)) for u in y for i in 0..] @@ -697,7 +697,7 @@ markPathsEqual(x,y) == y is [fn,.,z] and fn in '(PART CATCH THROW) and markPathsEqual(x,z) => true y is ["%LET",a,b] and GENSYMP a and markPathsEqual(x,b) => true y is ['IF,a,b,:.] and GENSYMP a => markPathsEqual(x,b) -------> ??? - y is ["%Call",:r] => markPathsEqual(IFCDR x,r) + y is ['%call,:r] => markPathsEqual(IFCDR x,r) x is ['REDUCE,.,.,c,:.] and c is ['COLLECT,:u] and y is ['PROGN,.,repeet,:.] and repeet is ['REPEAT,:v] => markPathsEqual(u,v) atom y or atom x => @@ -1389,7 +1389,7 @@ mkPaths(x,y) == --x < y; find location s of x in y (initially s=nil) x is [op, :u] and op in '(LIST VECTOR) and y is ['construct,:v] and markPathsEqual(['construct,:u],y) => [y] (y is ["%LET",a,b] or y is ['IF,a,b,:.]) and GENSYMP a and markPathsEqual(x,b) => [y] - y is ["%Call",:r] => + y is ['%call,:r] => -- markPathsEqual(x,y1) => [y] mkPaths(x,r) => [y] y is ['PART,.,y1] => mkPaths(x,y1) diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot index 86b9751a..870db913 100644 --- a/src/interp/nrunfast.boot +++ b/src/interp/nrunfast.boot @@ -478,7 +478,7 @@ lazyMatch(source,lazyt,dollar,domain) == string? source and lazyt is ['QUOTE,=source] => true NUMBERP source => lazyt is ['_#, slotNum] => source = #(domain.slotNum) - lazyt is ["%Call",'LENGTH, slotNum] => source = #(domain.slotNum) + lazyt is ['%call,'LENGTH, slotNum] => source = #(domain.slotNum) nil -- A hideous hack on the same lines as the previous four lines JHD/MCD diff --git a/src/interp/wi1.boot b/src/interp/wi1.boot index 7c47213c..e67cc234 100644 --- a/src/interp/wi1.boot +++ b/src/interp/wi1.boot @@ -358,7 +358,7 @@ compAtom(x,m,e) == extractCodeAndConstructTriple(u, m, oldE) == u := markKillAll u - u is ["%Call",fn,:.] => + u is ['%call,fn,:.] => if fn is ["applyFun",a] then fn := a [fn,m,oldE] [op,:.,env] := u @@ -932,7 +932,7 @@ coerceByModemap([x,m,e],m') == and (modeEqual(s,m) or isSubset(m,s,e))] or return nil mm:=first u -- patch for non-trival conditons fn := genDeltaEntry(['coerce,:mm],e) - T := [["%Call",fn,x],m',e] + T := [['%call,fn,x],m',e] markCoerceByModemap(x,m,m',markCallCoerce(x,m',T),nil) autoCoerceByModemap([x,source,e],target) == @@ -941,7 +941,7 @@ autoCoerceByModemap([x,source,e],target) == for (modemap:= [map,cexpr]) in getModemapList("autoCoerce",1,e) | map is [ .,t,s] and modeEqual(t,target) and modeEqual(s,source)] or return nil fn:= (or/[selfn for [cond,selfn] in u | cond=true]) or return nil - markCoerceByModemap(x,source,target,[["%Call",fn,x],target,e],true) + markCoerceByModemap(x,source,target,[['%call,fn,x],target,e],true) --====================================================================== -- From compiler.boot @@ -1008,7 +1008,7 @@ compCase1(x,m,e) == x1 := switchMode => markRepper('rep, x) x - markCase(x, tag, markCaseWas(x1,[["%Call",fn,x'],$Boolean,e'])) + markCase(x, tag, markCaseWas(x1,[['%call,fn,x'],$Boolean,e'])) genCaseTag(t,l,n) == l is [x, :l] => diff --git a/src/interp/wi2.boot b/src/interp/wi2.boot index 25cd03d1..451a4b70 100644 --- a/src/interp/wi2.boot +++ b/src/interp/wi2.boot @@ -437,7 +437,7 @@ applyMapping([op,:argl],m,e,ml) == getAbbreviation($op,#rest $form) [op',:argl',"$"] where op':= INTERN strconc(encodeItem nprefix,";",encodeItem op) - ["%Call",['applyFun,op],:argl'] + ['%call,['applyFun,op],:argl'] pairlis := pairList(argl',$FormalMapVariableList) convert([form,SUBLIS(pairlis,first ml),e],m) |