aboutsummaryrefslogtreecommitdiff
path: root/src/interp/nruncomp.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/nruncomp.boot')
-rw-r--r--src/interp/nruncomp.boot28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index 7bd5e7de..39fd59f9 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -63,10 +63,10 @@ $NRTaddForm := nil
$NRTderivedTargetIfTrue := false
$killOptimizeIfTrue := false
-NRTaddDeltaCode() ==
+NRTaddDeltaCode db ==
--NOTES: This function is called from buildFunctor to initially
--- fill slots in $template. The $template so created is stored in the
--- NRLIB. On load, makeDomainTemplate is called on this $template to
+-- fill slots in dbTemplate. The dbTemplate so created is stored in the
+-- NRLIB. On load, makeDomainTemplate is called on this dbTemplate to
-- create a template which becomes slot 0 of the infovec for the constructor.
--The template has 6 kinds of entries:
-- (1) formal arguments and local variables, represented by (QUOTE <entry>)
@@ -83,8 +83,8 @@ NRTaddDeltaCode() ==
for i in $NRTbase.. for item in reverse $NRTdeltaList
for compItem in reverse $NRTdeltaListComp
| null vectorRef(kvec,i) repeat
- vectorRef($template,i) := deltaTran(item,compItem)
- vectorRef($template,5) :=
+ domainRef(dbTemplate db,i) := deltaTran(item,compItem)
+ domainRef(dbTemplate db,5) :=
$NRTaddForm =>
$NRTaddForm is ["%Comma",:y] => reverse! y
NRTencode($NRTaddForm,$addForm)
@@ -354,23 +354,23 @@ consDomainForm(x,dc) ==
MKQ x
-++ Called by buildFunctor fill $template slots with names
+++ Called by buildFunctor fill dbTemplate slots with names
++ of compiled functions
-NRTdescendCodeTran(u,condList) ==
+NRTdescendCodeTran(db,u,condList) ==
null u => nil
u is ['%list] => nil
u is ['%store,['%tref,.,i],a] =>
null condList and a is ['CONS,fn,:.] =>
u.first := '%list
u.rest := nil
- $template.i :=
+ domainRef(dbTemplate db,i) :=
fn is 'IDENTITY => a
fn is ['dispatchFunction,fn'] => fn'
fn
nil --code for this will be generated by the instantiator
u is ['%when,:c] =>
- for [pred,:y] in c|y repeat NRTdescendCodeTran(first y,[pred,:condList])
- u is ['PROGN,:c] => for x in c repeat NRTdescendCodeTran(x,condList)
+ for [pred,:y] in c|y repeat NRTdescendCodeTran(db,first y,[pred,:condList])
+ u is ['PROGN,:c] => for x in c repeat NRTdescendCodeTran(db,x,condList)
nil
++ Remove useless statements from the elaboration `form' of
@@ -500,7 +500,7 @@ buildFunctor(db,sig,code,$locals,$e) ==
for i in 0..4 repeat
vectorRef(domainShell,i) := vectorRef($domainShell,i)
--we will clobber elements; copy since $domainShell may be a cached vector
- $template := newShell($NRTbase + $NRTdeltaLength)
+ dbTemplate(db) := newShell($NRTbase + $NRTdeltaLength)
$SetFunctions := newShell # domainShell
$catvecList :=
[domainShell,:[emptyVector for u in categoryAncestors domainShell]]
@@ -516,9 +516,9 @@ buildFunctor(db,sig,code,$locals,$e) ==
makePredicateBitVector(db,[:ASSOCRIGHT $condAlist,:$NRTslot1PredicateList],$e)
storeOperationCode := DescendCode(db,code,true,nil)
- NRTaddDeltaCode()
- storeOperationCode:= NRTputInLocalReferences storeOperationCode
- NRTdescendCodeTran(storeOperationCode,nil) --side effects storeOperationCode
+ NRTaddDeltaCode db
+ storeOperationCode := NRTputInLocalReferences storeOperationCode
+ NRTdescendCodeTran(db,storeOperationCode,nil) --side effects storeOperationCode
codePart2:=
argStuffCode :=
[['%store,['%tref,'$,i],v] for i in $NRTbase.. for v in $FormalMapVariableList