aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-05-05 07:14:45 +0000
committerdos-reis <gdr@axiomatics.org>2010-05-05 07:14:45 +0000
commitb380d201d353795ee450ac686132f2849db08b88 (patch)
tree846be629856cca99c13a0d4cb77b530139d231ec /src/interp
parentaf88601ee70f6d03a98edb0374d682ce19343293 (diff)
downloadopen-axiom-b380d201d353795ee450ac686132f2849db08b88.tar.gz
* interp/c-util.boot: Change middle-end instruction "call" to
"%Call". * 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.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/c-util.boot2
-rw-r--r--src/interp/compiler.boot28
-rw-r--r--src/interp/functor.boot4
-rw-r--r--src/interp/g-opt.boot6
-rw-r--r--src/interp/mark.boot14
-rw-r--r--src/interp/nrunfast.boot2
-rw-r--r--src/interp/wi1.boot8
-rw-r--r--src/interp/wi2.boot2
8 files changed, 33 insertions, 33 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index efe6852a..58f830df 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -1468,7 +1468,7 @@ il2OldForm x ==
rplac(first e,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 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
diff --git a/src/interp/functor.boot b/src/interp/functor.boot
index 41488141..c1563b72 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 0a3cad37..aedaa218 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -163,10 +163,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
@@ -590,7 +590,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 c031d8ae..63befddd 100644
--- a/src/interp/mark.boot
+++ b/src/interp/mark.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
@@ -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 baf3c218..c51bc2fe 100644
--- a/src/interp/nrunfast.boot
+++ b/src/interp/nrunfast.boot
@@ -478,7 +478,7 @@ lazyMatch(source,lazyt,dollar,domain) ==
STRINGP 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 172c6b2e..c285f4c3 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
@@ -934,7 +934,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) ==
@@ -943,7 +943,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
@@ -1010,7 +1010,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 0e54854f..3b6d1f12 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)