aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-07-26 01:47:11 +0000
committerdos-reis <gdr@axiomatics.org>2010-07-26 01:47:11 +0000
commit86f5b5568ab4013e6fd8575e16b01d9d1aa99e91 (patch)
tree6d58767d6d554a8af12df71aa1235122181508e1 /src
parentcb7b845a7995a610bcf6260229cf1c0398af1a54 (diff)
downloadopen-axiom-86f5b5568ab4013e6fd8575e16b01d9d1aa99e91.tar.gz
* interp/g-opt.boot (optimize): Remove as no longer used.
* interp/define.boot (DomainSubstitutionFunction): Use simplifyVMForm in lieu of optimize. * interp/nruncomp.boot (NRTsetVector4a): Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/interp/define.boot2
-rw-r--r--src/interp/g-opt.boot26
-rw-r--r--src/interp/nruncomp.boot2
4 files changed, 11 insertions, 26 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a024bbf9..7c717a0e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
2010-07-25 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * interp/g-opt.boot (optimize): Remove as no longer used.
+ * interp/define.boot (DomainSubstitutionFunction): Use
+ simplifyVMForm in lieu of optimize.
+ * interp/nruncomp.boot (NRTsetVector4a): Likewise.
+
+2010-07-25 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* interp/g-opt.boot (oprCond): Replace use of TruthP with direct
comparison to %true.
diff --git a/src/interp/define.boot b/src/interp/define.boot
index 558b28fb..4403b26a 100644
--- a/src/interp/define.boot
+++ b/src/interp/define.boot
@@ -1684,7 +1684,7 @@ DomainSubstitutionFunction(parameters,body) ==
cons? $definition and
isFunctor body.op and
body.op ~= $definition.op
- => ['QUOTE,optimize body]
+ => ['QUOTE,simplifyVMForm body]
[Subst(parameters,u) for u in body]
not (body is ["Join",:.]) => body
atom $definition => body
diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot
index 7c09d4a0..fceb3a2d 100644
--- a/src/interp/g-opt.boot
+++ b/src/interp/g-opt.boot
@@ -145,9 +145,7 @@ resetTo(x,y) ==
x.rest := y.rest
x
-++ Like `optimize', except that non-atomic form may be reduced to
-++ to atomic forms. In particular, the address of the input may
-++ not be the same as that of the output.
+++ Simplify the VM form `x'
simplifyVMForm x ==
isAtomicForm x => x
x.op = 'CLOSEDFN => x
@@ -164,26 +162,6 @@ simplifyVMForm x ==
for xs in tails x repeat
xs.first := simplifyVMForm first xs
x
-
-optimize x ==
- (opt x; x) where
- opt x ==
- atom x => nil
- (y:= first x)='QUOTE => nil
- y='CLOSEDFN => nil
- y is [["XLAM",argl,body],:a] =>
- optimize rest x
- argl = "ignore" => x.first := body
- if not (# argl<= # a) then
- SAY '"length mismatch in XLAM expression"
- PRETTYPRINT y
- x.first := optimize optXLAMCond SUBLIS(pairList(argl,a),body)
- atom y => optimize rest x
- if first y="IF" then (x.first := optIF2COND y; y:= first x)
- op:= GETL(subrname first y,"OPTIMIZE") =>
- (optimize rest x; x.first := FUNCALL(op,optimize first x))
- x.first := optimize first x
- optimize rest x
subrname u ==
IDENTP u => u
@@ -233,7 +211,7 @@ optCatch (x is ["CATCH",g,a]) ==
if a is ["SEQ",:s,["THROW", =g,u]] then
changeThrowToExit(s,g)
a.rest := [:s,["EXIT",u]]
- ["CATCH",y,a]:= optimize x
+ a := simplifyVMForm a
if hasNoThrows(a,g) then
resetTo(x,a)
else
diff --git a/src/interp/nruncomp.boot b/src/interp/nruncomp.boot
index ffe06c58..a96e2345 100644
--- a/src/interp/nruncomp.boot
+++ b/src/interp/nruncomp.boot
@@ -557,7 +557,7 @@ reverseCondlist cl ==
NRTsetVector4a(sig,form,cond) ==
sig = '$ =>
domainList :=
- [optimize COPY comp(d,$EmptyMode,$e).expr or d
+ [simplifyVMForm COPY comp(d,$EmptyMode,$e).expr or d
for d in $domainShell.4.0]
$uncondList := append(domainList,$uncondList)
if isCategoryForm(form,$e) then $uncondList := [form,:$uncondList]