aboutsummaryrefslogtreecommitdiff
path: root/src/interp/nruncomp.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-06-15 01:21:04 +0000
committerdos-reis <gdr@axiomatics.org>2013-06-15 01:21:04 +0000
commita6dfa73ce2833cb63ba83294b775ca305342fd6c (patch)
tree28cde9e5511f50cd0dfd148f6e2f5af03e715d35 /src/interp/nruncomp.boot
parentc35033aee6d48c9abf251594f7567026d5ef9204 (diff)
downloadopen-axiom-a6dfa73ce2833cb63ba83294b775ca305342fd6c.tar.gz
* interp/nruncomp.boot (NRTsetVector4Part1): Add environment parameter.
Adjust caller. (NRTsetVector4a): Likewise. Avoid special variable for environment. * boot/utility.boot: Add and export substSource, substTarget. * interp/define.boot: Use them.
Diffstat (limited to 'src/interp/nruncomp.boot')
-rw-r--r--src/interp/nruncomp.boot22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index bd6424fd..0271c9a4 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2012, Gabriel Dos Reis.
+-- Copyright (C) 2007-2013, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -480,7 +480,7 @@ buildFunctor(db,sig,code,$locals,$e) ==
-- Do this now to create predicate vector; then DescendCode can refer
-- to predicate vector if it can
[$uncondAlist,:$condAlist] := --bound in compDefineFunctor1
- NRTsetVector4Part1(db,viewNames,catvecListMaker,condCats)
+ NRTsetVector4Part1(db,viewNames,catvecListMaker,condCats,$e)
[$NRTslot1PredicateList,predBitVectorCode1,:predBitVectorCode2] :=
makePredicateBitVector(db,[:ASSOCRIGHT $condAlist,:$NRTslot1PredicateList],$e)
@@ -527,13 +527,13 @@ buildFunctor(db,sig,code,$locals,$e) ==
SAY ['"time taken in buildFunctor: ",TEMPUS_-FUGIT()-oldtime]
ans
-NRTsetVector4Part1(db,siglist,formlist,condlist) ==
+NRTsetVector4Part1(db,siglist,formlist,condlist,e) ==
$uncondList: local := nil
$condList: local := nil
$count: local := 0
for sig in reverse siglist for form in reverse formlist
for cond in reverse condlist repeat
- NRTsetVector4a(db,sig,form,cond)
+ NRTsetVector4a(db,sig,form,cond,e)
reducedUncondlist := removeDuplicates $uncondList
reducedConlist :=
[[x,:y] for [x,z] in $condList| y := SETDIFFERENCE(z,reducedUncondlist)]
@@ -551,15 +551,17 @@ reverseCondlist cl ==
u.rest := [x,:rest u]
alist
-NRTsetVector4a(db,sig,form,cond) ==
+NRTsetVector4a(db,sig,form,cond,e) ==
sig is '$ =>
domainList :=
- [optimize comp(d,$EmptyMode,$e).expr or d
- for d in categoryPrincipals dbDomainShell db]
- $uncondList := append(domainList,$uncondList)
- if isCategoryForm(form,$e) then $uncondList := [form,:$uncondList]
+ [domForm for d in categoryPrincipals dbDomainShell db] where
+ domForm() == optimize
+ T := comp(d,$EmptyMode,e) => T.expr
+ d
+ $uncondList := append!(domainList,$uncondList)
+ if isCategoryForm(form,e) then $uncondList := [form,:$uncondList]
$uncondList
- evalform := evalCategoryForm(form,$e)
+ evalform := evalCategoryForm(form,e)
cond is true =>
$uncondList := [form,:append(categoryPrincipals evalform,$uncondList)]
$condList := [[cond,[form,:categoryPrincipals evalform]],:$condList]