aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@axiomatics.org>2015-12-26 14:05:28 -0800
committerGabriel Dos Reis <gdr@axiomatics.org>2015-12-26 14:05:28 -0800
commit9c4cf83110b026249e8ab70c3856ea6ac83fa601 (patch)
tree1211ccedbe7d6cb988f43b8987207631925d79d0 /src
parent51d3d7ce39721742aaf673b358b24239be328b45 (diff)
downloadopen-axiom-9c4cf83110b026249e8ab70c3856ea6ac83fa601.tar.gz
Tidy NRTputInLocalReferences.
Diffstat (limited to 'src')
-rw-r--r--src/interp/nruncomp.boot15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index 3f5d0446..99fa085a 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -660,24 +660,21 @@ vectorLocation(db,op,sig,kind) ==
-----------------------------SLOT1 DATABASE------------------------------------
NRTputInLocalReferences(db,bod) ==
- NRTputInHead(db,bod)
-
-NRTputInHead(db,bod) ==
ident? bod and (k := assocIndex(db,dom)) => ['%tref,'$,k]
do
bod isnt [.,:.] => nil
- bod is ['SPADCALL,:args,fn] =>
- NRTputInTail(db,rest bod) --NOTE: args = copyTree of rest bod
+ bod is ['SPADCALL,:.] =>
+ NRTputInTail(db,bod.args)
+ fn := lastItem bod.args
-- The following test allows function-returning expressions
fn is [elt,dom,ind] and dom ~='$ and elt in '(ELT CONST) =>
k := assocIndex(db,dom) => lastNode(bod).first := ['%tref,'_$,k]
- NRTputInHead(db,fn)
bod.op is '%when =>
for cc in bod.args repeat NRTputInTail(db,cc)
bod.op in '(QUOTE CLOSEDFN) => nil
abstraction? bod =>
- bod.absBody := NRTputInHead(db,bod.absBody)
- NRTputInHead(db,first bod)
+ bod.absBody := NRTputInLocalReferences(db,bod.absBody)
+ NRTputInLocalReferences(db,first bod)
NRTputInTail(db,rest bod)
bod
@@ -691,7 +688,7 @@ NRTputInTail(db,x) ==
y.first := ['SPADCHECKELT,'_$,k]
--this reference must check that slot is a vector
nil
- NRTputInHead(db,u)
+ NRTputInLocalReferences(db,u)
x