aboutsummaryrefslogtreecommitdiff
path: root/src/interp/functor.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-02-24 18:06:28 +0000
committerdos-reis <gdr@axiomatics.org>2011-02-24 18:06:28 +0000
commit1f68c8c90efaf97535bfc1bfc99cad368213870e (patch)
treeb58a560a5e83f5dc73b3e5443e3a8bcabf5d0f19 /src/interp/functor.boot
parent04608dfa938b011bce60031e7eccfb6cb67c2ced (diff)
downloadopen-axiom-1f68c8c90efaf97535bfc1bfc99cad368213870e.tar.gz
* interp/sys-macros.lisp (shellEntry): New.
* interp/g-util.boot (setShellEntry): Remove. * interp/compiler.boot: Use %store to %tref forms instead of setHSellEntry. * interp/define.boot: Likewise. * interp/functor.boot: Likewise. * interp/nruncomp.boot: Likewise. * interp/nrunfast.boot: Likewise. * interp/showimp.boot: Likewise. * interp/c-util.boot (isSimple): Tidy. (isSideEffectFree): Likewise. (updateCapsuleDirectory): Likewise.
Diffstat (limited to 'src/interp/functor.boot')
-rw-r--r--src/interp/functor.boot32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/interp/functor.boot b/src/interp/functor.boot
index c75d34da..213fc733 100644
--- a/src/interp/functor.boot
+++ b/src/interp/functor.boot
@@ -303,7 +303,7 @@ setVector0(catNames,definition) ==
--to the definition of the category
definition:= mkTypeForm definition
for u in catNames repeat
- definition:= ["setShellEntry",u,0,definition]
+ definition:= ['%store,['%tref,u,0],definition]
definition
setVector12 args ==
@@ -363,7 +363,7 @@ setVector3(name,instantiator) ==
--element 3 is data structure representing category
--returns a single LISP statement
instantiator is ['DomainSubstitutionMacro,.,body] => setVector3(name,body)
- ["setShellEntry",name,3,mkTypeForm instantiator]
+ ['%store,['%tref,name,3],mkTypeForm instantiator]
mkDomainFormer x ==
if x is ['DomainSubstitutionMacro,parms,body] then
@@ -397,7 +397,7 @@ setVector5(catNames,locals) ==
else generated:= [[u,uname],:generated]
[(w:= mkVectorWithDeferral(first u,second u);
for v in rest u repeat
- w:= ["setShellEntry",v,5,w];
+ w:= ['%store,['%tref,v,5],w];
w)
for u in generated]
@@ -408,10 +408,7 @@ mkVectorWithDeferral(objects,tag) ==
['%vector,:
[if CONTAINED('$,u) then -- It's not safe to instantiate this now
$ConstantAssignments:=[:$ConstantAssignments,
- ["setShellEntry",
- ["getShellEntry", tag, 5],
- count,
- u]]
+ ['%store,['%tref,['%tref,tag,5],count],u]]
[]
else u
for u in objects for count in 0..]]
@@ -463,7 +460,7 @@ DescendCodeAdd1(base,flag,target,formalArgs,formalArgModes) ==
code.op in '(getShellEntry ELT) =>
copyvec.(third code):=union(copyvec.(third code), sofar)
true
- code is ['setShellEntry,name,number,u'] =>
+ code is ['%store,['%tref,name,number],u'] =>
update(u',copyvec,[[name,:number],:sofar])
for i in 6..n repeat
for u in copyvec.i repeat
@@ -482,7 +479,7 @@ DescendCodeAdd1(base,flag,target,formalArgs,formalArgModes) ==
v:=["getShellEntry",instantiatedBase,i]
for u in copyvec.i repeat
[name,:count]:=u
- v:=["setShellEntry",name,count,v]
+ v:=['%store,['%tref,name,count],v]
code:=[v,:code]
[["%LET",instantiatedBase,base],:code]
@@ -528,7 +525,7 @@ DescendCode(code,flag,viewAssoc,EnvToPass) ==
u:=member(name,$locals) =>
CONTAINED('$,body) and isDomainForm(body,$e) =>
--instantiate domains which depend on $ after constants are set
- code:=["setShellEntry",["getShellEntry",'$,5],#$locals-#u,code]
+ code:=['%store,['%tref,['%tref,'$,5],#$locals-#u],code]
$epilogue:=
TruthP flag => [code,:$epilogue]
[['%when,[ProcessCond flag,code]],:$epilogue]
@@ -542,12 +539,12 @@ DescendCode(code,flag,viewAssoc,EnvToPass) ==
u:= LASSOC(dom,viewAssoc) => ['getDomainView,dom,u]
dom
body:= ['CONS,implem,dom]
- u:= SetFunctionSlots(sig,body,flag,'original)
+ u := SetFunctionSlots(sig,body,flag,'original)
-- ??? We do not resolve default definitions, yet.
if not $insideCategoryPackageIfTrue then
- updateCapsuleDirectory(rest u, flag)
+ updateCapsuleDirectory([second(u).args,third u],flag)
ConstantCreator u =>
- if flag ~=true then u:= ['%when,[ProcessCond flag,u]]
+ if flag ~= true then u:= ['%when,[ProcessCond flag,u]]
$ConstantAssignments:= [u,:$ConstantAssignments]
nil
u
@@ -557,14 +554,13 @@ DescendCode(code,flag,viewAssoc,EnvToPass) ==
code is ['devaluate,:.] => nil
code is ['MDEF,:.] => nil
code is ['%call,:.] => code
- code is ["setShellEntry",:.] => code -- can be generated by doItIf
+ code is ['%store,:.] => code -- can be generated by doItIf
stackWarning('"unknown Functor code: %1 ",[code])
code
ConstantCreator u ==
null u => false
- u is ['setShellEntry,.,.,u'] =>
- ConstantCreator u'
+ u is ['%store,['%tref,.,.],u'] => ConstantCreator u'
u is ['CONS,:.] => false
true
@@ -593,7 +589,7 @@ SetFunctionSlots(sig,body,flag,mode) == --mode is either "original" or "adding"
catImplem is [q,.,index] and (q='ELT or q='CONST) =>
if q is 'CONST and body is ['CONS,a,b] then
body := ['CONS,'IDENTITY,['FUNCALL,a,b]]
- body:= ['setShellEntry,'$,index,body]
+ body:= ['%store,['%tref,'$,index],body]
not vector? $SetFunctions => nil --packages don't set it
if TruthP flag then -- unconditionally defined function
u.index := true
@@ -608,7 +604,7 @@ SetFunctionSlots(sig,body,flag,mode) == --mode is either "original" or "adding"
truename is [fn,:.] and fn in '(Zero One) => nil --hack by RDJ 8/90
body := SetFunctionSlots(truename,body,nil,mode)
keyedSystemError("S2OR0002",[catImplem])
- body is ['setShellEntry,:.] => body
+ body is ['%store,:.] => body
nil
LookUpSigSlots(sig,siglist) ==