diff options
Diffstat (limited to 'src/interp/compiler.boot')
-rw-r--r-- | src/interp/compiler.boot | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 1957d753..15edaf3c 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) @@ -367,7 +367,7 @@ compWithMappingMode(x,m is ["Mapping",m',:sl],oldE) == [uu,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 @@ -618,7 +618,7 @@ compFormWithModemap(form,m,e,modemap) == -- first is a full tag, as placed by getInverseEnvironment -- second is what getSuccessEnvironment will place there ["CDR",z] - ["call",:form'] + ["%Call",:form'] e':= Tl => (LAST Tl).env e @@ -702,7 +702,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] @@ -1154,7 +1154,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 @@ -1481,8 +1481,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 @@ -1751,7 +1751,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:= @@ -1763,11 +1763,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 @@ -1917,7 +1917,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 @@ -2304,7 +2304,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 |